/* ============================================================
   Site Persists — Site Stylesheet

   Two-font system:
     Archivo  — structural: logo, headings, labels, nav
     Source Sans 3 — reading: body, excerpts, long text

   Type scale (√2 ratio from 18px base):
     0.7rem  — fine print, footer copy
     0.85rem — nav, meta, specs, labels
     1rem    — body (18px)
     1.2rem  — lead text
     1.4rem  — h3, card titles
     2rem    — h2
     2.8rem  — h1
     3.5rem  — hero / display

   Spacing rhythm: 0.5 / 1 / 2 / 4 / 6 rem
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #2c2c2c;
  background-color: #faf9f6;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
  color: #1a1a1a;
}

h1 {
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.4rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-top: 4rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.4em;
  max-width: 38em;
}

.lead {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.8;
  color: #444;
  max-width: 36em;
}

blockquote {
  font-family: 'Source Sans 3', sans-serif;
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
  border-left: 2px solid #b8b0a4;
  padding-left: 2rem;
  margin: 2rem 0;
  max-width: 32em;
}

a {
  color: #6b7c5e;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: #6b7c5e;
}

/* --- Layout --- */
.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-narrow {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Header / Navigation --- */
.site-header {
  padding: 2rem 0;
  border-bottom: 1px solid #e8e4de;
}

.site-header .site-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: none;
}

.site-logo:hover {
  border-bottom: none;
}

.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  border-bottom: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #1a1a1a;
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: 2rem;
}

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

.hero-caption {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  color: #fff;
  max-width: 600px;
}

.hero-caption h1 {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 0.25rem;
}

.hero-caption .hero-meta {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
}

.section-divider {
  border: none;
  border-top: 1px solid #e8e4de;
  margin: 0 0 4rem 0;
}

.section-heading {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 2rem;
}

/* --- Project Page --- */
.project-header {
  margin-bottom: 4rem;
}

.project-title {
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.project-location {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #888;
  text-transform: uppercase;
}

.project-body {
  margin-bottom: 4rem;
}

.project-body p {
  font-size: 1.05rem;
}

/* Project specs sidebar */
.project-specs {
  background: #f4f2ee;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 3px solid #b8b0a4;
}

.project-specs h3 {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-top: 0;
  margin-bottom: 1.4rem;
}

.project-specs dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
}

.project-specs dt {
  font-weight: 500;
  color: #666;
}

.project-specs dd {
  color: #2c2c2c;
}

/* --- Image Handling --- */
.figure {
  margin: 4rem 0;
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
}

.figure-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
}

.figure-caption {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #999;
  margin-top: 1rem;
}

/* Image grid for project detail images */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 4rem 0;
}

.image-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.image-grid .span-2 {
  grid-column: 1 / -1;
}

.image-grid .span-2 img {
  height: 450px;
}

/* --- Card Grid (for index/listing pages) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 4rem 2rem;
  margin: 2rem 0;
}

.card {
  text-decoration: none;
  border-bottom: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.card:hover {
  opacity: 0.85;
  border-bottom: none;
}

.card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.card-meta {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #666;
  max-width: 38em;
}

/* --- Article (material study / existing articles) --- */
article.material-study {
  padding: 4rem 0;
}

article.material-study h1 {
  margin-bottom: 0.5rem;
}

.article-meta {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4rem;
}

article.material-study h2 {
  font-size: 1rem;
}

/* --- Notes on Practice --- */
article.note {
  padding: 4rem 0;
  max-width: 640px;
  margin: 0 auto;
}

article.note h1 {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

article.note p {
  font-size: 1.05rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid #e8e4de;
  padding: 4rem 0;
  margin-top: 6rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-nav a {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
}

.footer-nav a:hover {
  color: #1a1a1a;
}

.footer-copy {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ccc;
}

/* --- Homepage Specific --- */
.home-intro {
  padding: 6rem 0 4rem;
  text-align: center;
}

.home-intro h1 {
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.home-intro .tagline {
  font-size: 1.2rem;
  font-weight: 300;
  color: #777;
  max-width: 32em;
  margin: 0 auto;
}

.home-featured {
  padding: 2rem 0 4rem;
}

.home-section-label {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8b0a4;
  margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .site-header .site-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .site-nav {
    gap: 1.2rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero {
    height: 50vh;
    min-height: 350px;
  }

  .hero-caption h1 {
    font-size: 1.8rem;
  }

  .project-title {
    font-size: 1.6rem;
  }

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

  .image-grid img,
  .image-grid .span-2 img {
    height: 250px;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .site-container {
    padding: 0 1.2rem;
  }

  .project-specs dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .home-intro h1 {
    font-size: 1.6rem;
  }
}
