/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  font-family: Arial, sans-serif;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 989px;
  margin: 0 auto;
  padding: 0 24px;
  padding-bottom: 2rem;
  padding-top: 1rem;
  color: #525252;
  min-height: calc(100vh - 56px); /* ヘッダーの高さを考慮 */
}

@media (min-width: 768px) {
  .container {
    gap: 40px;
    padding-top: 2rem;
  }
}

/* 全ページ共通 */
.header-placeholder {
  height: 56px;
}

.heading-text {
  font-weight: 600;
  font-size: 20px;
}

/* ハンバーガーメニューのcss */
#menu {
  display: none;
  visibility: hidden;
  opacity: 0;
  transform: scale(0) translate(0, 100%); /* 初期状態を右下にオフセット */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#menu.show {
  background-color: #f5f5f5;
  width: 160px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 99%;
  right: 0;
  margin-top: 16px;
  z-index: 10;
  visibility: visible;
  opacity: 1;
  transform: scale(1) translate(0, 0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid #e0e0e0;
}

#menu.hide {
  opacity: 0; /* 非表示時は透明 */
  transform: scale(0); /* 非表示時は縮小 */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#menu.show li {
  font-weight: 400;
  font-size: 16px;
  color: #525252;
}

#menu.show a:hover {
  background-color: #d9f8ff;
}

#menu.show a:active {
  background-color: #ae9afe;
}

#menu a {
  display: block;
  padding: 10px 16px;
  color: #525252;
  text-decoration: none;
}

/* ダークモードのスタイル */
body.dark-mode {
  background-color: #272727;
  color: #ffffff;
}
#menu.show.dark-mode {
  background-color: #1e1e1e;
  border: solid 1px #595652;
}
#menu.show.dark-mode li {
  font-weight: 400;
  color: #fff0df;
}

#menu.dark-mode a {
  display: block;
  color: #dddddd;
}

#menu.show.dark-mode a:hover {
  background-color: #525252;
  color: #ffffff;
}

#menu.show.dark-mode a:active {
  background-color: #ae9afe;
}

#header-placeholder.dark-mode {
  background-color: #1e1e1e;
}

.hamburger-menu.dark-mode {
  background-color: #272727;
  border: 1px solid #808080;
}
.hamburger-menu.dark-mode:hover {
  background-color: #525252;
}
.hamburger-menu.dark-mode:active {
  background-color: #ae9afe;
}
.hamburger-menu.dark-mode:active .line {
  background-color: #ffffff;
}

.footerStyle.dark-mode {
  background-color: #1e1e1e;
}

.container.dark-mode {
  color: #ffffff;
}

.head-text.dark-mode {
  color: #ffffff;
}
.skills li.dark-mode {
  background-color: #525252;
  color: #ffffff;
}
.work-tag.dark-mode p {
  background-color: #5a5a5a;
}

.works-detail-link.dark-mode {
  background-color: #525252;
  padding: 8px 12px;
  border-radius: 8px;
  color: #ae9afe;
}

/* ここからaboutページ */
.heroWindow {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  max-width: 989px;
  margin: 16px auto;
}

.iframe-container {
  width: calc(100% - 32px); /* 余白を確保 */
  height: 220px; /* iframeの高さ */
  border-radius: 8px; /* 角を丸くする */
  overflow: hidden; /* はみ出した部分を隠す */
  margin: 0 16px; /* 左右の余白 */
}

.hero-iframe {
  width: 100%;
  height: 100%;
  border: none; /* 枠線を消す */
}

.heroImg {
  border-radius: 4px;
}
.helloBar {
  background-color: #000000;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
}

.experience-timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.experience-timeline-year {
  font-weight: 600;
  padding-right: 16px;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 300px;
}

.myName {
  font-size: 32px;
}

.profImg {
  max-width: 96px;
  height: 96px;
  cursor: pointer; /* クリックできることを示すカーソル */
  transition: transform 0.2s ease; /* 通常の変形のスムーズな遷移 */
}

/* プロフィール画像のアニメーション */
@keyframes boing {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.9); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.profImg-animate {
  animation: boing 0.7s ease;
}

.heroWindow iframe {
  width: 100%;
  height: 220px;
  border: none;
}

.skills ul {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.skills li {
  list-style: none;
  padding: 6px 20px;
  border-radius: 16px;
  background-color: #cecec7;
  color: #ffffff;
  font-size: 14px;
}

.favorites ul {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding-top: 16px;
}

/* ここからWorks*/
#works-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列 (スマホサイズ) */
  gap: 32px; /* アイテム間のスペース */
}

/* 大きい画面の場合は4列に変更 */
@media (min-width: 768px) {
  #works-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 16px;
  }

  .work-title {
    font-size: 20px;
  }
}
/* 小さい画面の場合は1列に変更 */
@media (max-width: 428px) {
  #works-wrap {
    grid-template-columns: repeat(1, 1fr); /* 1列に変更 */
  }

  .favorites ul {
    flex-wrap: wrap; /* スキルタグを折り返し表示 */
  }

  .skills li {
    margin-bottom: 8px; /* タグ間の縦方向の余白 */
  }

  .work-title {
    font-size: 18px; /* スマホでのタイトルサイズ調整 */
  }
}

.works-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  box-sizing: border-box;
  width: 100%; /* 幅を100%に変更 */
  max-width: 400px;
  margin: 0 auto;
}

.works-item img {
  border-radius: 8px;
  width: 100%; /* 画像の幅を親要素に合わせる */
  height: auto; /* 高さは自動調整 */
  object-fit: cover; /* アスペクト比を保ちながら表示 */
}

.work-title {
  font-weight: 600;
  font-size: 20px;
  word-break: break-word; /* 長い単語も折り返す */
}

/* works一覧ページでの説明文（アコーディオン/折りたたみ式） */
.work-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4; /* 最大4行まで表示 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  word-wrap: break-word; /* 長い単語も折り返す */
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.work-desc:after {
  content: "もっと見る ↓";
  display: block;
  text-align: center;
  padding-top: 5px;
  font-size: 12px;
  color: #ae9afe;
}

.work-desc.expanded {
  -webkit-line-clamp: unset;
  max-height: 1000px; /* 十分大きな値 */
}

.work-desc.expanded:after {
  content: "閉じる ↑";
}

/* works-detailページでの説明文（制限なし） */
.works-detail .work-desc {
  -webkit-line-clamp: unset;
  overflow: visible;
  text-overflow: unset;
  display: block;
  cursor: default;
}

.works-detail .work-desc:after {
  display: none;
}

/* スキルタグのスタイル調整 */
.favorites {
  width: 100%; /* 親要素の幅いっぱいに広げる */
}

.favorites ul.skills {
  display: flex;
  flex-direction: row;
  gap: 8px; /* タグ間の間隔を少し狭く */
  flex-wrap: wrap; /* 常に折り返し可能に */
  padding-top: 12px;
  justify-content: flex-start; /* 左揃え */
}

.skills li {
  list-style: none;
  padding: 4px 12px; /* パディングを小さく調整 */
  border-radius: 16px;
  background-color: #cecec7;
  color: #ffffff;
  font-size: 12px; /* スマホ用に少し小さく */
  white-space: nowrap; /* タグ内のテキストは折り返さない */
}

@media (min-width: 768px) {
  .skills li {
    padding: 6px 20px; /* デスクトップ用の元のパディング */
    font-size: 14px; /* デスクトップ用の元のフォントサイズ */
  }
}

/*ここからcontact*/
.contact-email {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  padding-top: 24px;
}

/* ここからContact_old */
.contact-input-wrap {
  display: flex;
  flex-direction: column;
}
.contact-input-wrap input {
  color: #525252;
  border: none;
  background-color: #f2f2f0;
  border-radius: 8px;
  height: 40px;
  margin-bottom: 12px;
  padding: 8px;
  font-size: 14px;
}

.contact-input-wrap label {
  color: #525252;
  font-size: 14px;
  padding-left: 8px;
  padding-bottom: 2px;
}

.contact-input-wrap textarea {
  border: none;
  background-color: #f2f2f0;
  border-radius: 8px;
  height: 40px;
  padding: 8px;
  height: 300px;
  font-size: 14px;
}

.head-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #525252;
  text-align: center;
}

.head-text h2 {
  font-size: 40px;
}

.button-submit {
  padding: 0 20px;
  height: 40px;
  background-color: #525252;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 140px;
  margin: 20px auto;
}

.button-submit :hover {
  background-color: #0056b3;
}

.work-section {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: left;
}

.work-section li {
  padding: 0 16px;
  height: 40px;
  line-height: 40px; /* 中央揃えのためにline-heightを設定 */
  background-color: #f5f5f5;
  font-weight: 600;
  border-radius: 8px;
}

.work-section li:active {
  background-color: #d7ccff;
  font-weight: 800;
}

/* ここからworkの作品ごとのページ */
#works-breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.backBtn {
  color: #ae9afe;
}

.work-header {
  font-size: 28px;
  font-weight: 600;
  padding-right: 12px;
}

.work-detail-title {
  font-size: 28px;
  font-weight: 600;
}

.work-tag {
  display: flex;
  gap: 8px;
}

.work-tag p {
  background-color: #efefef;
  padding: 0 2px;
}

.works-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.works-detail img {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
}

.works-detail-link {
  background-color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  color: #ae9afe;
}

/* ここからfooter */
.footerStyle {
  color: #adadad;
  text-align: center;
}
#footer-placeholder {
  margin-top: auto; /* フッターを下に押し下げる */
}

/* ここからheader */
.headerStyle {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  max-width: 989px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
img.kichitaText {
  padding-top: 8px;
}

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}

.hamburger-menu {
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 12px;
  align-items: center;
  border: 1px solid #e1dddd;
}

.line {
  width: 14px;
  height: 2px;
  background-color: #9d9d9d;
  border-radius: 2px;
}

.hamburger-menu:hover {
  background-color: #e9effc;
}

.hamburger-menu:active {
  background-color: #ae9afe;
}
