/* Poppins (self-hosted) */
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/poppins-300-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/poppins-300.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-600.woff2") format("woff2");
}

:root {
  --text: #111;
  --muted: #333;
  --bg: #fff;
  --line: #111;
  --max: 1520px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
b, strong { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  padding: 42px var(--gutter) 20px;
  text-align: center;
}

.site-title {
  display: inline-block;
  max-width: 560px;
  font-size: 19.6px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.social {
  position: absolute;
  left: 77px;
  top: 73px;
  display: flex;
  gap: 12px;
}
.social svg { width: 20px; height: 20px; fill: currentColor; }

.nav {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 16px;
}
.nav a { padding-bottom: 4px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.active { border-bottom-color: var(--line); }

/* ---------- Sections ---------- */
main { padding: 0 var(--gutter); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 85px 0 60px;
}

.section-title {
  margin: 0 auto 34px;
  max-width: 1500px;
  text-align: center;
  font-size: clamp(18px, 1.72vw, 25px);
  font-weight: 300;
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 34px;
  /* Same sizes as the old site: grows with the window, up to 546px / 477px per card */
  grid-template-columns: repeat(2, minmax(0, min(546px, 33vw)));
  justify-content: center;
}
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, min(477px, 28.75vw))); }

.card { display: block; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f2f2;
}
.card-media img, .card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .3s ease;
}
.card-overlay h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.card-overlay p { margin: 0; font-size: 13px; line-height: 1.5; }

.card:hover .card-overlay,
.card:focus-visible .card-overlay { opacity: 1; }
.card:hover img, .card:hover video { transform: scale(1.04); }

.card-caption {
  margin: 34px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Inner pages (About / Blog) ---------- */
.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.page-title { margin: 0 0 40px; font-size: 32px; font-weight: 400; }

.about {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}
.about-photo { margin: 0 0 0 30px; }
.about-photo figcaption { margin-top: 18px; font-size: 14px; }
.about-body { font-size: 16px; line-height: 1.75; }
.about-body p { margin: 0 0 18px; }
.awards { margin: 0 0 18px; padding: 0; list-style: none; }
.awards li { margin-bottom: 14px; }

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 24px;
  align-items: start;
}
.post-card img, .post-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card time { display: block; margin: 20px 0 14px; font-size: 14px; }
.post-card h2 { margin: 0 0 28px; font-size: 24px; font-weight: 400; line-height: 1.4; }
.post-card .excerpt { margin: 0 0 24px; font-size: 16px; line-height: 1.7; }
.read-more { font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }

.post { max-width: 820px; margin: 0 auto; }
.post-meta { font-size: 14px; margin-bottom: 12px; }
.post h1 { margin: 0 0 40px; font-size: 34px; font-weight: 400; line-height: 1.3; }
.post-body { font-size: 16px; line-height: 1.8; }
.post-body h2, .post-body h3, .post-body h4 { font-weight: 600; line-height: 1.4; margin: 1.8em 0 .6em; }
.post-body img, .post-body video { margin: 28px auto; height: auto; }
.post-body figure { margin: 0; }
.post-body figcaption { font-size: 13px; text-align: center; color: var(--muted); margin-top: -16px; }
.post-body a { text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 64px; font-size: 14px; }

/* ---------- Project pages ---------- */
.project { padding: 0 var(--gutter) 40px; }

.p-section { margin: 0 auto; padding: 48px 0; }
.p-section.w-narrow { max-width: 800px; }
.p-section.w-medium { max-width: 1140px; }
.p-section.w-wide   { max-width: 1520px; }

/* Squarespace's 12-column rows */
.row { display: flex; gap: 0 34px; align-items: flex-start; }
.col { flex: var(--span) 1 0; min-width: 0; }
.col:empty { display: none; }

.project .text { font-size: 16px; line-height: 1.8; margin-bottom: 17px; }
.project .text h1 { font-size: 34px; font-weight: 400; line-height: 1.3; margin: 0 0 .6em; }
.project .text h2 { font-size: 26px; font-weight: 400; line-height: 1.35; margin: 0 0 .6em; }
.project .text h3 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 1em 0 .5em; }
.project .text h4 { font-size: 16px; font-weight: 600; margin: 1em 0 .5em; }
.project .text p { margin: 0 0 1em; }
.project .text a { text-decoration: underline; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.text-lg { font-size: 1.25em; }
.text-sm { font-size: .85em; }

.project .image { margin: 0 0 17px; }
.project .image img, .project .image video { width: 100%; height: auto; }
.project figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.project figcaption p { margin: 0; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 17px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.quote { margin: 0 0 17px; padding: 8px 0; font-size: 20px; line-height: 1.6; text-align: center; }
.quote p { margin: 0 0 .5em; }
.quote cite { display: block; font-size: 14px; font-style: normal; }

.gallery figure { margin: 0; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.gallery-grid figure { aspect-ratio: 3 / 2; }
.gallery-grid figure:has(figcaption) { aspect-ratio: auto; }
.gallery-grid figure:has(figcaption) img, .gallery-grid figure:has(figcaption) video { aspect-ratio: 3 / 2; height: auto; }

.gallery-reel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.gallery-reel figure { flex: 0 0 auto; height: 360px; scroll-snap-align: start; }
.gallery-reel img, .gallery-reel video { width: auto; }

.gallery-slideshow { position: relative; overflow: hidden; background: #f4f4f4; }
.gallery-slideshow .slides { display: flex; transition: transform .45s ease; }
.gallery-slideshow figure { flex: 0 0 100%; aspect-ratio: 16 / 9; }
.gallery-slideshow img, .gallery-slideshow video { object-fit: contain; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #111;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.slide-btn.prev { left: 12px; }
.slide-btn.next { right: 12px; }

.project-nav {
  max-width: 1140px; margin: 40px auto 0; padding-top: 28px;
  border-top: 1px solid #e5e5e5;
  display: flex; justify-content: space-between; gap: 24px; font-size: 14px;
}

/* ---------- Scroll reveal (see reveal.js) ---------- */
.reveal {
  clip-path: polygon(0 50%, 0 100%, 0 100%, 0 50%, 100% 50%, 100% 0, 100% 0, 100% 50%, 100% 50%, 100% 50%);
  transition: clip-path .8s cubic-bezier(.4, 0, .2, 1);
}
.reveal.is-visible {
  clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 100% 50%, 100% 0, 0 0, 0 50%, 0 50%, 0 50%);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 60px 32px 70px;
  font-size: 16px;
}
.site-footer h2 { margin: 0 0 24px; font-size: 24px; font-weight: 400; }
.site-footer p { margin: 0 0 16px; }

/* Touch screens can't hover: keep the project title visible along the bottom of the image */
@media (hover: none) {
  .card-overlay {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 12px 14px;
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 60%);
  }
  .card-overlay h3 { margin: 0 0 2px; font-size: 16px; }
  .card-overlay p { font-size: 12px; }
  .card:hover img, .card:hover video { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .social { left: var(--gutter); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .social { position: static; justify-content: center; margin-bottom: 14px; }
  .site-title { font-size: 16px; }
  .section { padding: 40px 0 24px; }
  .card-caption { margin-top: 14px; }
  .grid, .grid.cols-3 { grid-template-columns: 1fr; }
  .site-footer { padding: 40px var(--gutter) 50px; }
  .page { padding: 24px var(--gutter) 60px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { margin: 0; max-width: 240px; }
  .blog-list { grid-template-columns: 1fr; }
  .post h1 { font-size: 26px; }
  .row { flex-direction: column; }
  .col { width: 100%; }
  .p-section { padding: 28px 0; }
  .gallery-reel figure { height: 220px; }
}
