/* ===== HOME SECTION ===== */
.home-section {
  position: relative;
  height: auto;
  padding: 120px 20px;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-text);
  z-index: 0;
}

.home-section__content {
  position: relative;
  z-index: 2;
  padding: 0.5em 1em;
}

.home-section__title {
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
}

.home-section__sub-title {
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 背景アニメーション */
.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, var(--main-yellow-light), var(--main-yellow-deep));
  z-index: 1;
}

.home-bg__shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.home-bg__shapes li {
  position: absolute;
  display: block;
  list-style: none;
  width: clamp(12px, 3vw, 20px);
  height: clamp(12px, 3vw, 20px);
  background: rgba(255, 255, 255, 0.4);
  animation: animate 15s linear infinite;
  bottom: -150px;
  border-radius: 20%;
}

.home-bg__shapes li:nth-child(1) {
  left: 25%;
  width: clamp(30px, 8vw, 80px);
  height: clamp(30px, 8vw, 80px);
  animation-delay: 0s;
}

.home-bg__shapes li:nth-child(2) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 8s;
}

.home-bg__shapes li:nth-child(3) {
  left: 70%;
  width: 20px;
  height: 20px;
  animation-delay: 4s;
  animation-duration: 10s;
}

.home-bg__shapes li:nth-child(4) {
  left: 40%;
  width: clamp(24px, 6vw, 60px);
  height: clamp(24px, 6vw, 60px);
  animation-delay: 0s;
  animation-duration: 12s;
}

.home-bg__shapes li:nth-child(5) {
  left: 65%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
  animation-duration: 9s;
}

.home-bg__shapes li:nth-child(6) {
  left: 75%;
  width: clamp(40px, 10vw, 110px);
  height: clamp(40px, 10vw, 110px);
  animation-delay: 3s;
  animation-duration: 11s;
}

.home-bg__shapes li:nth-child(7) {
  left: 35%;
  width: clamp(50px, 10vw, 150px);
  height: clamp(50px, 10vw, 150px);
  animation-delay: 7s;
  animation-duration: 13s;
}

.home-bg__shapes li:nth-child(8) {
  left: 50%;
  width: 25px;
  height: 25px;
  animation-delay: 15s;
  animation-duration: 20s;
}

.home-bg__shapes li:nth-child(9) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: 2s;
  animation-duration: 14s;
}

.home-bg__shapes li:nth-child(10) {
  left: 85%;
  width: clamp(50px, 12vw, 150px);
  height: clamp(50px, 12vw, 150px);
  animation-delay: 0s;
  animation-duration: 9s;
}

@keyframes animate {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
  }
}

/* セクション共通 */
.section {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 40px 20px;
  background-color: #f9f9f9;
  box-sizing: border-box;
}

.section__title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin: 40px 0;
  color: #333;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  align-items: center;
  padding-left: 80px;
  padding-right: 40px;
  z-index: 1;
}

/* 共通ホワホワスタイル */
.section__title::before,
.section__title::after {
  content: "";
  position: absolute;
  border-radius: 20%;
  z-index: -1;
}

/* 手前（大）ホワホワ */
.section__title::before {
  width: 52px;
  height: 52px;
  left: 0;
  top: 8px;
  background: rgba(252, 176, 69, 0.25);
  transform: rotate(15deg);
}

/* 奥（小）ホワホワ */
.section__title::after {
  width: 34px;
  height: 34px;
  left: 28px;
  top: -18px;
  background: rgba(252, 176, 69, 0.15);
  transform: rotate(-10deg);
}

/* ===== WORKS SECTION ===== */
.works-section {
  padding: 20px;
}

.works-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  align-items: stretch;
  margin-top: 20px;
  box-sizing: border-box;
  justify-items: start; 
}

/* ===== PROJECTS SECTION ===== */

.projects-section {
  padding: 20px;
}

.projects-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  align-items: stretch;
  margin-top: 20px;
  box-sizing: border-box;
  justify-items: start; 
}

/* ===== SKILL SECTION ===== */
.skill-section {
  padding: 20px;
  width: 100%;
  max-width: 100%;
}

.skill-section__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.skill-category-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.4rem;
  text-align: left;
  gap: 8px;
  margin: 12px 0;
}

.category-icon {
  background-color: #f5b041;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
  font-size: 1.4rem;
  line-height: 1;
}

.skill-list__cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
  width: 100%;
  justify-content: start;
}

.skill-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  width: 100%;
  max-width: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  justify-self: start;
  align-self: start;
}

.skill-card__header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.skill-card__icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
}

.skill-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: left;
}

.skill-card__stars {
  letter-spacing: -2px;
}

.skill-star {
  color: #e6b800;
  font-size: 1rem;
  display: inline-block;
  line-height: 1;
  margin: 0 1px;
  cursor: default;
}

.skill-card__description {
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
  list-style: none;
  padding-left: 0;
}

.skill-card__description-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.4rem;
}

.list-icon {
  color: #f4511e;
  flex-shrink: 0;
  margin-top: 0.35em;
  font-size: 1rem;
}

.skill-rating-guide {
  display: inline-block;
  width: fit-content; 
  padding: 16px;
  margin-top: 12px;
  background-color: #f3f3f3;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.skill-rating-guide__title {
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.9rem;
}

.skill-rating-guide__list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.skill-rating-guide__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: start;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333;
}

.skill-rating-guide__stars {
  line-height: 1.4;
  display: inline-flex;
  gap: 1px;
}

.star-guide {
  color: #e6b800;
  font-size: 0.9rem;
  line-height: inherit;
  margin-right: 1px;
  letter-spacing: -0.03em;
}

.skill-rating-guide__label {
  line-height: 1.4;
}

.tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 1000;
  display: none;
  /* 初期は非表示 */
  pointer-events: none;
}

.tooltip.show {
  display: block;
}

/* ===== ABOUT SECTION ===== */
.about-section__title {
  text-transform: uppercase;
}

.about-section__wrapper {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 16px;
}

.about-section__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-section__name-text {
  font-size: 1.5rem;
  font-weight: bold;
}

.about-section__name-title {
  font-size: 1.1rem;
  color: #666;
}

.about-section__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-section__photo {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* ===== CONTACT SECTION ===== */
:root {
  --icon-size: 20px;
}

.contact-section__title {
  text-transform: uppercase;
}

.contact-section__text {
  margin-bottom: 16px;
  font-size: 1rem;
  color: #555;
}

.contact-section__email {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.contact-section__socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.contact-section__socials-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
  letter-spacing: 1px;
}

.contact-section__social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-section__social-link {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.contact-section__social-link:hover {
  text-decoration: underline;
}

.contact-icon {
  /* Font Awesome */
  font-size: var(--icon-size);
  /* サイズはフォントサイズで決定 */
  width: var(--icon-size);
  /* ←ラベル前の"箱"を固定幅にして位置を揃える */
  height: var(--icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  /* ベースラインの影響を排除 */
  line-height: 1;
  text-align: center;
  margin-top: 2px; /* アイコンを少し下げて画像の文字と揃える */
}

.qiita-icon {
  /* Qiita（SVG） */
  width: 1.4em;
  height: 1.4em;
  display: block;
  fill: #55C500;
}

.contact-section__link {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  font-size: 1em;
  color: #333;
  text-decoration: none;
}

.contact-section__email-image {
  height: var(--icon-size);
  width: auto;
  display: block;
  object-fit: contain;
}

.contact-section__socials a,
.contact-section__socials a:hover,
.contact-section__socials a:visited {
  text-decoration: none;
  color: #333;
}

/* ==========================
     レスポンシブ対応
========================== */
/* Tablet（768px〜1024px） - タブレット */
@media (min-width: 768px) and (max-width: 1023px) {
  .section {
    padding: 30px 16px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .section__title {
    padding-left: 60px;
    margin: 30px 0;
  }

  .section__title::before {
    width: 42px;
    height: 42px;
  }

  .section__title::after {
    width: 28px;
    height: 28px;
    left: 22px;
    top: -14px;
  }

  .projects-grid {
    padding: 0 16px;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .about-section__wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .about-section__photo {
    max-width: 250px;
  }

  .skill-section {
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
  }

  .skill-section__content {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .skill-list__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .skill-card {
    width: 100%;
    height: auto;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .skill-category {
    width: 100%;
    max-width: 100%;
  }

  .skill-rating-guide {
    max-width: 100%;
    margin-left: 0;
  }

  .contact-section__text {
    padding: 0 8px;
  }

  .contact-section__email {
    padding: 0 8px;
  }
}

/* Mobile（〜767px） */
@media (max-width: 767px) {
  .section {
    padding: 20px 12px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .section__title {
    padding-left: 50px;
    margin: 20px 0;
  }

  .section__title::before {
    width: 36px;
    height: 36px;
    top: 6px;
  }

  .section__title::after {
    width: 24px;
    height: 24px;
    left: 18px;
    top: -12px;
  }

  .projects-grid,
  .works-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 12px;
    margin-top: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .about-section__wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .about-section__photo {
    max-width: 200px;
    margin-bottom: 4px;
  }

  .about-section__content {
    gap: 16px;
    text-align: center;
  }

  .about-section__header {
    margin-bottom: 8px;
  }

  .about-section__name {
    margin-bottom: 8px;
  }

  .about-section__name-text {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 8px;
  }

  .about-section__name-title {
    font-size: 1rem;
    display: block;
    margin-bottom: 0;
  }

  .about-section__history {
    font-size: 0.95rem;
    padding: 0 8px;
  }

  .about-section__history p {
    line-height: 1.7;
    margin: 0;
  }

  .about-section__history p + p {
    margin-top: 1.2rem;
  }

  .skill-category-title {
    font-size: 1.2rem;
    margin: 10px 0;
  }

  .skill-section {
    padding: 20px 12px;
  }

  .skill-section__content {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .skill-list__cards {
    grid-template-columns: 1fr;
    justify-content: start; 
    gap: 36px;
    padding: 16px 12px;
    width: 100%;
    max-width: 100%;
    align-items: start; 
  }

  .skill-card {
    width: 100%;
    height: auto !important;
    max-width: 100%;
    padding: 12px 8px;
    min-width: 0;
    box-sizing: border-box;
  }

  .skill-category {
    width: 100%;
    max-width: 100%;
  }

  .skill-card__title {
    font-size: 1.1rem;
  }

  .skill-card__description {
    font-size: 0.9rem;
  }

  .skill-rating-guide {
    max-width: 100%;
    margin-left: 0;
    padding: 12px 8px;
  }

  .star-guide {
    font-size: 0.8rem;
  }

  .skill-rating-guide__label {
    font-size: 0.8rem;
  }

  .contact-section__text {
    font-size: 0.9rem;
    padding: 0 8px;
  }

  .contact-section__email {
    font-size: 1rem;
    flex-wrap: wrap;
    padding: 0 8px;
  }

  .contact-section__social-item {
    gap: 16px;
    flex-wrap: wrap;
  }

  .contact-section__social-link {
    font-size: 0.9rem;
  }

  .home-bg__shapes li {
    animation-duration: 10s;
  }
}
