@charset "UTF-8";

/*-------------------------------------------
全体
-------------------------------------------*/
section {
  margin: 0 auto 6em;
}
h3 {
  font-size: 2em;
  letter-spacing: .2em;
  margin-bottom: 1.5em;
}

/*-------------------------------------------
Profile
-------------------------------------------*/
.profile {
  display: flex;
  gap: 25px;
}
.profile-text {
  flex: 1 1 350px;
  padding-right: 2em;
}
.name {
  margin-bottom: 4em;
}
.profile-text span:first-child {
  font-size: 1.8em;
  line-height: 1.4;
  letter-spacing: .3em;
  font-weight: bold;
}
.profile-text span:last-child {
  letter-spacing: .35em;
}

.info {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1em 2em;
  margin-top: 1em;
}
.info dt {
  font-weight: bold;
}
.info dd {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  letter-spacing: .05em;
}

section:first-of-type img {
  flex: 1 1 300px;
  width: 100%;
  max-width: 350px;
  border-radius: 8px;
  object-fit: cover;
}

/* JS用 */
.profile img,
.profile .name,
.profile .info {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.profile img.show,
.profile .name.show,
.profile .info.show {
  opacity: 1;
  transform: translateY(0);
}

/*-------------------------------------------
Skill
-------------------------------------------*/
.skills-section h3 {
  text-align: center;
}
.skills-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5em;
}
.skill-box {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2em;
  border: 0.5px solid #333;
  box-shadow: 3px 3px 0 #c9cfd0;
  flex: 1;
  background:
    linear-gradient(to right, rgba(128, 197, 214, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 197, 214, 0.18) 1px, transparent 1px);
  background-size: 30px 30px;
  border-radius: 3px;
}
.skill-box h4 {
  font-size: 1.3em;
  color: #2c3e50;
  margin: 0 auto 1em;
  border-bottom: 1px dashed #80c5d6;
  text-align: center;
  padding-bottom: 0.5em;
}
.skill-box p {
  font-size: 15px;
  line-height: 2;
  letter-spacing: .05em;
}
.skill-box .tools {
  margin-top: 1em;
}
.skill-box .tools span {
  display: inline-block;
  background-color: #80c5d6;
  color: #fff;
  padding: 0.3em 0.8em;
  margin: 0.2em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

/* JS用 */
.skills-section h3,
.skill-box {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.skills-section h3.show,
.skill-box.show {
  opacity: 1;
  transform: translateY(0);
}

/*-------------------------------------------
Gallery
-------------------------------------------*/
.gallery-section {
  padding: 2rem;
  text-align: center;
}
.gallery-section h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.gallery-section p {
  color: #666;
  margin-bottom: 2rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/4;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.gallery img:hover {
  transform: scale(1.05);
}

/* JS用 */
.gallery-section h3,
.gallery li {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.gallery-section h3.show,
.gallery li.show {
  opacity: 1;
  transform: translateY(0);
}

/* モーダルスタイル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}
.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 20px;
  max-width: 50%;
  max-height: 90vh;
  border-radius: 3px;
  position: relative;
  text-align: center;
  overflow: auto;

  /* 横並びにしないために display:block（flexを使わない） */
  display: block;
}
.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto 1rem auto;
  display: block;
  float: none; /* 万が一 float がかかっていた場合に解除 */
}
.modal-content p {
  margin: 0.5rem 0 1rem;
  color: #444;
  font-size: 15px;
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  background-color: #80c5d6;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.modal-controls {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1rem;
}
.prev-btn,
.next-btn {
  border: none;
  font-size: 12px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
}
.prev-btn:hover,
.next-btn:hover {
  background-color: rgba(0,0,0,0.1);
}

/*-------------------------------------------
レスポンシブ
-------------------------------------------*/
@media (max-width: 1024px) {
  .skill {
    grid-template-columns: repeat(2, 1fr); /* タブレットでは2カラム */
  }
}

@media (max-width: 768px) {
  section {
    margin: 0 auto 3em;
  }
  /* プロフィールを縦並びに */
  .profile {
    flex-direction: column;
    align-items: center;
  }
  .profile-text {
    padding-right: 0;
  }
  .profile-text span {
    display: inline-block;
    margin-bottom: 10px;
  }
  .name {
    margin-bottom: 2em;
  }
  .info {
    grid-template-columns: 70px 1fr;
  }
  section:first-of-type img {
    max-width: 100%;
    margin-top: 2em;
  }

  /* スキルを1カラムに */
  .skills-section h3 {
    margin-bottom: 2rem;
  }
  .skills-grid {
    display: block;
  }
  .skill-box {
    margin-bottom: 20px;
  }
  
  .gallery-section {
    padding: 0;
  }

  /* モーダル */
  .modal {
    padding-top: 15px;
  }
  .modal-content {
    max-width: 90%;
    max-height: 100vh;
  }
  
}
