@font-face {
  font-family: "ABCMarist";
  src: url("/assets/fonts/ABCMarist-Book.woff") format("woff");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "ABCMarist";
  src: url("/assets/fonts/ABCMarist-Medium.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "ABCMarist";
  src: url("/assets/fonts/ABCMarist-SemiBold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Apercu Pro";
  src: url("/assets/fonts/apercu_regular_pro.otf") format("opentype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Apercu Pro";
  src: url("/assets/fonts/apercu_medium_pro.otf") format("opentype");
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}

:root {
  --background: #f2f0ee;
  --foreground: #171717;
  --muted: #5a5957;
  --rule: #7a7772;
  --panel: rgba(255, 255, 255, 0.3);
  --panel-border: rgba(23, 23, 23, 0.12);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.05);
  --page-width: 500px;
  --hero-width: 450px;
  --caption-width: 380px;
  --body-font: "ABCMarist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --accent-font: "ABCMarist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tracking: 0;
  --transition: 180ms ease;
}

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

html {
  background: var(--background);
  color: var(--foreground);
  scrollbar-width: thin;
  scrollbar-color: #cfcecc transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--body-font);
  letter-spacing: var(--tracking);
  line-height: 1.42;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
  line-height: 1.3;
}

.site-shell {
  min-height: 100vh;
  padding: 5.4rem 2rem 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-header {
  width: min(100%, var(--page-width));
  margin-bottom: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  width: 100%;
  gap: 1rem;
  flex-wrap: nowrap;
}

.nav-link {
  position: relative;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-brand {
  color: var(--foreground);
  font-weight: 500;
  margin-right: auto;
}

.nav-link:not(.nav-brand)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.16rem;
  width: 100%;
  height: 0.6px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.85);
  transform-origin: center;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--foreground);
}

.nav-link:not(.nav-brand):hover::after,
.nav-link:not(.nav-brand)[aria-current="page"]::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.site-main {
  width: min(100%, var(--page-width));
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.site-main h1 {
  font-size: 1.08rem;
  font-weight: 500;
}

.site-main h2 {
  width: 100%;
  padding-bottom: 0.12rem;
  border-bottom: 0.6px solid var(--rule);
  font-size: 0.98rem;
  font-weight: 400;
}

.site-main h3 {
  font-size: 1rem;
  font-weight: 400;
}

.site-main p,
.site-main a,
.site-main li,
.site-main span {
  font-size: 1rem;
  font-weight: 300;
}

.intro-block,
.section-block,
.detail-copy,
.entry-grid,
.article-body {
  display: flex;
  flex-direction: column;
}

.intro-block {
  gap: 1.45rem;
}

.lede {
  max-width: 40rem;
}

.window-card {
  width: 100%;
  padding: 0.45rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.36rem;
}

.window-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.window-image {
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: hue-rotate(-5deg) brightness(1);
  mix-blend-mode: color-burn;
}

.window-image.scenic-image {
  mix-blend-mode: normal;
  filter: none;
  opacity: 0.94;
}

.window-frame.hero-frame {
  border: 1px solid var(--panel-border);
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
}

.window-curve {
  position: absolute;
  top: 0.45rem;
  left: 1.75rem;
  width: 75%;
  opacity: 0.28;
  pointer-events: none;
}

.hero-caption {
  width: 100%;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.2;
  font-style: normal;
  color: var(--muted);
}

.hero-caption.hero-caption-wide {
  width: 100%;
  max-width: none;
}

.section-block,
.entry-grid,
.detail-copy,
.article-body {
  gap: 0.75rem;
}

.entry-grid {
  gap: 0.35rem;
}

.projects-playground-main {
  width: min(100%, 1280px);
  max-width: none;
  margin-top: 0;
  gap: 0;
}

.projects-back-row {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 0.7rem;
  padding: 0 40px;
}

.projects-playground-body {
  background: #fffdf9;
  color: #4e4e4e;
  font-family: "Apercu Pro", sans-serif;
  line-height: 1.6;
}

.projects-playground-body a {
  text-decoration: none;
}

.pg-site-shell {
  min-height: 100vh;
  background: #fffdf9;
  display: flex;
  flex-direction: column;
}

.pg-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #fffdf9;
}

.pg-site-header-inner {
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-brand {
  display: flex;
  align-items: center;
  padding: 22px 10px;
  color: #000;
}

.pg-brand-mark {
  width: 14px;
  height: 14px;
  margin-right: 12px;
  border: 1px solid #000;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pg-brand-name,
.pg-site-nav-link,
.pg-card-title,
.pg-card-date,
.pg-card-desc,
.pg-card-arrow,
.pg-site-footer-link,
.pg-site-footer-note {
  font-size: 16px;
  font-weight: 400;
}

.pg-brand-name,
.pg-site-nav-link {
  color: #000;
}

.pg-site-nav {
  display: flex;
  align-items: center;
}

.pg-site-nav-link {
  padding: 0 16px;
  transition: color 0.15s ease;
}

.pg-site-nav-link:hover,
.pg-site-nav-link[aria-current="page"] {
  color: #606060;
}

.pg-page {
  width: 100%;
  background: #fffdf9;
  font-family: var(--body-font);
  padding: 40px;
  flex: 1;
}

.pg-outer {
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid #111;
  background: #fffdf9;
}

.pg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.pg-card {
  color: inherit;
  aspect-ratio: 1;
  background: #fffdf9;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.15s ease;
}

.pg-card:nth-child(3n) {
  border-right: none;
}

.pg-card:nth-last-child(-n + 3) {
  border-bottom: none;
}

.pg-card:hover .pg-card-image {
  transform: translateY(-8px);
}

.pg-card-top,
.pg-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.pg-card-title {
  color: #111;
}

.pg-card-date {
  color: #aaa;
  white-space: nowrap;
}

.pg-card-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.pg-card-image {
  width: auto;
  max-width: 130px;
  height: auto;
  max-height: 130px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pg-card-bottom {
  gap: 16px;
}

.pg-card-desc {
  color: #aaa;
}

.pg-card-arrow {
  color: #111;
}

.pg-site-footer {
  min-height: 58px;
  padding: 0 24px;
  background-color: #fffdf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.pg-site-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pg-site-footer-link,
.pg-site-footer-note {
  color: #888;
}

.pg-site-footer-link:hover {
  color: #111;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.book-list li {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.42;
}

.entry-link {
  display: block;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.1rem 0;
  transition: transform var(--transition), opacity var(--transition);
}

.entry-link:hover .entry-card {
  transform: translateX(3px);
}

.entry-name {
  display: inline-block;
  width: fit-content;
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 0.6px;
  text-underline-offset: 0.23rem;
}

.entry-description,
.eyebrow,
.muted {
  color: var(--muted);
}

.contact-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-block;
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.2rem;
}

.page-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-art {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.16));
  box-shadow: var(--shadow-soft);
}

.hero-art img {
  width: 100%;
  height: auto;
}

.media-block {
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
}

.eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.note-card {
  padding: 1rem 1rem 0.95rem;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.note-card p + p,
.article-body p + p {
  margin-top: 0.75rem;
}

.meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-space {
  height: 1rem;
}

@media (max-width: 700px) {
  .site-shell {
    padding: 3.6rem 1.3rem 4rem;
  }

  .site-header {
    width: min(100%, var(--page-width));
    margin-bottom: 1rem;
  }

  .projects-playground-main {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .pg-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pg-card:nth-child(3n) {
    border-right: 1px solid #111;
  }

  .pg-card:nth-child(2n) {
    border-right: none;
  }

  .pg-card:nth-last-child(-n + 3) {
    border-bottom: 1px solid #111;
  }

  .pg-card:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

@media (max-width: 767px) {
  .projects-back-row {
    padding: 0 20px;
    margin-bottom: 0.6rem;
  }

  .pg-page {
    padding: 24px 20px 32px;
  }

  .pg-site-footer {
    padding: 0 20px 20px;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 580px) {
  :root {
    --page-width: 350px;
    --hero-width: 340px;
    --caption-width: 310px;
  }

  .site-nav {
    gap: 0.7rem;
  }

  .site-main {
    width: min(100%, var(--page-width));
  }

  .hero-caption {
    min-height: 1.85rem;
    font-size: 0.9rem;
  }

  .pg-page {
    padding: 20px;
  }

  .pg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pg-grid--five .pg-card {
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
  }

  .pg-grid--five .pg-card:nth-child(2n) {
    border-right: none;
  }

  .pg-grid--five .pg-card:nth-child(5) {
    border-bottom: none;
  }

  .pg-card {
    padding: 22px 24px;
  }
}

@media (max-width: 500px) {
  :root {
    --page-width: 100%;
  }

  .site-shell {
    padding-top: 3.2rem;
    padding-inline: 1rem;
  }

  .site-header {
    width: 100%;
  }

  .site-nav {
    gap: 0.6rem;
  }

  .window-frame {
    width: calc(100% - 5px);
  }

  .pg-card-title,
  .pg-card-date,
  .pg-card-desc,
  .pg-card-arrow {
    font-size: 0.92rem;
  }
}
