:root {
  color-scheme: light;
  --ink: #11110f;
  --muted: #6f6d66;
  --paper: #f7f6f2;
  --line: #d8d5cd;
  --white: #ffffff;
  --grey: #d8d8d8;
  --lilac: #b8bad9;
  --blue: #9ecbe3;
  --green: #b4cd7b;
  --peach: #dfae8d;
  --max: 1600px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(17, 17, 15, 0.12);
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(16px);
}

.wordmark {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.header-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.header-meta span {
  padding: 0 5px;
}

.cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(460px, 0.98fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
  width: min(100%, var(--max));
  min-height: calc(100svh - 68px);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 128px) clamp(22px, 5vw, 78px) clamp(74px, 8vw, 120px);
  overflow: hidden;
}

.cover-copy {
  position: relative;
  z-index: 3;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(74px, 10vw, 172px);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.positioning {
  margin: 36px 0 0;
  color: #69851f;
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.42;
}

.lede {
  max-width: 620px;
  margin: 22px 0 0;
  color: #393832;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.85;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: center;
  margin-top: 34px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border: 1px solid rgba(17, 17, 15, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease;
}

.primary-button:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.download-link {
  color: #393832;
  font-size: 11px;
  text-decoration: none;
  transition: opacity 180ms ease;
}

.download-link:hover {
  opacity: 0.56;
}

.cover-note {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.project-collage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
  align-items: center;
  width: 80%;
  margin: 0 auto;
  padding-bottom: 72px;
}

.project-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 15, 0.14);
  background: var(--white);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
  appearance: none;
  box-shadow: 0 18px 50px rgba(39, 36, 28, 0.1);
  transition:
    transform 260ms ease,
    box-shadow 260ms ease;
}

.project-card:nth-child(1) {
  transform: translateY(38px);
}

.project-card:nth-child(2) {
  transform: translateY(-20px);
}

.project-card:nth-child(3) {
  transform: translateY(8px);
}

.project-card:nth-child(4) {
  transform: translateY(-38px);
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover img {
  transform: scale(1.025);
}

.project-card:hover {
  box-shadow: 0 22px 60px rgba(39, 36, 28, 0.15);
}

.project-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 7px;
  color: #11110f;
  font-family: "Heiti SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.card-tag--work {
  background: #a9e0f9;
}

.card-tag--project {
  background: #d3e6ad;
}

.project-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: rgba(8, 8, 8, 0.6);
  color: var(--white);
  opacity: 0;
  transition:
    opacity 220ms ease,
    background-color 220ms ease;
}

.project-hover strong {
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.project-hover small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.project-card:hover .project-hover,
.project-card:focus-visible .project-hover {
  opacity: 1;
}

.more-works {
  position: absolute;
  right: -7%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.more-works > span:first-child {
  padding: 4px 7px;
  background: #eab48d;
  font-family: "Heiti SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.more-works-circle {
  display: grid;
  width: clamp(58px, 6vw, 84px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #eab48d;
  font-size: clamp(22px, 2.4vw, 34px);
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.more-works:hover .more-works-circle {
  background: #f2c4a4;
  transform: translateX(5px);
}

.palette-mark {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.swatch {
  position: absolute;
  display: block;
  width: clamp(20px, 3vw, 40px);
  aspect-ratio: 1;
}

.swatch--grey {
  top: 9%;
  left: 5%;
  background: var(--grey);
}

.swatch--lilac {
  top: 7%;
  right: 5%;
  background: var(--lilac);
}

.swatch--blue {
  bottom: 7%;
  left: 5%;
  background: var(--blue);
}

.swatch--green {
  bottom: 6%;
  left: 52%;
  background: var(--green);
}

.swatch--peach {
  right: 5%;
  bottom: 6%;
  background: var(--peach);
}

.portfolio-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #161616;
  color: var(--white);
}

.portfolio-overlay.is-open {
  display: flex;
  animation: overlay-in 220ms ease both;
}

body.portfolio-open {
  overflow: hidden;
}

.overlay-bar {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 18px 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(22, 22, 22, 0.82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.overlay-title p {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.overlay-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.overlay-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.overlay-download,
.overlay-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease;
}

.overlay-download {
  font-size: 11px;
}

.overlay-close {
  font-size: 13px;
}

.overlay-download:hover,
.overlay-close:hover {
  color: var(--white);
}

.overlay-close {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.portfolio-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #242424;
}

.portfolio-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

.portfolio-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #242424;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  transition: opacity 250ms ease;
}

.portfolio-stage.is-loaded .portfolio-loading {
  pointer-events: none;
  opacity: 0;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.project-pager {
  position: absolute;
  z-index: 4;
  right: 50%;
  bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.82);
  color: var(--white);
  transform: translateX(50%);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.project-pager button {
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.project-pager button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.project-pager button:disabled {
  color: rgba(255, 255, 255, 0.26);
  cursor: default;
  pointer-events: none;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(22px, 5vw, 78px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.noscript {
  margin: 0;
  padding: 18px;
  background: #fff2b4;
  text-align: center;
}

@media (max-width: 980px) {
  .cover {
    grid-template-columns: 1fr;
    gap: 64px;
    min-height: auto;
    padding-top: 72px;
  }

  .project-collage {
    width: min(100%, 720px);
    margin: 0 auto;
  }

}

@media (max-width: 620px) {
  .site-header {
    min-height: 58px;
  }

  .header-meta {
    font-size: 10px;
  }

  .cover {
    gap: 52px;
    padding: 48px 18px 70px;
  }

  h1 {
    font-size: clamp(64px, 23vw, 108px);
  }

  .positioning {
    margin-top: 28px;
    font-size: 17px;
  }

  .lede {
    font-size: 14px;
    line-height: 1.75;
  }

  .primary-button {
    width: auto;
  }

  .cover-actions {
    align-items: center;
  }

  .download-link {
    align-self: center;
  }

  .project-collage {
    gap: 10px;
  }

  .project-card:nth-child(n) {
    transform: none;
  }

  .swatch--green {
    display: none;
  }

  .project-collage {
    width: 100%;
    padding-bottom: 82px;
  }

  .more-works {
    right: 50%;
    bottom: 0;
    transform: translateX(50%);
  }

  .project-hover {
    padding: 12px;
  }

  .project-hover strong {
    font-size: 11px;
  }

  .project-hover small {
    font-size: 8px;
  }

  .overlay-bar {
    min-height: 60px;
    padding: 8px 12px 8px 16px;
  }

  .overlay-title p {
    display: none;
  }

  .overlay-actions {
    gap: 14px;
  }

  .overlay-download,
  .overlay-close {
    font-size: 12px;
  }

  .project-pager {
    right: 10px;
    bottom: 12px;
    left: 10px;
    justify-content: space-between;
    gap: 4px;
    transform: none;
  }

  .project-pager button {
    padding: 8px 6px;
    font-size: 11px;
  }


  .site-footer {
    padding: 24px 18px;
  }
}

@media (hover: none) {
  .project-hover {
    background: linear-gradient(
      to top,
      rgba(8, 8, 8, 0.7),
      rgba(8, 8, 8, 0) 62%
    );
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
