body {
  font-family: "Montserrat", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: #333;
}

a {
  transition: opacity 0.3s;
  text-decoration: none;
  color: #1ca9e3;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
  border-style: none;
}

.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

/*--------------------------------
 レイアウト
---------------------------------*/
/*.wrapper {                    ＊ヘッダーの位置を変えるため不要
  padding-top: 73px;
}*/

.section {
  padding: 90px 0;
}

.section:nth-of-type(odd) {
  background-color: #f7f7f7;
}

.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 40px;
}

/*--------------------------------
 見出し
---------------------------------*/
.title {
  font-size: 34px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: 0.05em;
  color: #333;
}

.lead {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
}

/*--------------------------------
 メインビジュアル
---------------------------------*/
.mv {
  position: relative;
  height: 100vh;
  overflow: hidden; /* ← 追加 */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mv-container {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover; /* はみ出さずに、画面いっぱいに収める */
}

.mv-container img {
  display: block; /* ← 追加！ */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mv-title {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  bottom: 0;
  right: 15%;
  margin: auto 0;
}

.mv-title span {
  display: block;
  font-size: 8vw;
  font-weight: bold;
}

.mv-title span:nth-child(1) {
  transform: translateX(-60px); /* ← DESIGNを左へ20px移動 */
}

.mv-title span:nth-child(2) {
  transform: translateX(0px); /* ← ×はそのまま */
}

.mv-title span:nth-child(3) {
  transform: translateX(60px); /* ← CODINGを右へ20px移動 */
}

/*--------------------------------
ヘッダー
---------------------------------*/
.header {
  position: absolute;
  top: 0;
  left: 5%;
  height: 100%;
  z-index: 10;
  /* transform: translateY(-50%); */
}

.header .container {
  display: flex;
  flex-direction: column; /* ロゴとメニューを縦に並べる */
  align-items: flex-start; /* 左揃えにする */
  padding: 20px 40px;
}

.header-logo {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.2;
  margin-right: 20px;
  letter-spacing: 0.05em;
}

.header-logo a {
  color: #333;
}

.gnav {
  position: fixed;
  bottom: 10%;
}

.home .gnav {
  position: absolute;
  bottom: 10%;
}

.gnav-list {
  display: flex;
  flex-direction: column; /* メニューを縦に並べる */
  align-items: flex-start; /* 左揃え */
  list-style: none;
  gap: 20px; /* 項目の間にスペースを作る*/
  margin-top: 5vh; /* メニュー自体の位置調整 */
}

.gnav-item:not(:last-child) {
  margin-right: 0px; /* ← 横の余白を削除 */
}

.gnav-item a {
  position: relative;
  font-size: 23px;
  font-weight: bold;
  display: inline-block;
  padding: 5px 0;
  transition: 0.3s;
  letter-spacing: 0.05em;
  color: #333;
}
.gnav-item a:after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  content: "";
  transition: 0.3s;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  background-color: #333;
}

.gnav-item a:hover:after {
  width: 100%;
}

/*--------------------------------
 Works
---------------------------------*/
.works {
  position: relative;
}

.works::before,
.works::after {
  content: "";
  position: absolute;
  opacity: 0.1;
  z-index: 0;
}

.works::before {
  top: 0;
  right: 5vw;
  width: 20vw;
  height: 20vw;
  background: url(../img/back/back1.png) no-repeat center center/contain;
  transform: rotate(-20deg);
}

.works::after {
  bottom: 0;
  left: 5vw;
  width: 10vw;
  height: 10vw;
  background: url(../img/back/back2.png) no-repeat center center/contain;
  transform: rotate(-10deg);
}

.works .container {
  position: relative;
  z-index: 1;
}

.works-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.works-item {
  width: 31.74603%;
  margin-right: 1.5873%;
  margin-bottom: 40px;
  color: #333;
  position: relative;
  top: 0;
}

.works-item:nth-child(4),
.works-item:nth-child(5) {
  width: 40%;
}

.works-item:nth-of-type(3n) {
  margin-right: 0;
}

.works-item:hover {
  opacity: 0.9;
}

.works-img img {
  border: 1px solid #e6e6e6;
}

.works-name {
  font-size: 12px;
  font-weight: bold;
  margin-top: 8px;
}

.works-info {
  font-size: 10px;
  margin-top: 5px;
}

/*--------------------------------
 Skill
---------------------------------*/
.skill-list {
  display: block; /* 縦並び状態 */
}

.skill-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 50px;
}

.skill-img {
  width: 60px;
  margin-right: 20px;
}

.skill-body {
  flex: 1;
}

.skill-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.skill-text {
  font-size: 14px;
  line-height: 1.8;
}

/*--------------------------------
 About
---------------------------------*/
.profile {
  display: flex;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}
.profile-img {
  width: 20%;
  margin-right: 30px;
  border-radius: 50%;
}
.profile-img img {
  border-radius: 50%;
}
.profile-body {
  flex: 1;
}

.profile-body p {
  font-size: 15px;
  line-height: 1.8;
}

.profile-body p:not(:last-child) {
  margin-bottom: 30px;
}

/*--------------------------------
 Contact
---------------------------------*/
.contact {
  text-align: center;
}

.contact-item:not(:last-child) {
  margin-right: 10px;
}

.contact-text {
  margin-top: 10px;
}
/*--------------------------------
 ページトップ
---------------------------------*/
.page-top {
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  background-color: #4c4c4c;
}

.page-top .material-icons-outlined {
  vertical-align: bottom;
  color: #fff;
}

/*--------------------------------
 フッター
---------------------------------*/
.footer {
  padding: 30px;
  background-color: #333;
}

.copyright {
  font-size: 10px;
  text-align: center;
  color: #797979;
}

/*--------------------------------
 下層：Worksページ
---------------------------------*/
.article {
  padding: 80px 0;
}

.article-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.article-title {
  margin-bottom: 30px;
  text-align: center;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  margin-bottom: 80px;
}

.article-body h3 {
  position: relative;
  font-size: 18px;
  margin-bottom: 5px;
  padding-left: 1em;
}

.article-body img {
  width: 100%;
  height: auto;
}

.article-body h3:not(:first-child) {
  margin-top: 50px;
}

.article-body h3::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  border-radius: 3px;
  background-color: #333;
}

.article-body p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.home-link {
  text-align: center;
}

/*media Queries 767
----------------------------------------------------*/
@media screen and (max-width: 767px) {
  body {
    font-size: 14px;
  }

  .pc-only {
    display: none;
  }

  .sp-only {
    display: block;
  }

  /* 見出し */
  .title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .lead {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
  }

  /* レイアウト */
  /* .wrapper {
    padding-top: 57px;
  } */

  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 20px;
  }

  .header {
    height: 40vh;
  }

  /* ヘッダー */
  .header .container {
    padding: 15px;
  }

  .header-logo {
    font-size: 15px;
    margin-right: 15px;
  }

  .under .gnav {
    position: fixed;
    bottom: 0;
    left: 0;
    background: #fff;
    width: 100%;
    box-shadow: 0 -5px 10px 0px #00000012;
  }

  .under .gnav-list {
    flex-direction: row;
    justify-content: center;
    margin: 1rem 0;
  }

  .gnav-item:not(:last-child) {
    margin-right: 10px;
  }

  .gnav-item a {
    font-size: 10px;
  }

  .gnav-item a:after {
    display: none;
  }

  /*  メインビジュアル */
  .mv {
    height: 40vh;
  }

  /* .mv-container {
    padding: 0 20px;
  } */

  .mv-title {
    font-size: 30px;
  }
  .mv-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .mv-text {
    top: 75%;
    font-size: 14px;
    line-height: 1.7;
  }

  /* Works */
  .works-name {
    font-size: 12px;
  }

  .works-info {
    margin-top: 3px;
  }

  .works-list {
    justify-content: space-between;
  }

  .works-item {
    flex: 0 0 48%;
    margin-right: 0;
    margin-bottom: 30px;
  }

  /* Skill */
  .skill-list {
    display: block;
    margin-bottom: 0;
  }

  .skill-item {
    width: 100%;
    margin-bottom: 35px;
  }

  .skill-item:last-child {
    margin-bottom: 0;
  }

  .skill-name {
    margin-bottom: 5px;
  }

  .skill-text {
    font-size: 13px;
    line-height: 1.7;
  }

  /* About */
  .profile {
    display: block;
  }
  .profile-img {
    width: 150px;
    margin: 0 auto;
    margin-bottom: 25px;
  }

  .profile-body p {
    font-size: 14px;
    line-height: 1.7;
  }

  .profile-body p:not(:last-child) {
    margin-bottom: 20px;
  }

  /* フッター */
  .footer {
    padding: 20px;
  }

  /* 下層ページ */
  .article {
    padding: 50px 0;
  }

  .article-body h3 {
    font-size: 16px;
    padding-left: 0.8em;
  }

  .article-body h3:not(:first-child) {
    margin-top: 30px;
  }

  .article-body p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
  }
}
/* 以下skill追加内容 */
.skill-star {
  position: relative;
  width: 600px;
  height: 600px;
  margin: 0 auto;
}

.skill-star .skill-item {
  position: absolute;
  width: 150px;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-sizing: border-box;
}

.skill-icon {
  width: 74px; /* スキルアイコンの大きさ */
  height: auto;
  margin-bottom: 1px;
}

.skill-name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.skill-text {
  font-size: 12px;
  line-height: 1.6;
}

/* 奇数番スキルのみ色を変える */
.skill-item:nth-child(odd) {
  background: linear-gradient(135deg, #cceeff, #e6f7ff);
}

.skill-name {
  font-size: 30px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  padding: 4px 0;
  margin-top: -7px;
  margin-left: 12px;
  background: linear-gradient(to right, #2196f3, #21cbf3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.skill-text {
  font-size: 14px;
  color: #333;
  margin-top: 42px;
  padding: 0 6px;
  text-align: center;
  line-height: 1.8;
  font-weight: bold;
}

/*
.skill-item:hover .skill-name {
  transform: translateY(-2px);
  opacity: 0.9;
}

.skill-item:hover .skill-text {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.85);
}
*/

.works-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.works-img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.decorated-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 34px;
  font-weight: bold;
  line-height: 1.2;
  color: #333;
  position: relative;
}

/*SKILL文字デコレーション*/
.title-icon {
  width: 30px;
  height: auto;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.title-icon.left {
  transform: rotate(-5deg);
}

.title-icon.right {
  transform: rotate(5deg);
}

.gnav-item a {
  color: #333;
  transition: all 0.3s ease;
  text-decoration: none;
}

.gnav-item a:hover {
  background: linear-gradient(to right, #2196f3, #21cbf3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* Firefox用（optional） */
  text-fill-color: transparent;
}

/*WORKS文字デコレーション*/
.decorated-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 32px;
  font-weight: bold;
  position: relative;
}

.title-icon {
  width: 32px;
  height: auto;
}

.title-icon.left {
  margin-right: 8px;
}

.title-icon.right {
  margin-left: 8px;
}

/*メインビジュアルフェードイン*/
.mv {
  opacity: 0;
  transform: translateY(30px); /* 下からの演出 */
  animation: fadeInUp 1.2s ease-out forwards;
  animation-delay: 0.3s; /* ページ表示後に少し間をおく */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.works-section {
  position: relative;
  padding: 80px 20px;
}

.works-deco {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(33, 150, 243, 0.15);
  border-radius: 50%;
  z-index: -1;
}

.works-deco-left {
  top: 20px;
  left: 5%;
}

.works-deco-right {
  bottom: 20px;
  right: 5%;
}

@media (prefers-reduced-motion: no-preference) {
  .works-deco {
    animation: float 4s ease-in-out infinite;
  }
  @keyframes float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(10px);
    }
  }
}

/*背景にアイコンをちりばめる　難航*/
.sky-background {
  position: relative;
  z-index: 0;
}

.sky-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("img/back/back1.png"), url("img/back/back2.png"), url("img/back/back3.png"), url("img/back/back4.png"), url("img/back/back5.png"), url("img/back/back6.png"),
    url("img/back/back7.png"), url("img/back/back8.png"), url("img/back/back9.png"), url("img/back/back10.png");
  background-repeat: no-repeat;
  background-size: 80px;
  background-position: 5% 10%, 20% 30%, 40% 20%, 60% 40%, 80% 15%, 15% 70%, 35% 60%, 55% 80%, 75% 65%, 90% 50%;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

@media screen and (max-width: 767px) {
  .skill-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .skill-img {
    flex-shrink: 0;
    width: 50px;
  }

  .skill-body {
    display: flex;
    flex-direction: column; /* 横並びを解除して縦に並べる */
    text-align: left;
  }

  .skill-name {
    margin: 0 0 6px 0;
    font-size: 16px;
  }

  .skill-text {
    margin-top: 41px; /* ← ここで縦の余白を調整 */
    font-size: 15px;
    line-height: 1.6;
    text-align: left; /* ← 左揃えにする（日本語文はこれが自然） */
    padding-left: 8px; /* ← 必要に応じてインデントを追加 */
  }
}

.skill-icon-deco {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 60px;
  opacity: 0.07;
  pointer-events: none; /* マウスイベントを無効化 */
}

.skill,
.about {
  position: relative;
  z-index: 0;
}

.skill::before,
.skill::after,
.about::before,
.about::after {
  content: "";
  position: absolute;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.works::before {
  top: 0;
  right: 5vw;
  width: 20vw;
  height: 20vw;
  background: url(../img/back/back3.png) no-repeat center center/contain;
  transform: rotate(-20deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 0s;
}

.works::after {
  bottom: 0;
  left: 5vw;
  width: 10vw;
  height: 10vw;
  background: url(../img/back/back4.png) no-repeat center center/contain;
  transform: rotate(-10deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}

.skill::before {
  top: 0;
  right: 5vw;
  width: 18vw;
  height: 18vw;
  background: url(../img/back/back5.png) no-repeat center center/contain;
  transform: rotate(-15deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 0s;
}

.skill::after {
  bottom: 0;
  left: 5vw;
  width: 12vw;
  height: 12vw;
  background: url(../img/back/back6.png) no-repeat center center/contain;
  transform: rotate(10deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}

.about::before {
  top: 10%;
  right: 3vw;
  width: 25vw;
  height: 15vw;
  background: url(../img/back/back7.png) no-repeat center center/contain;
  transform: rotate(-10deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.about::after {
  bottom: 5%;
  left: 8vw;
  width: 8vw;
  height: 8vw;
  background: url(../img/back/back8.png) no-repeat center center/contain;
  transform: rotate(20deg);
  animation: float 4s ease-in-out infinite;
  animation-delay: 1.2s;
}

/* コンテンツ前面に */
.skill .container,
.about .container {
  position: relative;
  z-index: 1;
}

.works-deco {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(33, 150, 243, 0.15);
  border-radius: 50%;
  z-index: -1;
}

.works-deco-left {
  top: 20px;
  left: 5%;
}

.works-deco-right {
  bottom: 20px;
  right: 5%;
}

.works-deco-top-center {
  top: 10%;
  left: 45%;
}

.works-deco-bottom-left {
  bottom: 9%;
  left: 10%;
}

@media (prefers-reduced-motion: no-preference) {
  .works-deco {
    animation: float 4s ease-in-out infinite;
  }

  .works-deco-top-center {
    animation-delay: 1s;
  }

  .works-deco-bottom-left {
    animation-delay: 0.5s;
  }

  .works-deco-right {
    animation-delay: 1.5s;
  }

  @keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(10px);
    }
  }
}

@media screen and (max-width: 768px) {
  .gnav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }

  .gnav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    margin: 0;
  }

  .gnav-item a {
  font-size: 14px;
  text-decoration: none;
  color: #333;
  padding: 10px 5px;
  transition: all 0.2s ease;
  display: inline-block;
  }

  /* 押している間に色とスケールを変化 */
  .gnav-item a:active {
  background-color: #e0f2ff;
  transform: scale(0.95);
  border-radius: 6px;
  }

}

.works-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;  /* 画像比率をmain_visual.pngと同等にする場合 */
  object-fit: cover;    /* 中央に切り取りつつフィット */
  border-radius: 8px;   /* 必要に応じて角丸 */
}

@media screen and (max-width: 768px) {
  body.home .gnav {
    background-color: transparent;
    box-shadow: none;
  }
}


