:root {
  --site-scale: 0.8;
  --pico-font-size: calc(100% * var(--site-scale));
  --home-footer-space: 8rem;
  --home-text-color: var(--pico-color);
  --home-muted-color: var(--pico-muted-color);
}

@media (min-width: 576px) {
  :root {
    --pico-font-size: calc(106.25% * var(--site-scale));
  }
}

@media (min-width: 768px) {
  :root {
    --pico-font-size: calc(112.5% * var(--site-scale));
  }
}

@media (min-width: 1024px) {
  :root {
    --pico-font-size: calc(118.75% * var(--site-scale));
  }
}

@media (min-width: 1280px) {
  :root {
    --pico-font-size: calc(125% * var(--site-scale));
  }
}

@media (min-width: 1536px) {
  :root {
    --pico-font-size: calc(131.25% * var(--site-scale));
  }
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
}

.home-layout {
  width: min(1400px, calc(100% - 2rem));
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(0.6rem, 1.4vw, 1rem) 0 0.85rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  height: max(18rem, calc(100dvh - var(--home-footer-space)));
}

.project-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: min-content minmax(0, 1fr) min-content;
  height: 100%;
  color: var(--home-text-color);
  text-decoration: none;
}

.project-media {
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.project-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  filter:  drop-shadow(0 32px 80px rgba(0, 0, 0, 0.02))
    drop-shadow(0 16px 30px rgba(0, 0, 0, 0.05))
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.28))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.26))
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.10));
}

.project-panel .project-media:hover img{
  opacity:0.5;
}

.project-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  padding: 1.4rem 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity:0;
}


.project-panel .project-media:hover .project-cta{
  opacity:1;
}

.project-copy {
  height:120px;
  padding: clamp(0.8rem, 1.4vw, 1.1rem);
  text-align: center;
}

.project-panel h1 {
  margin: 0 0 10px 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
}

.project-panel p {
  margin: 0;
  color: var(--home-muted-color);
  font-size: 0.9rem;
}

.support-callout {
  width: min(32rem, 100%);
  margin: 0 auto;
  min-height: calc(var(--home-footer-space) - 4.8rem);
  padding: 0.2rem 1rem 0;
  display: grid;
  align-content: center;
  text-align: center;
}

.support-callout p,
.support-callout a {
  font-size: 16px;
  font-weight: 100;
}

.support-callout p {
  margin: 0 0 0.35rem;
  color: var(--home-muted-color);
}

.support-callout a {
  text-decoration: none;
}

@media (max-width: 980px) {
  .home-layout {
    width: min(100%, calc(100% - 1rem));
    padding-top: 0.4rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .project-media {
    min-height: clamp(11rem, 28vh, 18rem);
  }
}

@media (max-width: 640px) {
  .home-layout {
    width: calc(100% - 0.75rem);
    gap: 0.65rem;
    padding-bottom: 1rem;
  }

  .project-grid {
    gap: 0.75rem;
  }

  .project-copy {
    padding: 0.9rem;
  }

  .project-panel h1 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .project-panel p,
  .support-callout p,
  .support-callout a {
    font-size: 14px;
  }
}
