/* 基本リセットと変数定義 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0ff; /* シアン */
  --secondary-color: #78d9ff; /* 明るい青 */
  --background-color: #000;
  --card-bg: #0a192f; /* ネイビーブルー系のカード背景 */
  --text-color: #ccd6f6; /* 明るいグレーブルー */
  --heading-color: #e6f1ff; /* オフホワイト */
  --gradient-start: rgba(0, 60, 120, 0.4); /* グラデーション開始色調整 */
  --gradient-end: rgba(0, 0, 0, 0);
  --hover-glow: 0 0 15px rgba(0, 255, 255, 0.6);
  --border-color: rgba(0, 255, 255, 0.2); /* ボーダー色 */
  --header-height: 70px;
  --header-bg: rgba(10, 25, 47, 0.85);
  --header-bg-scrolled: rgba(10, 25, 47, 0.95);
  --transition-standard: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Roboto Mono', 'Noto Sans JP', sans-serif;
  margin: 0;
  overflow-x: hidden;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- ヘッダーナビゲーション --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  transition: var(--transition-standard);
  box-shadow: 0 5px 20px -5px rgba(0, 0, 0, 0.1);
}

.site-header.header-scrolled {
  background-color: var(--header-bg-scrolled);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.site-header.header-hidden {
  transform: translateY(calc(-1 * var(--header-height)));
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: 1px;
  position: relative;
}

.logo-text {
  margin-right: 5px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 1px;
  padding: 8px 0;
  position: relative;
  transition: var(--transition-standard);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-standard);
  opacity: 0.7;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 101;
}

.hamburger {
  position: relative;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  display: block;
  transition: var(--transition-standard);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-standard);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.menu-toggle.active .hamburger {
  background-color: transparent;
}

.menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* --- 背景要素 --- */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
      linear-gradient(to right, var(--border-color) 1px, transparent 1px),
      linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -3;
  opacity: 0.08;
  animation: grid-move 25s linear infinite;
}

@keyframes grid-move {
  0% { background-position: 0 0; }
  100% { background-position: 120px 120px; }
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--gradient-start) 0%, var(--gradient-end) 70%);
  z-index: -2;
  transition: background 0.4s ease-out;
}

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* --- ヒーローセクション --- */
.hero-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: var(--header-height);
}

.typewriter-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px; /* 左右に少しパディングを追加 */
}

.typewriter { /* h1タグに変更 */
  font-size: clamp(1.8rem, 6vw, 4.5rem); /* 1行表示用にフォントサイズ上限を少し調整 */
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading-color);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  width: auto; /* 幅はテキスト内容に合わせる */
  max-width: 100%; /* コンテナ幅を超えないように */
  white-space: nowrap; /* テキストを1行に保つ */
  overflow: hidden;     /* コンテナからはみ出したテキストを隠す */
  text-overflow: ellipsis; /* はみ出した部分を...で示す */
  display: inline-block; /* インラインブロック要素に */
  vertical-align: middle; /* カーソルと縦位置を合わせる */
}

.cursor {
  border-right: 3px solid var(--primary-color); /* 太さ調整 */
  animation: blink 0.7s infinite;
  height: 0.85em; /* 高さをフォントに合わせ調整 */
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle; /* テキストと縦位置を合わせる */
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- スクロールプロンプト --- */
.scroll-prompt {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 1.2s ease 1s; /* 表示タイミング調整 */
  z-index: 10;
}

.scroll-prompt.visible {
  opacity: 0.7;
}

.scroll-text {
  margin-bottom: 15px;
  font-size: 0.85rem;
  letter-spacing: 3.5px;
  color: var(--primary-color);
  text-transform: uppercase;
}

.scroll-arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
  animation: arrow-bounce 2.2s infinite ease-in-out; /* アニメーション調整 */
}

@keyframes arrow-bounce {
  0%, 100% {
      transform: translateY(0) rotate(45deg);
      opacity: 1;
  }
  50% {
      transform: translateY(12px) rotate(45deg);
      opacity: 0.4;
  }
}

/* --- 活動セクション --- */
.activities-section {
  min-height: 100vh;
  padding: 120px 0 80px; /* パディング調整 */
  background: linear-gradient(to bottom, #00050a, var(--card-bg) 30%, var(--card-bg)); /* グラデーション調整 */
  position: relative;
  z-index: 1;
}

/* --- puyokura セクション --- */
.puyokura-section,
.projects-section,
.join-section,
.contact-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.content-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.1);
  transition: var(--transition-standard);
}

.content-card:hover {
  box-shadow: 0 20px 40px -20px rgba(0, 255, 255, 0.2);
  transform: translateY(-5px);
}

.feature-list {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.feature-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.feature-list li i {
  color: var(--primary-color);
  margin-right: 10px;
  margin-top: 4px;
}
手
/* プロジェクトカードスタイル */
.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.project-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.project-status.active {
  background-color: var(--accent-color);
  color: var(--bg-dark);
}

.project-status.planning {
  background-color: var(--secondary-color);
  color: var(--bg-dark);
}

.project-status.completed {
  background-color: var(--success-color);
  color: var(--bg-dark);
}

.project-content {
  padding: 1.5rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  background-color: rgba(0, 255, 255, 0.1);
  color: var(--accent-color);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.project-members {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.btn-project:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* スキルセクションスタイル */
.skills-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-size: 1.25rem;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  margin-bottom: 0.5rem;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* 経歴セクションスタイル */
.experience-section {
  padding: 5rem 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background-color: var(--accent-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--accent-color);
  z-index: 1;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.timeline-content {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
  margin-top: 0;
  color: var(--text-light);
}

/* 趣味・興味セクションスタイル */
.interests-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.interests-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.interest-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.interest-item:hover {
  transform: translateY(-5px);
}

.interest-item i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.interest-item h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.interest-item p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* プロフィールスタイル */
.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.profile-image {
  flex: 0 0 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image i {
  font-size: 6rem;
  color: var(--accent-color);
}

.profile-info {
  flex: 1;
  min-width: 300px;
}

.profile-info h3 {
  margin-top: 0;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-tagline {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-dark);
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

/* 参加ステップ */
.join-steps {
  margin: 30px 0;
}

.join-step {
  display: flex;
  margin-bottom: 25px;
}

.step-number {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--background-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

.step-content {
  flex-grow: 1;
}

.step-content h4 {
  margin: 0 0 8px 0;
  color: var(--heading-color);
}

.cta-container {
  text-align: center;
  margin-top: 30px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition-standard);
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* コンタクトセクション */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.contact-info {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.contact-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-list li i {
  color: var(--primary-color);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.contact-list a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-standard);
}

.contact-list a:hover {
  color: var(--primary-color);
}

.contact-form {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--heading-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 4px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-standard);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 80px;
  text-align: center;
  color: var(--primary-color);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: var(--hover-glow);
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  box-shadow: var(--hover-glow);
}

/* --- Activity Item - カードデザイン --- */
.activity-item {
  display: grid; /* Gridレイアウトに変更 */
  grid-template-columns: repeat(12, 1fr); /* 12カラムグリッド */
  gap: 20px; /* カラム間のギャップ */
  align-items: center; /* 垂直方向中央揃え */
  margin-bottom: 100px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
              transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
              box-shadow 0.3s ease, border-color 0.3s ease; /* transition追加 */
  text-decoration: none;
  color: inherit;
  background-color: var(--card-bg);
  border-radius: 6px; /* 角丸調整 */
  overflow: hidden;
  border: 1px solid transparent; /* 初期ボーダーは透明 */
  box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
  position: relative; /* ::before用 */
  z-index: 1;
}

.activity-item::before { /* カード全体の背景オーバーレイ（光沢感） */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 40%);
  z-index: 2;
  pointer-events: none; /* クリックを透過させる */
  opacity: 0.7;
  transition: opacity 0.3s ease;
}


.activity-item:hover {
  transform: translateY(-8px) !important; /* ホバー時の移動量調整 */
  box-shadow: 0 20px 40px -15px rgba(2, 12, 27, 0.8);
  border-color: var(--border-color); /* ホバー時にボーダー表示 */
}
.activity-item:hover::before {
  opacity: 1; /* ホバー時に光沢感を強める */
}

.activity-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.activity-item.visible {
  transition-delay: 0.1s;
}


/* グリッド配置 */
.activity-content {
  grid-column: 1 / span 7; /* 左側7カラム */
  grid-row: 1 / 1;
  padding: 40px 30px 40px 40px; /* パディング調整 */
  z-index: 3; /* 画像より手前 */
}

.activity-image-wrapper {
  grid-column: 7 / -1; /* 右側6カラム */
  grid-row: 1 / 1;
  height: 100%; /* 高さを親に合わせる */
  min-height: 350px; /* 最小高さ設定 */
  position: relative;
  overflow: hidden;
  z-index: 1; /* コンテンツより後ろ */
}

/* Reverseレイアウト */
.activity-item.reverse .activity-content {
  grid-column: 7 / -1; /* 右側6カラム */
  text-align: right; /* テキスト右揃え */
  padding: 40px 40px 40px 30px;
}

.activity-item.reverse .activity-image-wrapper {
  grid-column: 1 / span 7; /* 左側7カラム */
}

/* --- Activity Content & Image --- */
.activity-content h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--heading-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

.activity-item:hover h3 {
  color: var(--primary-color);
}

.activity-content p {
  font-size: 0.95rem; /* 少し小さめ */
  line-height: 1.7;
  color: var(--text-color);
  background-color: rgba(10, 25, 47, 0.7); /* テキスト背景で読みやすく */
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 可読性重視フォント */
}

.activity-item.reverse .activity-content p {
  /* 必要ならスタイル調整 */
}

.activity-image {
  width: 100%;
  height: 100%;
  background-color: #1a202c;
  background-size: cover;   /* コンテナに合わせて画像をカバー */
  background-position: center; /* 画像の中央を表示 */
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
  filter: grayscale(50%) contrast(90%) brightness(80%); /* 初期フィルター調整 */
  position: absolute; /* ラッパー基準で配置 */
  top: 0; left: 0;
}
/* 画像の上に薄い色を重ねる */
.activity-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--card-bg);
  opacity: 0.3; /* 透明度調整 */
  transition: opacity 0.4s ease;
  z-index: 2; /* 画像の上 */
}

.activity-item:hover .activity-image {
  transform: scale(1.03);
  filter: grayscale(0%) contrast(100%) brightness(100%);
}
.activity-item:hover .activity-image-wrapper::after {
  opacity: 0; /* ホバー時にオーバーレイ解除 */
}

/* --- 画像プレースホルダー (URLのサイズを 640x360 に変更) --- */
/* 実際のプロジェクトでは具体的な画像URLに差し替えてください */

/* AIチャット (2番目の子要素) */
.activity-item:nth-child(2) .activity-image { background-image: url('https://placehold.jp/640x360/00a6ff/ffffff?text=AI+Chat'); }
/* クリエイティブ表現 (3番目の子要素) */
.activity-item:nth-child(3) .activity-image { background-image: url('https://placehold.jp/640x360/b200ff/ffffff?text=Expression'); }
/* プログラミング学習 (4番目の子要素) */
.activity-item:nth-child(4) .activity-image { background-image: url('https://placehold.jp/640x360/00b35c/ffffff?text=Code+Study'); }
/* puyokura プロジェクト (5番目の子要素) */
.activity-item:nth-child(5) .activity-image { background-image: url('https://placehold.jp/640x360/ffca3a/ffffff?text=puyokura'); }
/* watammoto's Works (6番目の子要素) */
.activity-item:nth-child(6) .activity-image { background-image: url('https://placehold.jp/640x360/6dd5fa/ffffff?text=watammoto'); }
/* オープンソース貢献 (7番目の子要素) */
.activity-item:nth-child(7) .activity-image { background-image: url('https://placehold.jp/640x360/00c3ff/ffffff?text=Open+Source'); }


/* --- レスポンシブデザイン --- */
@media screen and (max-width: 992px) {
  .activity-content { padding: 30px; }
  .activity-item.reverse .activity-content { padding: 30px; }
}

@media screen and (max-width: 768px) {
  .typewriter {
      font-size: clamp(1.5rem, 7vw, 2.5rem); /* スマホでの1行表示のためサイズ調整 */
  }
  .cursor {
       margin-left: 5px; /* スマホでのカーソルマージン調整 */
  }

  .activity-item, .activity-item.reverse {
      grid-template-columns: 1fr; /* 1カラム表示 */
      margin-bottom: 60px;
  }

  .activity-content, .activity-item.reverse .activity-content {
      grid-column: 1 / -1; /* 全幅 */
      grid-row: 2 / 3; /* 画像の下に配置 */
      text-align: left; /* 左揃えに戻す */
      padding: 30px 20px;
  }
   .activity-content p {
      padding: 10px; /* スマホ用パディング */
   }


  .activity-image-wrapper, .activity-item.reverse .activity-image-wrapper {
      grid-column: 1 / -1; /* 全幅 */
      grid-row: 1 / 2; /* コンテンツの上に配置 */
      min-height: 250px;
  }

  .section-title {
      font-size: 2rem;
      margin-bottom: 60px;
  }
}

/* --- フッター --- */
footer {
  background-color: #051020;
  color: var(--text-color);
  padding: 40px 0; /* パディング調整 */
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 100;
}

footer .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px; /* 間隔調整 */
}

.copyright {
  opacity: 0.6;
}

.repository-link {
  color: var(--secondary-color);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

.repository-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  display: block;
  margin-top: 4px; /* 下線位置調整 */
  right: 0;
  background: var(--secondary-color);
  transition: width 0.4s ease;
}

.repository-link:hover {
  color: var(--primary-color); /* ホバー時の色変更 */
}

.repository-link:hover::after {
  width: 100%;
  left: 0;
  background: var(--primary-color);
}

/* --- オーディオ要素（非表示、JSで制御する場合） --- */
#background-music {
  display: none; /* 必要に応じて表示スタイルを追加 */
}

/* --- スクロールバー（オプション） --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #051020;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
  border: 2px solid #051020; /* トラックと同じ背景で縁取り */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}