@charset "UTF-8";

/* =========================
   Projects page
========================= */

.projects-main {
  padding-top: 76px;
  padding-bottom: 64px;
  width: 100%;
}

/* Projects title */
.projects-heading {
  font-size: 28px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 72px;
    letter-spacing: 0.1em;
}
@media (max-width: 768px) {
    .projects-heading {
        font-size: 24px;
    }
}

/* =========================
   Category navigation
========================= */

.projects-categories {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  width: 100%;
  max-width: 1024px;
  margin: 0 auto 48px;
  box-sizing: border-box;
}

.projects-category {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: auto;
  min-height: 40px;
  padding: 7px 12px;

  box-sizing: border-box;
  font-size: 16px;
  white-space: nowrap;

  font-family: var(--font-cantarell);
  border: 1px solid var(--color-line);
  border-radius: 50px;
  color: var(--color-text);
  background-color: transparent;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.projects-category:hover {
  background-color: var(--color-hover);
}

.projects-category.is-active {
  background-color: var(--color-line);
}

/* =========================
   Projects grid
========================= */

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

  position: relative;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

/* Project item */
.projects-item {
  min-width: 0;
}

.projects-item.is-hidden {
  display: none;
}

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

  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  align-items: start;
}

.projects-item {
  min-width: 0;
}

.projects-figure {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}

.projects-figure > img,
.projects-figure > video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* =========================
   Project image / video
========================= */

.projects-figure {
  width: 100%;
  margin: 0;
  background-color: transparent;
}

.projects-figure > img,
.projects-figure > video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: transparent;
}

.projects-figure {
  width: 100%;
  margin: 0;
  background-color: transparent;
}

.projects-figure > img,
.projects-figure > video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
/* Project image hover */
.projects-figure a {
  position: relative;
  display: block;
  overflow: hidden;
}


/* 控えめなホバー */
.projects-figure a {
  display: block;
}

.projects-figure a img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.35s ease;
}

.projects-figure a:hover img {
  opacity: 0.78;
}
/* =========================
   Masonry Grid
========================= */

.projects-grid {
  position: relative;
  display: block;

  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.projects-item {
  position: absolute;
  top: 0;
  left: 0;

  box-sizing: border-box;
  min-width: 0;
}

.projects-item.is-hidden {
  display: none;
}

@media screen and (max-width: 768px) {
  .projects-grid {
    width: 100%;
    padding-inline: 16px;
    box-sizing: border-box;
  }
}

/* =========================
   Image / Video
========================= */

.projects-figure {
  width: 100%;
  margin: 0;
  background: transparent;
}

.projects-figure > img,
.projects-figure > video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Projects：スクロール時のフェードイン */
.projects-figure {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.projects-figure.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Project caption
========================= */

.projects-caption {
  padding-top: 12px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.7;
}

.projects-caption h2 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 400;
}

.projects-caption p {
  margin: 0;
}

.projects-caption .projects-year {
  margin-bottom: 0px;
  font-family: var(--font-cantarell);
  font-size: 14px;
}
/* =========================
   Youtube Link
========================= */
.youtube-link i {
    font-size: 16px;
    margin-left: 5px;
}

.youtube-link:hover i {
    opacity: 0.7;
}
.youtube-link .bi-youtube,
.bi-box-arrow-up-right {
  color: #A8A8A8;
}
/* =========================
   Responsive
========================= */

@media screen and (max-width: 1024px) {
  .projects-categories {
    gap: 12px;
    padding-inline: 20px;
  }

  .projects-category {
    width: auto;
    min-width: 150px;
  }

  .projects-grid {
    max-width: 900px;
    padding-inline: 20px;
    gap: 32px 20px;
  }
}

@media screen and (max-width: 768px) {
  .projects-main {
    padding-top: 60px;
    padding-bottom: 48px;
  }

  .projects-categories {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    padding-inline: 16px;
  }

  .projects-category {
    min-width: 0;
    min-height: 36px;
    padding: 6px 16px;
    font-size: 14px;
  }

  .projects-grid {
  grid-template-columns: 1fr;
  gap: 28px 0;
  padding-inline: 16px;
}

  .projects-caption {
    padding-top: 9px;
    font-size: 16px;
    line-height: 2;
  }

  .projects-caption h2 {
    font-size: 16px;
    margin-bottom: 0;
  }

  .projects-caption .projects-year {
    font-size: 14px;
    margin-top: 5px;
  }
}

@media screen and (max-width: 420px) {
  .projects-grid {
    gap: 24px 10px;
  }

  .projects-categories {
    gap: 8px;
  }
}

/* =========================
   More Detail：
========================= */
.more-detail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  /* padding: 14px 0; */
  /* border-bottom: 1px solid #c9c6be; */
  color: #333;
  text-decoration: none;
}

/* 文字部分だけに下線 */
.more-detail__text {
  font-size: 16px;
  font-weight: 400;
  border-bottom: 1px solid #c9c6be;
  /* padding-bottom: 3px; */
}

/* 矢印 */
.more-detail__arrow {
  font-size: 16px;
  color: #333;
  transition: transform 0.35s ease;
}

.more-detail:hover .more-detail__arrow {
  transform: translateX(4px);
}

.more-detail__text:hover {
  color: var(--color-line-dark);
}

@media screen and (max-width: 768px) {
  .more-detail {
    gap: 8px;
    /* padding: 12px 0; */
  }

  .more-detail__text {
    font-size: 16px;
    /* padding-bottom: 2px; */
  }

  .more-detail__arrow {
    font-size: 14px;
  }
}
/* PC：ホバー時のみ年・説明文を表示 */
@media screen and (min-width: 1025px) {

  .projects-caption .projects-year,
  .projects-caption > p:not(.projects-year) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* 作品カード全体にホバーしたとき */
  .projects-item:hover .projects-caption .projects-year,
  .projects-item:hover .projects-caption > p:not(.projects-year) {
    opacity: 1;
    visibility: visible;
  }
}
/* @media screen and (min-width: 769px) {
  .projects-caption .projects-year,
  .projects-caption > p:not(.projects-year) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .projects-item:hover .projects-caption .projects-year,
  .projects-item:hover .projects-caption > p:not(.projects-year) {
    opacity: 1;
    visibility: visible;
  }
} */
/* =========================
  Touch Device：Link dotted underline
========================= */

@media screen and (max-width: 1024px) {
/* @media (hover: none) and (pointer: coarse) { */
/* 通常時：リンクを控えめに示す */
.projects-item a:has(h2) {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
border-bottom: none;
text-decoration: underline;
text-decoration-style: dotted;
text-decoration-color: rgba(100, 100, 100, 0.3);
text-decoration-thickness: 1.5px;
text-underline-offset: 4px;
  transition: color 0.35s ease;
}

/* ホバー時 */
.projects-item a:has(h2):hover {
  color: var(--color-line-dark);
}

}