body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #FFFFFF;
  background: #2e3035;
}

.bg {
    position: fixed;
    inset: 0; /* replaces width/height */
    margin: 0;
    padding: 0;
    background: linear-gradient(128deg, #2e3035, #010101);
    z-index: -1; /* key fix */
}

/* main layout column */
.container {
  width: 100%;
  max-width: 900px;   /* adjust to your design */
  margin: 0 auto;     /* centers it when wider than max-width */
  padding: 24px;      /* prevents edge-to-edge text on small screens */
  box-sizing: border-box;
}

.media-caption {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  padding-top:10px;
}

/* responsive edge behavior */
@media (max-width: 900px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 901px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* title line */
.project-title {
  margin-top: 0px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 1);
  text-transform: uppercase;
}

.case-study {
  padding-bottom: 64px;
}

/* COVER IMAGE */
.cover {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

/* CLIENT NAME */
.client-name {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 300;
  color: #fff;
  line-height: 1.0;
}

.client-large {
  font-size: 24px;
}

/* PROJECT TYPE */
.project-type {
  margin-top: 0px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 1.0);
  text-transform: uppercase;
}

/* SUMMARY */
.summary {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
  padding-bottom: 8px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* padding tweak depending on container edge behavior */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* responsive padding rule (same pattern as before) */
@media (max-width: 900px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .case-button {
    margin-right: 0;
  }
}

@media (min-width: 901px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }

  .case-button {
    margin-right: 24px; /* visual breathing room when flush */
  }
}

/* CASE STUDY BUTTON */
.case-button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.12em;
  font-weight: 400;
  transition: background 0.2s ease, color 0.2s ease;
}

.case-button:hover {
  background: #ffffff;
  color: #000;
}

.cover-container {
  padding-bottom: 24px;
}

.case-study-cover-inline {
  border-radius: 8px;
}

.line-item-title-large {
    font-size: 18px;
}

.line-item-title {
    font-weight: 500;
}

.line-item-info {
    font-weight: 300;
    padding-left: 10px;
    font-size: 16px;
}

.project-line-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  padding-top: 4px;
}

.line-item-title {
  font-weight: 500;
  min-width: 40px; /* keeps alignment consistent */
}

.line-item-info {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.3;
}

.description-title {
    text-transform: uppercase;
    font-weight: 500;
    font-size: 16px;
    padding-bottom: 8px;
}

.project-description {
    padding-top: 30px;
}

.project-description-less {
    padding-top: 20px;
}

.description {
    color: #cbc9c9;
    font-weight: 300;
    font-size: 15px;
}

.description-subtitle {
    color: #cbc9c9;
    font-weight: 500;
    font-size: 15px;
    padding-bottom: 6px;
}

.case-study-diagram {
  width: 100%;
  max-width: 700px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  padding-top: 24px;
  padding-bottom: 24px;
  margin: 0 auto;
}

.white {
  color: #FFFFFF
}

.inset-1 {
  padding-left: 12px;
}

.inset-2 {
  padding-left: 24px;
}

.inset-3 {
  padding-left: 36px;
}

.bolder {
  font-weight: 500;
}

.project-description.with-media {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

.project-description-less.with-media {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

.project-description.with-media-left {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
}

.project-description-less.with-media-left {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
}

.project-media img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* stack on mobile */
@media (max-width: 800px) {
  .project-description.with-media {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-description.with-media-left {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* default behavior: media goes first */
  .project-description.with-media .project-media {
    order: -1;
  }

  /* default behavior: media goes first */
  .project-description.with-media-left .project-media {
    order: 1;
  }

  /* override: keep media after text */
  .project-description.with-media.media-after .project-media {
    order: 1;
  }

  .project-descriptio-less.with-media-left.media-after .project-media {
    order: -1;
  }
}

.case-video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.pull-quote {
  margin: 24px 0;
  padding: 8px 18px;
  border-left: 4px solid rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  font-weight: 300;
  line-height: 1.4;
}

.back-button {
  position: absolute;
  bottom: 40px;
  right: 0;

  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #ffffff;
  border-radius: 999px;

  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 400;

  transition: background 0.2s ease, color 0.2s ease;
}

.back-button:hover {
  background: #ffffff;
  color: #000;
}

.client-name,
.project-title {
  max-width: calc(100% - 90px); /* match reserved space */
}

@media (max-width: 700px) {
  .back-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0; /* hides text */
  }

  .back-button::before {
    content: "⌂";
    font-size: 20px;
    line-height: 1;

    position: relative;
    top: -1px; /* optical centering tweak */
  }

  .client-name,
  .project-title {
    max-width: calc(100% - 50px);
  }

  .client-name {
    font-size: 18px;
  }

  .client-large {
    font-size: 22px;
  }

  .project-title {
    font-size: 13px;
  }

  .client-name-smaller {
    font-size: 15px;
  }

  .client-large-smaller {
    font-size: 18px;
  }

  .about-adjustment {
    top: 40px;
  }
}

.site-footer {
  margin-top: 10px;
  padding-bottom: 40px;
}

.footer-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}

.footer-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.footer-link {
  display: flex;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 1.0);
  text-decoration: none;
  font-weight: 500;
  line-height: 1;
  padding-top:2px;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

.footer-icon {
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.footer-icon:hover {
  opacity: 0.6;
}

.footer-icon svg {
  display: block;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name nav"
    "title nav"
    "line line";
  align-items: end;
  row-gap: 2px;
  padding-top: 24px;
  padding-bottom: 32px;
}

/* name line */
.name {
  grid-area: name;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.0;
}

/* title line */
.title {
  margin-top: 0px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  max-width: 65%;
  color: rgba(255, 255, 255, 0.7);
  grid-area: title;
  max-width: none; /* IMPORTANT: removes your 65% constraint */
}

.about-title {
  margin-top: 0px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  max-width: 65%;
  color: rgba(255, 255, 255, 0.7);
  grid-area: title;
  max-width: none; /* IMPORTANT: removes your 65% constraint */
}

/* larger initials */
.name-large {
  font-size: 36px;
  font-weight: 300;
  line-height: 0.9;
}

.navigation {
  grid-area: nav;
  justify-self: end;
  display: flex;
  gap: 20px;
  align-items: flex-end;
}

.header-line {
  grid-area: line;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
  margin-bottom: 0px;
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "title"
      "nav"
      "line";
    row-gap: 2px;
  }

  .title {
    font-size: 11px;
  }

  .navigation {
    padding-top: 12px;
    justify-self: end; /* keeps it right aligned even when stacked */
  }

  .about-title {
    font-size: 12px;
    max-width: calc(100% - 60px); /* match reserved space */
  }
}

/* links */
.nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  color: rgba(255,255,255,0.6);
}

.padding-bottom {
  padding-bottom: 30px;
}

.study-header {
  position: relative;
  padding-top: 24px;
  padding-bottom: 32px;
}