/* ---------- リセット ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

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

/* ---------- 変数 ---------- */

:root {
  --c-text: #1d1f23;
  --c-sub: #5f6670;
  --c-white: #ffffff;
  --c-line: #e1e6ec;
  --c-image-bg: #f4f6f8;
  --font-base: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --line: max(1px, 0.1rem);
  --radius: 0.8rem;
  --inner-width: 112rem;
  --inner-gutter: 4rem;
}

/* PC は 1440px、SP は 375px のときに 1rem = 10px（リキッドレイアウト）。1440px より広い画面では大きくしない */
html {
  font-size: calc(100vw / 144);
}

@media (min-width: 1440px) {
  html {
    font-size: 10px;
  }
}

@media (max-width: 767px) {
  html {
    font-size: calc(100vw / 37.5);
  }

  :root {
    --inner-gutter: 2rem;
  }
}

body {
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--font-base);
  font-size: 1.5rem;
  line-height: 1.8;
}

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

/* ---------- レイアウト ---------- */

.inner {
  max-width: calc(var(--inner-width) + var(--inner-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--inner-gutter);
}

.header {
  padding-top: 6.4rem;
}

.header__title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.5;
}

.header__lead {
  margin-top: 0.8rem;
  color: var(--c-sub);
}

.main {
  padding-top: 4rem;
}

.footer {
  margin-top: 8rem;
  padding: 2.4rem 0 4rem;
  border-top: var(--line) solid var(--c-line);
}

.footer__text {
  font-size: 1.2rem;
  color: var(--c-sub);
}

/* ---------- 作品 ---------- */

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4.8rem 3.2rem;
}

@media (max-width: 767px) {
  .works {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }

  .header {
    padding-top: 4rem;
  }

  .main {
    padding-top: 3.2rem;
  }
}

.work__link {
  display: block;
}

.work__image {
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border: var(--line) solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-image-bg);
}

.work__name {
  margin-top: 1.6rem;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.5;
}

.work__link:hover .work__name,
.work__link:focus-visible .work__name {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.work__link:focus-visible {
  outline: 0.2rem solid var(--c-text);
  outline-offset: 0.4rem;
}

.work__summary {
  margin-top: 0.6rem;
  font-size: 1.4rem;
  color: var(--c-sub);
}

.work__meta {
  display: flex;
  justify-content: space-between;
  gap: 1.6rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--c-sub);
  font-variant-numeric: tabular-nums;
}

.work__url {
  min-width: 0;
  overflow-wrap: anywhere;
}
