:root {
  --bg: #050505;
  --fg: #111111;
  --paper: #ffffff;
  --muted: rgba(17, 17, 17, 0.62);
  --line: rgba(17, 17, 17, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "A-OTF 新ゴ Pro", "A-OTF Shin Go Pro R", "ShinGoPro-Regular", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  color: inherit;
}

.projects-page {
  width: min(100%, 750px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
}

.projects-panel {
  position: relative;
  min-height: 100vh;
  padding: 88px 28px 96px;
}

.projects-panel::before {
  content: "Projects";
  position: absolute;
  left: -26px;
  top: 74px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 82px;
  line-height: 0.86;
  font-weight: 900;
  color: rgba(17, 17, 17, 0.055);
  pointer-events: none;
}

.projects-intro {
  position: relative;
  z-index: 1;
}

.section-label {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.projects-intro h1 {
  margin: 28px 0 0;
  font-size: 50px;
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 900;
}

.projects-title-break {
  display: none;
}

.lead {
  margin: 34px 0 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.75;
  font-weight: 700;
}

.project-card-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  margin-top: 42px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(116px, 38%) minmax(0, 1fr);
  align-items: stretch;
  min-height: 214px;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--fg);
  background: #ffffff;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(17, 17, 17, 0.42);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.13);
}

.project-card:focus-visible {
  outline: 3px solid #39d7ff;
  outline-offset: 4px;
}

.project-card__image {
  display: block;
  width: 100%;
  height: 214px;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  object-fit: cover;
  background: #eeeeee;
}

.project-card--saihouji .project-card__image {
  object-position: center top;
}

.project-card--kirie .project-card__image {
  object-fit: contain;
  object-position: center;
  background: #f7f8f6;
}

.project-card--maacha .project-card__image {
  object-position: center;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 22px 20px;
}

.project-card__kicker {
  display: block;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.14em;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.project-card__title {
  display: block;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
}

.project-card__text {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.68;
  color: rgba(17, 17, 17, 0.72);
}

.project-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 94px;
  min-height: 38px;
  margin-top: 18px;
  padding: 8px 16px 9px;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.project-card--saihouji .project-card__action {
  background: #0d4d40;
}

.project-card--kirie .project-card__action {
  background: #c0195b;
}

.project-card--maacha .project-card__action {
  background: #1662a7;
}

@media (max-width: 520px) {
  .projects-panel {
    padding-top: 76px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 76px;
  }

  .projects-panel::before {
    left: -48px;
    top: 92px;
    font-size: 64px;
    color: rgba(17, 17, 17, 0.035);
  }

  .section-label {
    font-size: 30px;
  }

  .projects-intro h1 {
    font-size: clamp(31px, 9.6vw, 42px);
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .projects-title-break {
    display: initial;
  }

  .lead {
    margin-top: 28px;
    font-size: 16px;
    line-height: 1.8;
  }

  .project-card-grid {
    gap: 16px;
    margin-top: 34px;
  }

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

  .project-card__image {
    height: clamp(172px, 56vw, 236px);
    aspect-ratio: 16 / 9;
  }

  .project-card__body {
    min-height: 0;
    padding: 20px 20px 22px;
  }

  .project-card__title {
    font-size: 22px;
    line-height: 1.4;
  }

  .project-card__text {
    font-size: 14.5px;
    line-height: 1.72;
  }

}

@media (max-width: 340px) {
  .projects-intro h1 {
    font-size: 31px;
  }
}

@media (min-width: 960px) {
  .projects-page {
    width: min(100%, 1120px);
  }

  .projects-panel {
    padding: 112px 86px 110px;
  }

  .projects-panel::before {
    left: -22px;
    font-size: 118px;
  }

  .projects-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(360px, 0.78fr);
    column-gap: 72px;
    align-items: end;
  }

  .section-label {
    grid-column: 1;
    font-size: 38px;
  }

  .projects-intro h1 {
    grid-column: 1;
    margin-top: 34px;
    font-size: 78px;
  }

  .lead {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0 0 12px;
    font-size: 24px;
  }

  .project-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 58px;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: 520px;
  }

  .project-card__image {
    height: 250px;
    min-height: 250px;
  }

  .project-card__body {
    min-height: 270px;
    padding: 26px 24px 24px;
  }

  .project-card__title {
    font-size: 25px;
  }
}
