:root {
  --text: rgba(0, 0, 0, 0.82);
  --muted: #a0a0a0;
  --surface: #f4f3f1;
  --site-nav-to-cards: 32px;
  --site-nav-height: 18px;
  --shadow-rest: 0 5px 15px rgba(90, 50, 40, 0.15), 0 4px 8px rgba(80, 40, 30, 0.1);
  --shadow-hover: 0 5px 10px rgba(100, 60, 50, 0.1), 0 15px 25px rgba(100, 60, 50, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: #fff;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #d2fd78;
}

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

p {
  margin: 0;
}

.site-shell {
  min-height: 100vh;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.masthead,
.projects-section,
.intro-block,
.cta-block,
.site-footer {
  padding-left: 30px;
  padding-right: 30px;
}

.masthead {
  display: flex;
  align-items: center;
  padding-top: 30px;
  padding-bottom: 30px;
}

.logo {
  width: 40px;
  height: 40px;
  border: 4px solid #000;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.site-nav--header {
  margin-left: auto;
  display: none;
}

.site-nav--below {
  justify-content: flex-start;
}

.site-nav__link {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: var(--site-nav-height);
  font-weight: 500;
  transition: color 0.25s ease;
}

.site-nav__link:hover,
.site-footer a:hover {
  color: var(--text);
}

.site-nav__link--active {
  color: var(--text);
  font-weight: 500;
}

.portfolio-view[hidden] {
  display: none;
}

.intro-block,
.cta-block {
  padding-top: 130px;
  padding-bottom: 130px;
}

.section-nav-block {
  padding: 0 30px var(--site-nav-to-cards);
}

.section-nav-block .site-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.intro-copy,
.cta-copy {
  max-width: 750px;
  margin: 0 auto;
  color: var(--text);
  text-align: center;
  font-size: 20px;
  line-height: 1.4;
}

.projects-section {
  padding-top: 0;
  padding-bottom: 30px;
}

.section-kicker {
  margin-bottom: 10px;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  letter-spacing: -0.5px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.project-card {
  display: block;
}

.project-card--disabled {
  cursor: default;
}

.project-surface {
  background: var(--surface);
  border-radius: 5px;
}

.project-media-frame {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
}

.project-media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  display: block;
  border-radius: 5px;
  box-shadow: var(--shadow-rest);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.4s ease,
    box-shadow 0.4s ease;
  will-change: opacity, transform;
}

.project-media.is-ready {
  opacity: 1;
}

.project-card:not(.project-card--disabled):hover .project-media {
  box-shadow: var(--shadow-hover);
  transform: translate(-50%, calc(-50% - 10px));
}

.project-meta {
  display: flex;
  gap: 16px;
  padding: 20px;
  padding-top: 0;
  color: var(--text);
}

.project-note {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.72);
}

.inline-link {
  position: relative;
}

.inline-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.14);
  transition: width 0.25s ease;
}

.inline-link:hover::after {
  width: 0;
}

.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  min-width: 120px;
  padding: 15px 25px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.floating-cta__label {
  opacity: 0.78;
  color: var(--muted);
  transition: opacity 0.25s ease;
}

.floating-cta__wave {
  display: inline-block;
  transform-origin: 70% 70%;
}

.floating-cta:hover .floating-cta__label {
  opacity: 1;
  color: #000;
}

.floating-cta:hover .floating-cta__wave {
  animation: cta-wave 1.5s ease-in-out 1;
}

@keyframes cta-wave {
  0% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(16deg);
  }

  40% {
    transform: rotate(-10deg);
  }

  60% {
    transform: rotate(14deg);
  }

  80% {
    transform: rotate(-4deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.site-footer {
  display: flex;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-footer a {
  margin-left: auto;
}

.study-panels {
  display: grid;
  gap: 28px;
  padding: 0 30px 30px;
}

.study-panel {
  min-height: 900px;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02)),
    var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.study-panel--project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.study-project-media {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.study-project-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}

.study-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 1;
  transition: opacity 0.42s ease;
  pointer-events: none;
  z-index: 1;
}

.study-poster.is-hidden {
  opacity: 0;
}

.study-media-tint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  z-index: 10;
}

.study-project-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  color: #fff;
  font-family: "Carlito", serif;
  font-size: clamp(56px, 17.17vw, 234px);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

@media (max-width: 1300px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .masthead,
  .projects-section,
  .intro-block,
  .section-nav-block,
  .cta-block,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .masthead {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav__link {
    font-size: 16px;
  }

  .intro-block,
  .cta-block {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .intro-copy,
  .cta-copy {
    font-size: 17px;
    line-height: 1.3;
  }

  .project-meta {
    flex-direction: column;
    gap: 4px;
  }

  .project-note {
    margin-left: 0;
  }

  .floating-cta {
    font-size: 12px;
  }

  .study-panels {
    padding-left: 20px;
    padding-right: 20px;
  }

  .study-panel {
    min-height: 420px;
  }

  .site-footer {
    padding: 20px;
    flex-wrap: wrap;
  }

  .site-footer a {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
