html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none; /* 下線を消す */
  color: inherit; /* 親要素の色を継承（または好みの色を指定） */
  outline: none;
}
a:focus {
  outline: none;
}
/* ヘッダー */
header {
  position: fixed;
  width: 100%;
  height: auto;
  z-index: 1000;
}

/* ロゴ */
.logo-link {
  position: absolute;
  left: 40px;
  top: 30px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.1s;
  transition: transform 0.3s ease;
}

.header-logo {
  width: 40px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1); /* 白色に変換 */
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-link:hover .header-logo {
  transform: scale(1.1);
}

/* スクロール時のロゴの色変更 */
.logo-link.scrolled .header-logo {
  filter: brightness(0) invert(0); /* 黒色に変換 */
}

.menu ul {
  position: absolute;
  right: 40px;
  top: 30px;
  padding: 0;
  display: flex;
  gap: 40px;
  list-style: none;
}

.menu li {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  display: inline-block;
  padding: 0;
  background: none;
  position: relative;
}

.menu li a {
  color: #ffffff;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

/* スクロール時の色変更 */
.menu.scrolled li a {
  color: #333333;
}

.menu.scrolled li a::after {
  background-color: #333333;
}

/* アニメーション遅延 */
.menu li:nth-child(1) {
  animation-delay: 0.2s;
}

.menu li:nth-child(2) {
  animation-delay: 0.3s;
}

.menu li:nth-child(3) {
  animation-delay: 0.4s;
}

/* アニメーションの設定 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ホバー時の下線 */
.menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: #ffffff;
  transition: width 0.3s ease;
}

.menu li a:hover {
  color: #666666;
}

.menu li a:hover::after {
  width: 100%;
}
/* メイン */
main {
  padding-top: 80px;
}

/* Miku TAGAYA */
.home-title {
  font-size: 40px;
  line-height: 1.1;
  color: #ffffff;
  font-family: "Noto Serif JP", serif;
  font-weight: 400;
  letter-spacing: 10px;
  text-align: center;
  margin-top: 200px;
}

.home {
  min-height: calc(100vh + 80px);
  margin-top: -80px;
  background-image: url("images/background hana.png");
  background-size: cover; /* 画像全体を表示 */
  background-repeat: no-repeat; /* 繰り返さない */
  background-position: center center;
  background-attachment: fixed; /* パララックス効果 */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* iOS/iPadOSでbackground-attachment: fixedが効かない・画像が消える問題への修正 */
@media screen and (max-width: 1366px) {
  .home {
    background-attachment: scroll;
  }
}
@media screen and (min-width: 1440px) {
  .home {
    background-size: cover; /* 1440px以降の大画面用 */
  }
}

/* Canva風クリアアニメーション - ホワホワ浮き上がる */
@keyframes clearFloat {
  0% {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    filter: blur(10px);
  }
  50% {
    opacity: 0.5;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    filter: blur(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 名前のスタイル */
.home-title .name-line {
  display: block;
}

/* 1文字ずつふわふわアニメーション */
.home-title .char {
  display: inline-block;
  opacity: 0;
  animation: clearFloat 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
  /* Safariでの文字のモヤつき（ブラーの残存）を徹底的に防ぐ */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  will-change: transform, opacity, filter;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* ランダムな遅延時間を各文字に適用 */
.home-title .char:nth-child(1) {
  animation-delay: 0.1s;
}
.home-title .char:nth-child(2) {
  animation-delay: 0.3s;
}
.home-title .char:nth-child(3) {
  animation-delay: 0.5s;
}
.home-title .char:nth-child(4) {
  animation-delay: 0.2s;
}
.home-title .char:nth-child(5) {
  animation-delay: 0.4s;
}
.home-title .char:nth-child(6) {
  animation-delay: 0.6s;
}
.home-title .char:nth-child(7) {
  animation-delay: 0.15s;
}
.home-title .char:nth-child(8) {
  animation-delay: 0.35s;
}
.home-title .char:nth-child(9) {
  animation-delay: 0.25s;
}
.home-title .char:nth-child(10) {
  animation-delay: 0.45s;
}

/* 2行目の文字用（TAGAYAの6文字） */
.home-title .name-line:nth-child(2) .char:nth-child(1) {
  animation-delay: 0.7s;
}
.home-title .name-line:nth-child(2) .char:nth-child(2) {
  animation-delay: 0.5s;
}
.home-title .name-line:nth-child(2) .char:nth-child(3) {
  animation-delay: 0.9s;
}
.home-title .name-line:nth-child(2) .char:nth-child(4) {
  animation-delay: 0.6s;
}
.home-title .name-line:nth-child(2) .char:nth-child(5) {
  animation-delay: 1s;
}
.home-title .name-line:nth-child(2) .char:nth-child(6) {
  animation-delay: 0.8s;
}

/* Web Designerサブタイトル */
.home-title .subtitle {
  display: block;
  font-size: 18px;
  font-weight: 200;
  font-family: "Noto Serif JP", "Shippori Mincho", serif;
  letter-spacing: 5px;
  margin-top: 250px;
  color: #ffffff;
  opacity: 0;
  animation: clearFloat 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.9s;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-subheading {
  margin-top: 150px;
  padding: 20px 100px;
  text-align: left;
  color: rgb(5, 5, 59);
  font-size: 32px;
  font-family: "Cormorant Garamond", serif;
  position: relative;
  display: flex;
  align-items: center;
  scroll-margin-top: 100px;
}

/* 文字を横並びにする */
.site-subheading .letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(-30px);
  filter: blur(8px);
  transition: opacity 0.6s ease-out, 
              transform 0.6s ease-out,
              filter 0.6s ease-out;
}

/* 各文字に遅延を設定 */
.site-subheading.fade-in-up .letter:nth-child(1) { transition-delay: 0s; }
.site-subheading.fade-in-up .letter:nth-child(2) { transition-delay: 0.1s; }
.site-subheading.fade-in-up .letter:nth-child(3) { transition-delay: 0.2s; }
.site-subheading.fade-in-up .letter:nth-child(4) { transition-delay: 0.3s; }
.site-subheading.fade-in-up .letter:nth-child(5) { transition-delay: 0.4s; }
.site-subheading.fade-in-up .letter:nth-child(6) { transition-delay: 0.5s; }
.site-subheading.fade-in-up .letter:nth-child(7) { transition-delay: 0.6s; }

/* 表示時 */
.site-subheading.fade-in-up .letter {
  opacity: 1;
  transform: translateX(0);
  filter: none;
}

.site-subheading::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: rgb(5, 5, 59);
  margin-left: 30px;
}

/* Portal Category Selection */
.portal-section {
  padding: 100px 0 60px;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portal-container {
  display: flex;
  justify-content: center;
  gap: 80px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

.portal-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.portal-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(5, 5, 59, 0.12);
  background-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s ease,
              box-shadow 0.6s ease,
              background-color 0.6s ease;
  position: relative;
  overflow: hidden;
}

.portal-circle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.portal-text-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-en {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 400;
  color: #222222;
  letter-spacing: 2px;
  line-height: 1.3;
  transition: color 0.5s ease, transform 0.5s ease;
}

.portal-jp {
  font-family: "Noto Serif JP", serif;
  font-size: 10px;
  font-weight: 300;
  color: #777777;
  letter-spacing: 1px;
  margin-top: 10px;
  transition: color 0.5s ease, transform 0.5s ease;
}

.portal-hover-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 2;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgb(5, 5, 59);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover effects */
.portal-card-link:hover .portal-circle {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(5, 5, 59, 0.4);
  box-shadow: 0 20px 40px rgba(5, 5, 59, 0.08);
  background-color: rgba(255, 255, 255, 0.7);
}

.portal-card-link:hover .portal-circle::before {
  opacity: 1;
}

.portal-card-link:hover .portal-en {
  color: #000000;
  transform: translateY(-3px);
}

.portal-card-link:hover .portal-jp {
  color: #444444;
  transform: translateY(-3px);
}

.portal-card-link:hover .portal-hover-indicator {
  opacity: 0.8;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .portal-section {
    padding: 60px 0 40px;
  }
  .portal-container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  .portal-circle {
    width: 250px;
    height: 250px;
    padding: 20px;
  }
  .portal-en {
    font-size: 17px;
  }
  .portal-jp {
    font-size: 9px;
    margin-top: 8px;
  }
  .portal-hover-indicator {
    bottom: 25px;
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
}

/* Works - Japanese Style Layout */
.works {
  padding: 0 100px 80px;
}

/* スクロールアニメーション用の初期状態 */
.work-item {
  opacity: 0;
  transform: translateY(80px);
  filter: blur(10px);
  transition: opacity 1.0s ease-out, 
              transform 1.0s ease-out,
              filter 1.0s ease-out;
}

.arrow,
.about-arrow {
  opacity: 0;
  transform: translateY(80px);
  filter: blur(10px);
  transition: opacity 0.7s ease-out, 
              transform 0.7s ease-out,
              filter 0.7s ease-out;
}

/* 表示時のクラス - 霧が晴れるように */
.fade-in-up {
  opacity: 1;
  transform: translateY(0);
  filter: none;
}

.works-list {
  max-width: 1000px;
  margin: 70px auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.work-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

.work-item {
  display: flex;
  gap: 60px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
}

.work-item:last-child {
  border-bottom: none;
}

.work-item.reverse {
  flex-direction: row-reverse;
}

.work-item.reverse .work-info {
  padding-left: 0;
  padding-right: 20px;
}

.work-image {
  flex: 0 0 400px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease;
}

/* 画像コンテナにホバーした時だけ動く */
.work-image:hover {
  transform: translateX(10px);
}

.work-item.reverse .work-image:hover {
  transform: translateX(-10px);
}

.work-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item:hover .work-image img {
  transform: scale(1.05);
}

.work-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(44, 24, 16, 0.1);
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.work-item:hover .work-image::after {
  opacity: 0;
}

.work-info {
  flex: 1;
  padding-left: 20px;
}

.work-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
  color: #2c1810;
  margin-bottom: 15px;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.work-item:hover .work-title {
  color: #1a0f08;
}

.work-type {
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.work-skills {
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  color: #999;
  letter-spacing: 1px;
  line-height: 1.8;
}

/* 矢印 */
.arrow {
  text-align: center;
  margin-top: -70px;
}

.view-more {
  font-family: "Cormorant Garamond", serif;
  display: inline-block; /* テキストの幅に合わせる */
  font-size: 17px;
  color: #C48A00;
  position: relative; /* 擬似要素の位置調整 */
  transition: transform 0.3s ease-in-out;
}
.view-more::after {
  content: "";
  position: absolute;
  bottom: 0; /* テキストの下に表示 */
  left: 0;
  width: 0; /* 初期状態で線を非表示に */
  height: 1px; /* 線の高さ */
  background-color:#4e3f36;
  transition: width 0.3s ease-in-out; /* アニメーションの設定 */
}
.view-more:hover::after {
  width: 100%; /* ホバー時にテキストの下に線を引く */
}
.view-more:hover {
  transform: translateY(-5px); /* ホバー時にテキストが少し浮かぶ */
  transition-delay: 0.2s;
}
/* About Section */
.about-container {
  display: flex;
  gap: 220px;
  padding: 80px 100px;
  align-items: flex-start;
  flex-direction: row; /* デスクトップは横並び */
}

.about-text-english {
  width: auto;
  max-width: 460px;
  padding-left: 70px;
  order: 1; /* 英語を左に */
}

.about-text-japanese {
  flex-shrink: 0;
  order: 2; /* 日本語を右に */
}

.about-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 400;
  color: #2c1810;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.about-description {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  text-align: left;
}

.about-arrow {
  margin-top: 30px;
}

.about-text-japanese {
  flex-shrink: 0;
}

.vertical-text {
  writing-mode: vertical-rl;
  font-family: "Noto Serif JP", serif;
  font-size: 13px;
  line-height: 2.2;
  color: #2c1810;
  letter-spacing: 0.1em;
  height: auto;
  max-height: 360px;
  overflow: hidden;
}

.name-large {
  writing-mode: vertical-rl;
  display: inline-block;
  font-size: 16px !important;
  font-weight: 300;
  letter-spacing: 0.20em;
}

/* Contact Section - Form Layout */
.contact {
  margin-bottom: 100px;
}

.contact .site-subheading {
  margin-top: 80px;
}

.contact-wrapper {
  padding: 60px 100px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.contact-info-left {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 200px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: #2c1810;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.contact-item:hover {
  opacity: 0.5;
}

/* Contact Form */
.contact-form-container {
  flex: 1;
  max-width: 600px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: #2c1810;
  font-weight: 500;
}

.required {
  color: #d32f2f;
}

.form-group input,
.form-group textarea {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  padding: 12px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background-color: #fafafa;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8b4513;
  background-color: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.privacy-link {
  color: #2c1810;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.privacy-link:hover {
  color: #8b4513;
}

.submit-btn {
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 12px 35px;
  background-color: transparent;
  color: #2c1810;
  border: 2px solid #2c1810;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #413f3e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.2);
}
/* スマホ用 */
@media (max-width: 670px) {
  html,
  body {
    overflow-x: hidden;
  }
  .home {
    min-height: 100vh;
  }
  .home-title {
    font-size: 28px;
    line-height: 1.1;
    padding-left: 10px; /* letter-spacing分のズレを右に押し戻して完全な中央に */
    margin-top: 70px;
  }

  .home-title .subtitle {
    font-size: 14px;
    margin-top: 50px;
    letter-spacing: 2px;
    padding-left: 2px; /* サブタイトルのズレを調整 */
  }

  .mobile-hide {
    display: none;
  }

  .mobile-block {
    display: block;
    margin-top: 5px;
  }


  .menu ul {
    right: 20px;
    top: 20px;
    gap: 20px;
  }

  .menu li a {
    font-size: 12px;
    letter-spacing: 1.5px;
  }
  
  .logo-link {
    left: 20px;
    top: 20px;
  }
  
  .header-logo {
    width: 30px;
  }
  .intro-text {
    font-size: 19px;
    margin-top: 30%;
    margin-left: 14%;
  }
  .site-subheading {
    padding: 15px 20px;
    font-size: 24px;
    margin-top: 30px; /* 余計な空白（元150px）を削除 */
  }
  .about-container {
    flex-direction: column;
    padding: 40px 20px;
    gap: 40px;
  }
  
  .about-text-english {
    max-width: 100%;
  }
  
  .about-name {
    font-size: 20px;
  }
  
  .about-description {
    font-size: 14px;
  }
  
  .vertical-text {
    writing-mode: horizontal-tb;
    font-size: 12px;
    max-height: none;
  }

  .name-large {
    writing-mode: horizontal-tb;
    display: block;
    margin-bottom: 1em;
  }


  
  .works-grid {
    margin: 50px 30px;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(1, auto);
  }
  
  .view-more {
    text-align: center;
    font-size: 18px;
    display: block;
    margin: auto;
  }
  
  .contact-wrapper {
    padding: 40px 30px;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
  }
  
  .contact-info-left {
    align-items: flex-start;
    width: 100%;
  }
  
  .contact-item {
    font-size: 14px;
  }
  
  .contact-form-container {
    max-width: 100%;
    width: 100%;
  }
  
  .form-group label {
    font-size: 14px;
    text-align: left;
  }
  
  .form-group input,
  .form-group textarea {
    font-size: 14px;
  }
  
  .submit-btn {
    width: 100%;
    text-align: center;
  }

  /* About section responsive */
  .about-container {
    flex-direction: column;
    padding: 40px 30px;
    gap: 40px;
  }
  
  .about-text-english {
    max-width: 100%;
    padding-left: 0;
    order: 2; /* 英語を下に */
  }
  
  .about-text-japanese {
    order: 1; /* 日本語を上に */
  }
  
  .about-name {
    font-size: 20px;
  }
  
  .about-description {
    font-size: 13px;
    margin-bottom: 25px;

  }
  
  .vertical-text {
    writing-mode: horizontal-tb;
    font-size: 11px;
    max-height: none;
  }

  .name-large {
    writing-mode: horizontal-tb;
    display: block;
    margin-bottom: 1em;
  }


  /* Works section responsive */
  .works {
    padding: 0 30px 60px;
  }

  .works-list {
    gap: 50px;
    margin: 40px auto;
  }

  .work-item {
    flex-direction: column !important;
    gap: 30px;
    padding: 30px 0;
  }

  .work-item.reverse {
    flex-direction: column !important;
  }

  .work-image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .work-info {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .work-title {
    font-size: 22px;
  }

  .work-type {
    font-size: 13px;
  }

  .work-skills {
    font-size: 12px;
  }

  .site-subheading {
    margin-top: 80px;
  }

  .site-subheading::after {
    margin-left: 15px;
  }
  .view-more{
    font-size: 15px
  }
}

/* タブレット用 */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .home-title {
    font-size: 30px;
  }

  .home-title .subtitle {
    font-size: 15px;
    margin-top: 30px;
  }

  .site-subheading {
    padding: 20px 60px;
    font-size: 28px;
  }
.menu li a {
    font-size: 12px;
  
  }
  .works {
    padding: 0 60px 70px;
  }

  .works-list {
    gap: 60px;
  }

  .work-item {
    flex-direction: column;
    gap: 40px;
  }

  .work-item.reverse {
    flex-direction: column;
  }

  .work-image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .work-info {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .work-title {
    font-size: 24px;
  }

  .about-container {
    padding: 60px 50px;
    gap: 60px;
    flex-direction: column;
  }

  .about-text-english {
    padding-left: 0;
    max-width: 100%;
    order: 2; /* 英語を下に */
  }

  .about-text-japanese {
    order: 1; /* 日本語を上に */
  }
  
  .about-name {
    font-size: 22px;
  }
  
  .about-description {
    font-size: 14px;
  }
  
  .vertical-text {
    font-size: 13px;
    writing-mode: horizontal-tb;
    max-height: none;
  }
  
  .contact-wrapper {
    padding: 50px 60px;
    gap: 60px;
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-info-left {
    align-items: flex-start;
    width: 100%;
  }

  .contact-form-container {
    width: 100%;
    max-width: 100%;
  }

  .form-group label {
    text-align: left;
  }

  .name-large {
    writing-mode: horizontal-tb;
    display: block;
    margin-bottom: 1em;
  }

  .about-link {
    display: block;
    text-align: right;
    margin-top: 40px;
  }
}

/* 中型タブレット（iPad 縦向きなど 769px - 1024px） */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .about-container {
    padding: 60px 50px;
    gap: 40px;
    flex-direction: column; /* 縦向きはスタックさせてはみ出しを防ぐ */
    align-items: flex-start;
  }

  .about-text-english {
    max-width: 100%;
    padding-left: 0;
    order: 2;
  }

  .about-text-japanese {
    order: 1;
  }

  .vertical-text {
    writing-mode: horizontal-tb; /* 縦向き画面では横書きに戻して読みやすく */
    height: auto;
  }

  .name-large {
    writing-mode: horizontal-tb;
    display: block;
    margin-bottom: 1em;
  }
}

/* 大型タブレット横向き (iPad Air/Pro 横向き 1025px - 1366px) */
@media screen and (min-width: 1025px) and (max-width: 1366px) {
  /* iPad すべてのモデルに適用 */
  .intro-text {
    margin-top: 22%;
    margin-left: 30%;
    font-size: 20px;
    font-family: "Inria Serif", serif;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 1.2s;
  }
  .works-grid {
    margin: 50px 10px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(1, auto);
  }
  .about-container {
    padding: 60px 100px;
    gap: 150px;
    display: flex;
    flex-direction: row; /* 横幅に余裕がある時だけ横並び */
    justify-content: flex-start;
    max-width: 100%;
    margin: 0;
  }

  .about-text-english {
    flex: 0 1 440px;
    max-width: 440px;
    padding-left: 0;
  }
  
  .about-name {
    font-size: 22px;
  }
  
  .about-description {
    font-size: 14px;
    line-height: 1.8;
  }
  
  .vertical-text {
    font-size: 13px;
    height: 400px;
    max-height: none;
    overflow: visible;
  }
  
  .about-text-japanese {
    padding-right: 0;
    order: 2;
    flex: 0 0 auto;
  }
  
  .name-large {
    writing-mode: vertical-rl;
    display: inline-block;
    margin-bottom: 0;
  }

  
  .contact-wrapper {
    padding: 50px 50px;
    gap: 60px;
  }
  
  .contact-item {
    font-size: 15px;
  }
  
  .form-group label {
    font-size: 15px;
  }
}

/* デスクトップ 1367px以上 */
@media screen and (min-width: 1367px) {
  .name-large {
    writing-mode: vertical-rl;
    display: inline-block;
    margin-bottom: 0;
  }
}


