:root {
  --ink: #111111;
  --paper: #f7f7f4;
  --muted: #777770;
  --light-gray: #b8b8b8;
  --rule: #d9d9d3;

  --max-width: 1280px;
  --side-padding: clamp(20px, 5vw, 76px);
}

/* 基本設定
-------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 150px;

  color: var(--ink);
  background: var(--paper);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    YuGothic,
    Meiryo,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

/* 上部キャプション
-------------------------------------------------- */

.site-header {
  width: 100%;
  padding: 25px var(--side-padding);

  position: relative;
  z-index: 2;
}

.site-caption {
  margin: 0;

  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* メインビジュアル
-------------------------------------------------- */

.hero {
  width: 100%;
  max-width: var(--max-width);
  min-height: min(730px, 79vh);

  margin: 0 auto;
  padding:
    clamp(100px, 17vh, 210px)
    var(--side-padding)
    clamp(90px, 13vh, 150px);

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.animated-name {
  display: block;
  max-width: 1050px;

  margin: 0;

  font-size: clamp(78px, 13vw, 160px);
  line-height: 0.94;
  letter-spacing: -0.2em;
  font-weight: 700;
}

/* 文字ごとの滑らかな色変化 */
.animated-name .letter {
  display: inline-block;

  color: var(--light-gray);

  animation-name: letter-color;
  animation-duration: 13s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i) * 0.58s);
}

/*
  各文字がライトグレーから黒へ滑らかに変化。
  文字の形や位置は変化しない。
*/
@keyframes letter-color {
  0%,
  8% {
    color: var(--light-gray);
  }

  20%,
  55% {
    color: var(--ink);
  }

  68%,
  100% {
    color: var(--light-gray);
  }
}

/* カテゴリーボタン
-------------------------------------------------- */

.hero-links {
  display: flex;
  gap: 10px;

  margin-top: 58px;
}

.hero-links a {
  width: 142px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: var(--ink);

  border-radius: 999px;

  text-align: center;
  text-decoration: none;

  font-size: 11px;
  letter-spacing: 0.08em;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.hero-links a:hover,
.hero-links a:focus-visible {
  opacity: 0.72;
  transform: translateY(-2px);
  outline: none;
}

/* Selected fields
-------------------------------------------------- */

.hero-note {
  margin-top: clamp(80px, 12vh, 145px);

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;

  color: var(--muted);

  font-size: 12px;
  letter-spacing: 0.1em;
}

.scroll-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll-line i {
  display: block;

  width: 48px;
  height: 1px;

  background: var(--ink);
}

.occupation {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note {
  margin: 0;
}

/* 下層ページ
-------------------------------------------------- */

.project-page {
  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;
  padding:
    clamp(90px, 13vw, 175px)
    var(--side-padding)
    220px;
}

.project-page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;

  margin-bottom: 75px;
}

.project-page-title {
  margin: 0;

  font-size: clamp(48px, 8vw, 110px);
  line-height: 1;
  letter-spacing: -0.065em;
}

.back-link {
  color: var(--muted);

  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-placeholder {
  min-height: 320px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--muted);
  background: #eeeeea;

  font-size: 11px;
  letter-spacing: 0.1em;
}

/* フッター
-------------------------------------------------- */

.site-footer {
  position: fixed;
  z-index: 10;

  right: 0;
  bottom: 0;
  left: 0;

  width: 100%;
  max-width: var(--max-width);

  margin: 0 auto;
  padding: 0 var(--side-padding) 35px;

  pointer-events: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}

.footer-left,
.contact-links {
  pointer-events: auto;
}

.contact-title {
  margin: 0;

  font-size: 24px;
  letter-spacing: -0.04em;
}

.copyright {
  display: block;

  margin-top: 14px;

  color: var(--muted);

  font-size: 10px;
  letter-spacing: 0.1em;
}

.contact-links {
  display: flex;
  gap: 30px;

  font-size: 12px;
  letter-spacing: 0.08em;
}

.site-footer a {
  position: relative;

  color: inherit;
  text-decoration: none;
}

.site-footer a::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right;

  transition:
    transform 0.3s ease;
}

.site-footer a:hover::after,
.site-footer a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 表示時の控えめなアニメーション
-------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);

  animation:
    rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1)
    forwards;
}

.delay-1 {
  animation-delay: 0.12s;
}

.delay-2 {
  animation-delay: 0.22s;
}

.delay-3 {
  animation-delay: 0.34s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* アニメーションを減らす設定
-------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .animated-name .letter {
    color: var(--ink);
  }
}

/* スマートフォン
-------------------------------------------------- */

@media (max-width: 650px) {
  body {
    padding-bottom: 175px;
  }

  .site-header {
    padding-top: 20px;
  }

  .hero {
    min-height: 620px;
    padding-top: 110px;
  }

  .animated-name {
    max-width: 360px;
    font-size: clamp(62px, 20vw, 104px);
    letter-spacing: -0.13em;
  }

  .hero-links {
    margin-top: 48px;
  }

  .hero-links a {
    width: 142px;
    height: 38px;
  }

  .hero-note {
    margin-top: 75px;
  }

  .occupation {
    font-size: 12px;
    letter-spacing: 0.1em;
}

  .project-page {
    padding-top: 90px;
    padding-bottom: 220px;
  }

  .project-page-header {
    display: block;
    margin-bottom: 50px;
  }

  .back-link {
    display: inline-block;
    margin-top: 20px;
  }

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

  .project-placeholder {
    min-height: 220px;
  }

  .site-footer {
    padding-bottom: 35px;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 20px;
  }

  .contact-links {
    min-width: 0;

    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .copyright {
    margin-top: 14px;
  }
}