/*--------------------------------
 基本設定
---------------------------------*/
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;
  background-color: #fff;
  opacity: 0;
  transition: opacity 0.8s ease;
  line-height: 1.8;
}

body.loaded { opacity: 1; }

a {
  transition: opacity 0.3s ease;
  text-decoration: none;
  color: #6C7A89;
}

a:hover { opacity: 0.7; }

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
  border-style: none;
}

/*--------------------------------
 レイアウト
---------------------------------*/
.wrapper { padding-top: 73px; }

.section {
  padding: 100px 0;
  text-align: center;
}

.section:nth-of-type(odd) {
  background-color: #F5F6F7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/*--------------------------------
 見出し
---------------------------------*/
.title {
  font-size: 34px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 0.05em;
  color: #333;
  white-space: nowrap; /* ← 改行防止 */
  word-break: keep-all;
}

.sub-title {
  font-size: 15px;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 50px;
  color: #949593;
}

.lead {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 40px;
  color: #333;
}

/*--------------------------------
 ヘッダー
---------------------------------*/
.header {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: #6C7A89;
  box-shadow: 0 5px 10px -6px rgba(0,0,0,.1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
}

.header-logo a {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.05em;
}

.gnav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gnav-item:not(:last-child) { margin-right: 20px; }

.gnav-item a {
  position: relative;
  font-size: 13px;
  font-weight: bold;
  display: inline-block;
  padding: 5px 0;
  letter-spacing: 0.05em;
  color: #fff;
  transition: opacity 0.3s ease;
}

.gnav-item a:hover { opacity: 0.7; }

/*--------------------------------
 メインビジュアル
---------------------------------*/
.mv {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mv-container img {
  width: 80%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/*--------------------------------
 Works（常時文字表示・2列固定）
---------------------------------*/
.works-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  justify-items: center;
}

.works-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.works-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.works-img img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.works-item:hover .works-img img { transform: scale(1.08); }

.works-item .works-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-align: center;
  transition: background 0.3s ease;
}

.works-item:hover .works-text { background: rgba(0, 0, 0, 0.7); }

.works-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.works-info {
  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.05em;
}

/*--------------------------------
 Skill
---------------------------------*/
.skill-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 50px 60px;
}

.skill-item {
  display: flex;
  align-items: flex-start;
  width: 45%;
  max-width: 500px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}

.skill-img { width: 60px; margin-right: 20px; }

.skill-body { flex: 1; text-align: left; }

.skill-name { margin-bottom: 10px; }

.skill-text {
  font-size: 14px;
  line-height: 1.8;
}

/*--------------------------------
 About（PC：横並び／SP：縦並び）
---------------------------------*/
.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  gap: 50px;
}

.profile-img {
  width: 230px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.profile-img img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  display: block;
}

.profile-body {
  flex: 1;
  min-width: 280px;
}

.profile-body p {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.profile-body p:first-child {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 20px;
}

/*--------------------------------
 Contact
---------------------------------*/
.contact {
  text-align: center;
}

.contact a {
  display: inline-block;
  padding: 12px 30px;
  background-color: #6C7A89;
  color: #fff;
  border-radius: 30px;
  transition: background 0.3s ease;
}

.contact a:hover { background-color: #4c5b66; }

/*--------------------------------
 Works詳細ページ（中央寄せ）
---------------------------------*/
.works-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  background-color: #BFC5CA;
}

.works-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.works-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
  display: block;
  position: relative;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 1;
}

.hero-title {
  font-family: "Montserrat", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

/*--------------------------------
 スマホ対応（ヒーロータイトル改行防止）
---------------------------------*/
@media screen and (max-width: 767px) {
  .hero-title {
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
}

/*--------------------------------
 Works詳細：その他
---------------------------------*/
.works-summary,
.works-section,
.works-return {
  text-align: center;
}

.container.narrow {
  max-width: 800px;
  margin: 0 auto;
}

.works-section {
  padding: 80px 0;
}

.bg-light {
  background-color: #f5f5f5;
}

.works-info-list {
  list-style: none;
  padding: 25px 40px;
  margin: 25px auto;
  display: inline-block;
  text-align: left;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.works-info-list li {
  margin-bottom: 10px;
  font-size: 15px;
}

.works-link {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 28px;
  background-color: #6C7A89;
  color: #fff;
  border-radius: 30px;
  transition: background 0.3s ease;
}

.works-link:hover { background-color: #4c5b66; }

.return-link {
  display: inline-block;
  color: #6C7A89;
  font-weight: bold;
  border: 1px solid #6C7A89;
  padding: 12px 28px;
  border-radius: 25px;
  transition: all 0.3s ease;
  margin-bottom: 80px;
}

.return-link:hover {
  background-color: #6C7A89;
  color: #fff;
}

/*--------------------------------
 フッター
---------------------------------*/
.footer {
  padding: 30px;
  background-color: #333;
  color: #797979;
  text-align: center;
  font-size: 12px;
}

/*--------------------------------
 ページトップボタン
---------------------------------*/
.page-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #4c4c4c;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
}

.page-top:hover {
  background-color: #6C7A89;
  transform: translateY(-5px);
}

/*--------------------------------
 メディアクエリ
---------------------------------*/
@media screen and (max-width: 1024px) {
  .works-list { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .works-hero { height: 50vh; }
}

@media screen and (max-width: 767px) {
  body { font-size: 14px; }
  .wrapper { padding-top: 57px; }
  .section { padding: 60px 0; }
  .container { padding: 0 20px; }

  .title { font-size: 26px; margin-bottom: 20px; }
  .lead { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }

  .works-list { grid-template-columns: 1fr; gap: 25px; }
  .works-item { border-radius: 8px; }
}

/*--------------------------------
 ハンバーガーメニュー（スマホ用）
---------------------------------*/
.hamburger {
  display: none;
  position: relative;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.4s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

@media screen and (max-width: 767px) {
  .hamburger { display: block; }

  .header .container {
    padding: 15px 20px; /* ← ホームとメニューの間隔広げる */
  }

  .gnav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: rgba(108,122,137,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease;
    z-index: 1000;
  }

  .gnav.open { right: 0; }

  .gnav-list {
    flex-direction: column;
    gap: 25px;
  }

  .gnav-item a {
    color: #fff;
    font-size: 18px;
  }
}

/*--------------------------------
 Works詳細ページ（スマホ時のみ本文左寄せ）
---------------------------------*/
@media screen and (max-width: 767px) {
  .works-summary,
  .works-section {
    text-align: left;
  }

  .works-info-list {
    margin-left: 0;
  }

  .works-summary .lead,
  .works-section p {
    text-align: left;
    line-height: 1.8;
  }
}

/*--------------------------------
 スマホ対応：Skill 横並び＋幅広調整
---------------------------------*/
@media screen and (max-width: 767px) {

  .skill-list {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .skill-item {
    display: flex;
    flex-direction: row;   /* ← 横並びを維持 */
    align-items: flex-start;
    justify-content: flex-start;
    width: 95%;            /* ← 横幅を広げる（以前の90%→95%） */
    max-width: none;       /* ← 500px制限を解除 */
    padding: 18px 22px;    /* ← 内側余白を調整 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  }

  .skill-img {
    width: 55px;           /* ← 少しだけ小さくして余白を確保 */
    margin-right: 16px;
    flex-shrink: 0;
  }

  .skill-body {
    flex: 1;
    text-align: left;      /* ← 左寄せを維持 */
  }

  .skill-name {
    font-size: 15px;
    font-weight: 700;
    color: #6C7A89;
    margin-bottom: 8px;
  }

  .skill-text {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
  }
}

@media screen and (max-width: 767px) {
  .mv {
    display: flex;
    align-items: center;     /* セクション内で上下中央 */
    justify-content: center; /* 左右中央 */
    text-align: center;
    padding: 100px 0;        /* 白背景の高さを作る（上下余白） */
    background-color: #fff;
  }

  .mv-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .mv-container img {
    width: 80%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: block;
  }
}

.page-top .material-icons-outlined {
  color: #ccc;
}

.page-top:hover .material-icons-outlined {
  color: #fff;
}