/* ---------------------------------
   Foundation
---------------------------------- */

* {
  box-sizing: border-box;
}

:root {
  --background: #f1f0ec;
  --text: #151515;
  --line: rgba(21, 21, 21, 0.22);
  --secondary: rgba(21, 21, 21, 0.58);
  --purple: #9a83d7;

  --font-display: Arial, sans-serif;
  --font-body: Arial, sans-serif;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;

  background: var(--background);
  color: var(--text);

  font-family: var(--font-body);
  font-size: 12px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;

  background: transparent;
  color: inherit;

  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--purple);
  outline-offset: 5px;
}

/* ---------------------------------
   Header
---------------------------------- */

.site-header {
  position: relative;
  z-index: 10;

  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 32px;
  align-items: start;

  width: calc(100% - 60px);
  max-width: 1500px;
  height: 120px;
  margin: 0 auto;
  padding: 34px 0 0;
}

.logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.view-switch {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.navigation {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}

.logo {
  display: block;
  width: 128px;
  line-height: 0;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.navigation {
  justify-self: end;
}

.navigation,
.view-switch,
.view-button {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.view-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-button {
  opacity: 0.35;
}

.view-button.is-active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.is-active-link {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------------------------------
   Shared project layout
---------------------------------- */

.project-interface {
  min-height: calc(100vh - 120px);
  padding: 20px 30px 70px;
}

.list-view,
.axis-view {
  display: grid;
  grid-template-columns:
    minmax(520px, 1.5fr)
    minmax(280px, 0.7fr);
  gap: 7vw;
  align-items: center;

  width: 100%;
  max-width: 1500px;
  min-height: calc(100vh - 210px);
  margin: 0 auto;
}

/* ---------------------------------
   List
---------------------------------- */

.project-list {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    minmax(140px, 0.55fr)
    55px;
  gap: 16px;
  align-items: baseline;

  width: 100%;
  min-height: 54px;
  padding: 17px 10px;

  border-bottom: 1px solid var(--line);

  text-align: left;

  transition:
    opacity 220ms ease,
    background 300ms ease;
}

.project-row.is-active {
  background: linear-gradient(
    90deg,
    rgba(154, 131, 215, 0.17),
    rgba(154, 131, 215, 0) 74%
  );
}

.project-list:hover
  .project-row:not(:hover):not(.is-active) {
  opacity: 0.35;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(10px, 0.75vw, 13px);
  line-height: 1.4;
  text-transform: none;
}

.project-location,
.project-year {
  color: rgba(21, 21, 21, 0.5);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
}

.confidential {
  color: #8d76b1;
}

/* ---------------------------------
   Project information
---------------------------------- */

.project-detail {
  width: 100%;
  max-width: 390px;
  min-height: 500px;
}

.detail-image {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 290px;
  margin-bottom: 18px;

  overflow: hidden;
  background: transparent;
}

.detail-image img {
  display: block;

  width: auto;
  max-width: 100%;

  height: auto;
  max-height: 100%;

  object-fit: contain;

  filter: saturate(0.8);
}

.detail-image img[src=""] {
  visibility: hidden;
}

.detail-meta {
  min-height: 12px;
  margin: 0 0 9px;

  color: var(--secondary);
  font-size: 10px;
}

.detail-title {
  min-height: 0;
  margin: 0 0 18px;

  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-transform: none;
}

.detail-description {
  min-height: 0;
  max-width: 36ch;
  margin: 0;

  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;

   white-space: pre-line;
}

.project-link {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 4px;

  border-bottom: 1px solid var(--purple);

  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-link[hidden] {
  display: none;
}

/* ---------------------------------
   Cartesian axis
---------------------------------- */

.axis-view {
  grid-template-columns:
    minmax(520px, 1.45fr)
    minmax(280px, 0.55fr);
}

.axis-chart {
  position: relative;
  justify-self: center;

  width: min(56vw, 720px);
  height: min(58vh, 520px);

  margin: 30px 60px;
}

.axis-line {
  position: absolute;
  background: var(--line);
  pointer-events: none;
}

.axis-horizontal {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.axis-vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.axis-label {
  position: absolute;
  z-index: 2;

  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.axis-matter {
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
}

.axis-rest {
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
}

.axis-object {
  top: 50%;
  left: -58px;
  transform: translateY(-50%);
}

.axis-urban {
  top: 50%;
  right: -52px;
  transform: translateY(-50%);
}

.axis-point {
  position: absolute;
  z-index: 3;

  left: var(--axis-x);
  bottom: var(--axis-y);

  width: 9px;
  height: 9px;

  background: rgba(21, 21, 21, 0.3);
  border-radius: 50%;

  transform: translate(-50%, 50%);

  transition:
    background 250ms ease,
    box-shadow 450ms ease,
    transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

/* Large invisible interaction area */

.axis-point {
  position: absolute;
  z-index: 3;

  left: var(--axis-x);
  bottom: var(--axis-y);

  width: 38px;
  height: 38px;
  padding: 0;

  background: transparent;
  border-radius: 50%;

  transform: translate(-50%, 50%);
}

/* Small visible point */

.axis-point::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 50%;

  width: 9px;
  height: 9px;

  background: rgba(21, 21, 21, 0.3);
  border-radius: 50%;

  transform: translate(-50%, -50%);

  transition:
    background 250ms ease,
    box-shadow 450ms ease,
    transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.axis-point:hover::before,
.axis-point:focus-visible::before {
  background: var(--purple);
  transform:
    translate(-50%, -50%)
    scale(1.25);
}

.axis-point.is-active::before {
  background: rgba(154, 131, 215, 0.85);

  box-shadow:
    0 0 8px 5px rgba(154, 131, 215, 0.36),
    0 0 28px 16px rgba(154, 131, 215, 0.19),
    0 0 58px 30px rgba(154, 131, 215, 0.08);

  transform:
    translate(-50%, -50%)
    scale(1.15);
}

/* ---------------------------------
   Info page
---------------------------------- */

.info-page {
  min-height: calc(100vh - 120px);
  padding: 7vh 30px 50px;
}

.info-content {
  display: grid;
  grid-template-columns:
    minmax(400px, 800px)
    minmax(220px, auto);
  justify-content: space-between;
  gap: 80px;

  max-width: 1500px;
  margin: 0 auto;
}

.info-text {
  font-size: clamp(22px, 2.3vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.info-text p {
  margin: 0 0 1.1em;
}

.info-contact {
  align-self: end;

  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-label {
  margin: 0 0 14px;

  font-family: var(--font-display);
  font-size: 9px;
  text-transform: uppercase;
}

.info-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------------------------
   Mobile
---------------------------------- */

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    top: 0;

    height: 94px;
    padding: 16px 16px 0;

    background: linear-gradient(
      var(--background) 78%,
      rgba(241, 240, 236, 0)
    );
  }

  .logo {
    width: 104px;
  }

  .project-interface {
    padding: 10px 16px 70px;
  }

  .list-view,
  .axis-view {
    display: block;
    min-height: auto;
  }

  .project-row {
    grid-template-columns: 1fr auto;
    gap: 6px 14px;

    padding: 16px 2px;
  }

.project-title {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 20px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: none;
}

  .project-location {
    grid-column: 1;
    text-align: left;
  }

  .project-year {
    grid-column: 2;
    grid-row: 1;
  }

  .project-detail {
    max-width: none;
    min-height: auto;
    margin-top: 42px;
  }

  .detail-image {
    height: 55vh;
    max-height: 390px;
  }

  .axis-chart {
    width: calc(100vw - 104px);
    height: 54vh;
    max-height: 450px;
    margin: 35px auto 90px;
  }

  .axis-project-detail {
    margin-top: 0;
  }

  .info-page {
    padding: 7vh 16px 60px;
  }

  .info-content {
    display: block;
  }

  .info-text {
    font-size: 22px;
  }

  .info-contact {
    margin-top: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.project-row {
  cursor: pointer;
}

@media (max-width: 760px) {
  .project-list > .project-detail {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 22px 2px 38px;

    border-bottom: 1px solid var(--line);
  }

  .project-list > .project-detail .detail-image {
    height: auto;
    min-height: 180px;
    max-height: 60vh;
  }

  .project-list > .project-detail .detail-image img {
    max-height: 60vh;
  }

  .project-list > .project-detail
    .detail-description {
    min-height: 0;
  }
}
/* ---------------------------------
   Final typography scale
---------------------------------- */

.navigation,
.view-switch,
.view-button {
  font-size: 11px;
}

.project-title {
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  font-size: clamp(18px, 2vw, 32px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-transform: none;
}

.project-location,
.project-year {
  font-size: 12px;
  line-height: 1.25;
}

.detail-meta {
  font-size: 11px;
}

.detail-title {
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  font-size: clamp(20px, 1.6vw, 27px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-transform: none;
}

.detail-description {
  max-width: 38ch;
  font-size: 16px;
  line-height: 1.45;
}

.project-link {
  font-size: 10px;
}

.project-location,
.project-year,
.detail-meta {
  color: rgba(21, 21, 21, 0.62);
}

/* Avoid repeating information shown in the list */

.list-view .detail-meta,
.list-view .detail-title {
  display: none;
}

/* Let List-view previews follow their natural image height */

.list-view .detail-image {
  align-items: flex-start;
  justify-content: flex-start;

  height: auto;
  min-height: 0;
  margin-bottom: 18px;
}

.list-view .detail-image img {
  width: auto;
  max-width: 100%;

  height: auto;
  max-height: 360px;

  object-fit: contain;
}

/* ---------------------------------
   Founder biographies
---------------------------------- */

.bio-trigger {
  padding: 0;

  border: 0;
  border-bottom: 1px solid transparent;

  color: var(--purple);

  font: inherit;
  letter-spacing: inherit;

  cursor: help;

  transition: border-color 200ms ease;
}

.bio-trigger:hover,
.bio-trigger:focus-visible {
  border-bottom-color: var(--purple);
}

.info-bio {
  align-self: center;

  width: 100%;
  max-width: 380px;
}

.info-bio[hidden] {
  display: none;
}

.info-bio-name {
  margin: 0 0 16px;

  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.info-bio-text {
  margin: 0;

  font-size: 14px;
  line-height: 1.5;
}

.info-text .info-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;

  margin-top: 54px;

  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
}

.info-text .contact-label {
  margin: 0 0 8px;
}

/* Shared typography: project titles and Info text */

.project-title,
.info-text {
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  font-size: clamp(18px, 2vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-transform: none;
}

.bio-trigger {
  font: inherit;
  letter-spacing: inherit;
}

/* Shared typography: project descriptions and biographies */

.detail-description,
.info-bio-text {
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

/* Keep Info-page columns stable when biographies appear */

.info-content {
  grid-template-columns:
    minmax(0, 800px)
    380px;
}

.info-bio-name {
  display: none;
}

.info-bio {
  width: 380px;
  max-width: 100%;
}

/* Return to one column on phones */

@media (max-width: 760px) {
  .info-content {
    display: block;
  }

  .info-bio {
    width: 100%;
    margin-top: 40px;
  }

  /* Names are already visible in the studio description */


}
