/* ============================================================
   TOKENS
============================================================ */
:root {
  --bg: #0d0d0d;
  --text: #f0f0f0;
  --text-muted: #888888;
  --divider: rgba(240, 240, 240, 0.15);
  --image-bg: #1a1a1a;
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SITE WRAPPER
============================================================ */
.site-wrapper {
  max-width: 1512px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ============================================================
   HEADER — base (mobile)
============================================================ */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

.logo {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
}

.nav-item {
  background: none;
  border: none;
  margin: 0;
  padding: 6px 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-item.is-active {
  color: var(--text);
}

.nav-item.is-active + .nav-divider {
  border-top-color: var(--text);
}

.nav-item:hover {
  background-color: #A4A4A4;
  color: #333030;
}

.nav-divider {
  display: none;
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0;
  width: 100%;
}

/* ============================================================
   PROJECT GRID — base (mobile, 1 column)
============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 20px;
  padding-bottom: 60px;
}

.tile-image {
  aspect-ratio: 477 / 341;
  background-color: var(--image-bg);
  overflow: hidden;
}

.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-tile {
  cursor: pointer;
}

.tile-category {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
}

.tile-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
}

/* ============================================================
   ABOUT — base (mobile)
============================================================ */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 20px 60px;
}

.about-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-text p {
  margin: 0 0 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-contact {
  display: flex;
  flex-direction: column;
}

.about-contact-group + .about-contact-group {
  margin-top: 29px;
}

.about-contact-label {
  display: block;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.about-contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-contact-link {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   TABLET — ≥ 768px (2 columns)
============================================================ */
@media (min-width: 768px) {
  .site-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    padding: 28px 0;
  }

  .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 20px;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 20px;
  }
}

/* ============================================================
   DESKTOP — ≥ 1280px (3 columns, vertical nav column)
============================================================ */
@media (min-width: 1280px) {
  .site-wrapper {
    padding: 0 30px;
  }

  .site-header {
    position: relative;
    display: block;
    height: 300px;
  }

  .logo {
    position: absolute;
    left: 28px;
    top: 31px;
  }

  .site-nav {
    position: absolute;
    left: calc(515 / 1512 * 100%);
    top: 31px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
  }

  .nav-item {
    padding: 5px 0;
    width: 100%;
    text-align: left;
  }

  .nav-divider {
    display: block;
    width: 100%;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 20px;
    padding: 0 20px 60px;
  }

  /* About — desktop two-column */
  .about-content {
    display: grid;
    grid-template-columns: 477px auto;
    column-gap: 57px;
    row-gap: 0;
    padding: 0 20px 60px calc(515 / 1512 * 100%);
  }
}

/* ============================================================
   PROJECT PAGE — base (mobile)
============================================================ */
.project-page {
  padding: 0 20px 60px;
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.project-header-left,
.project-header-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-name,
.project-category,
.project-location,
.project-date {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-hero-img {
  width: 100%;
  aspect-ratio: 870 / 579;
  object-fit: cover;
  display: block;
  background-color: var(--image-bg);
}

.project-description {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
}

.project-description p {
  margin: 0 0 18px;
}

.project-description p:last-of-type {
  margin-bottom: 12px;
}

.project-insight {
  color: rgba(187, 187, 187, 0.73);
}

.project-site-link {
  display: inline-block;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.gallery-image {
  aspect-ratio: 709 / 473;
  background-color: var(--image-bg);
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Project page — tablet ≥ 768px */
@media (min-width: 768px) {
  .project-header {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 60px;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Project page — desktop ≥ 1280px */
@media (min-width: 1280px) {
  .project-page {
    padding: 0 0 80px;
  }

  .project-header {
    display: grid;
    grid-template-columns: calc(515 / 1512 * 100%) auto;
    column-gap: 0;
    padding-bottom: 40px;
  }

  .project-header-left {
    padding-left: 28px;
  }

  .project-header-right {
    padding-left: 0;
  }

  .project-body {
    display: grid;
    grid-template-columns: calc(870 / 1512 * 100%) auto;
    column-gap: 40px;
    align-items: start;
  }

  .project-gallery {
    margin-top: 20px;
    gap: 20px;
  }
}
