@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Noto+Sans+JP:wght@400;700&display=swap");

:root {
  --main-text-color: #333;
  --header-bg-color: #fff;
  --menu-link-color: #555;
  --hero-text-color: #fff;
  --accent-color: #007bff;
  --header-height: 80px;
  --secondary-color: #f4f4f4;
}

/* Base Styles - スムーズスクロールをここで設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--main-text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--menu-link-color);
  transition: color 0.3s;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background-color: var(--header-bg-color);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Logo Area */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--main-text-color);
}

.logo-sub {
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  color: var(--menu-link-color);
}

/* Main Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

.main-nav a {
  padding: 5px 0;
  white-space: nowrap;
  background-color: transparent;
  border: none;
  color: var(--menu-link-color);
  font-weight: 400;
}

.main-nav a:hover {
  color: var(--accent-color);
}

/* Language Switch */
.lang-switch {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
}

.lang-switch a {
  font-weight: 400;
  color: #777;
}

.lang-switch a.active {
  font-weight: 700;
  color: var(--main-text-color);
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
}

.hero-image-left,
.hero-image-right {
  position: absolute;
  width: 50%;
  height: 100%;
}

.hero-image-left {
  left: 0;
  background-image: url("/photo/Gemini_Generated_Image_82m0q382m0q382m0.png");
  background-size: cover;
  background-position: center;
}

.hero-image-right {
  right: 0;
  left: 50%;
  position: relative;
  overflow: hidden;
}

/* スライド画像のための新しいスタイル */
.hero-image-right .slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-image-right .slide-image.active-slide {
  opacity: 1;
}

/* Overlays for better text readability */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* Hero Content (Main Text) */
.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--hero-text-color);
  z-index: 3;
}

.hero-content h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 5vw;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
}

.hero-content p {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  font-size: 1.2vw;
  margin-bottom: 40px;
}

.scroll-down-btn {
  display: inline-block;
  color: #fff;
  border: 2px solid #fff;
  padding: 10px 30px;
  border-radius: 50px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s;
}

.scroll-down-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Side Dots for Navigation */
.side-dots {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.side-dots ul {
  list-style: none;
}

.side-dots li {
  width: 10px;
  height: 10px;
  border: 1px solid var(--hero-text-color);
  border-radius: 50%;
  margin: 15px 0;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.side-dots li.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Content Sections */
.content-section {
  padding: 100px 0;
}

.content-section h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 50px;
}

.section-lead {
  text-align: center;
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* About Me の中央揃えの修正 */
.profile-detail {
  max-width: 800px; /* 親要素の幅を制限 */
  margin: 0 auto; /* 左右マージンをautoにして親要素を中央寄せ */
  padding: 20px 0;
  text-align: center; /* 子要素のテキストを中央揃え */
}

.profile-detail p {
  text-align: center; /* ここで p タグのテキストを中央揃え */
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  font-size: 20px;
  margin: 15px 15px 5px;
}

.project-card p {
  font-size: 14px;
  margin: 0 15px 15px;
  color: #777;
}

.project-link {
  display: block;
  padding: 0 15px 15px;
  color: var(--accent-color);
  font-weight: 700;
}

/* Skills Section */
.skills-list {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.skill-tag {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--main-text-color);
  padding: 8px 15px;
  margin: 8px;
  border-radius: 5px;
  font-size: 16px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

/* Contact Section */
.contact-section-style {
  background-color: var(--secondary-color);
  text-align: center;
}

.contact-section-style p {
  margin-bottom: 2rem;
  font-size: 18px;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

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

/* Footer */
footer {
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid #eee;
  color: #777;
}

/* Responsive adjustments */
/* Media Queries (Responsive Design) のブロック全体を上書き */
@media (max-width: 1024px) {
  /* 1. ヘッダーの調整 */
  .main-header {
    padding: 0 20px;
    justify-content: space-between;
  }

  /* 2. デスクトップ用ナビゲーションを非表示にし、モバイルメニューのスタイルを設定 */
  .main-nav {
    /* 初期状態で非表示 */
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--header-bg-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px 0;
    z-index: 999;
  }

  /* メニューが開いている時 */
  .main-header.menu-open .main-nav {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .main-nav a {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--main-text-color);
  }

  .main-nav a:hover {
    background-color: var(--secondary-color);
  }

  /* 3. ハンバーガーボタンを表示 */
  .menu-toggle {
    display: block;
  }

  /* 4. ハンバーガーアニメーション (メニューが開いた時) */
  .main-header.menu-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .main-header.menu-open .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }

  .main-header.menu-open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* 5. ヒーローセクションのレスポンシブ調整 (変更なしだがブロック内で確認) */
  .hero-content h1 {
    font-size: 8vw;
  }

  .hero-content p {
    font-size: 3vw;
  }

  .scroll-down-btn {
    padding: 8px 20px;
    font-size: 14px;
  }

  .side-dots {
    display: none;
  }

  .hero-image-right {
    display: none;
  }

  .hero-image-left {
    width: 100%;
  }

  /* 6. 言語切り替えボタンの調整 */
  .lang-switch {
    margin-right: 50px;
  }
}

/* style.css の末尾に追加（既存のローディングCSSを置き換え） */

/* --- Loading Screen Styles (Progress Bar & Fade-out) --- */

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--header-bg-color, #fff); /* 背景色 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  /* 初期状態 */
  opacity: 1;
  visibility: visible;
  /* フェードアウトアニメーションの設定 */
  transition: opacity 0.5s ease-out, visibility 0s 0.5s;
}

/* 閉じる時のフェードアウト動作 */
#loading-screen.loaded {
  opacity: 0;
  /* opacityが0になった後、 visibility: hidden; を設定してクリックを可能にする */
  visibility: hidden;
  pointer-events: none;
}

/* プログレスコンテナ */
.progress-container {
  width: 250px;
  text-align: center;
}

/* パーセント表示 */
#loading-percent {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--main-text-color, #333);
  margin-bottom: 10px;
}

/* バーの外側ラッパー */
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background-color: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

/* バー本体 */
#progress-bar {
  height: 100%;
  width: 0;
  background-color: var(--accent-color, #007bff);
  transition: width 0.3s linear; /* 幅の変化を滑らかにする */
}

/* ... 既存のCSSの続き ... */
/* style.css の一番下に追加してください */

/* ================================================= */
/* 📧 Contact Form Styles (追加)                     */
/* ================================================= */

/* フォーム全体の中央寄せと最大幅の調整 */
.contact-content {
  max-width: 550px;
  margin: 0 auto; /* フォーム全体を中央に配置 */
  padding: 20px 0; /* 上下のパディングを少し追加 */
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px; /* フォーム要素間のスペース */
  text-align: left; /* フォーム要素内のラベルなどは左寄せ */
}

.form-group label {
  display: block;
  font-weight: 700; /* Montserratの太字 */
  font-family: "Montserrat", sans-serif;
  margin-bottom: 5px;
  color: var(--main-text-color);
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 15px; /* 大きめに調整 */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s;
  font-family: "Noto Sans JP", sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* フォーカス時の影 */
}

.form-group textarea {
  resize: vertical;
}

/* 送信ボタンのスタイル */
.submit-btn {
  /* 既存の .cta-button のスタイルに合わせます */
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 2rem;
  border: none; /* ボタン化 */
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  align-self: center; /* フォーム内で中央に配置 */
  margin-top: 20px;
  width: auto; /* 幅をテキストに合わせる */
}

.submit-btn:hover {
  background-color: var(--hover-color);
  transform: translateY(-1px);
}
/* ================================================= */
/* 🍔 ハンバーガーメニューの基本スタイル (新規追加) */
/* ================================================= */

/* デスクトップではボタンを非表示 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1001;
  margin-left: 20px;
}

.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--main-text-color);
  transition: transform 0.3s, opacity 0.3s;
}
