@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&display=swap');

/* ==========================================================================
   🧁 デザインシステム & 変数定義
   ========================================================================== */
:root {
  --color-bg-base: #f3f8fc;
  --color-bg-card: #ffffff;
  --color-primary: #7bbce7;
  --color-primary-light: #e4f2fc;
  --color-primary-dark: #467499;
  --color-accent-pink: #ffccd5;
  --color-accent-pink-dark: #e88fa2;
  --color-text-main: #3d6380;
  --color-text-sub: #7fa4c2;
  --font-family: 'Zen Maru Gothic', sans-serif;
  --shadow-cute: 0 8px 24px rgba(123, 188, 231, 0.15);
  --shadow-cute-hover: 0 16px 32px rgba(123, 188, 231, 0.25);
  --shadow-inner: inset 0 4px 8px rgba(123, 188, 231, 0.1);
  --border-cute: 3px solid #7bbce7;
  --border-cute-light: 3px solid #e4f2fc;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 12px;
}

/* ==========================================================================
   ☁️ 基本リセット & 共通スタイル
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* スクロールバーも可愛く */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-primary-light);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 5px;
  border: 2px solid var(--color-primary-light);
}

/* ==========================================================================
   🌬️ ふわふわ背景アニメーション（雲とキラキラ）
   ========================================================================== */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 100px;
  opacity: 0.7;
  filter: blur(1px);
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 100px;
}
.cloud-1 {
  width: 180px;
  height: 60px;
  top: 10%;
  left: -200px;
  animation: floatCloud 35s linear infinite;
}
.cloud-1::before {
  width: 80px;
  height: 80px;
  top: -40px;
  left: 30px;
}
.cloud-1::after {
  width: 100px;
  height: 100px;
  top: -50px;
  left: 70px;
}

.cloud-2 {
  width: 120px;
  height: 40px;
  top: 45%;
  left: -150px;
  animation: floatCloud 25s linear infinite;
  animation-delay: 5s;
  opacity: 0.5;
}
.cloud-2::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 20px;
}
.cloud-2::after {
  width: 70px;
  height: 70px;
  top: -35px;
  left: 45px;
}

.cloud-3 {
  width: 220px;
  height: 70px;
  top: 75%;
  left: -250px;
  animation: floatCloud 45s linear infinite;
  animation-delay: 12s;
  opacity: 0.6;
}
.cloud-3::before {
  width: 100px;
  height: 100px;
  top: -50px;
  left: 35px;
}
.cloud-3::after {
  width: 120px;
  height: 120px;
  top: -60px;
  left: 80px;
}

@keyframes floatCloud {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 300px)); }
}

/* きらきら星の装飾 */
.sparkle-decor {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--color-accent-pink);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.5;
  --base-scale: 1.0;
  transform: scale(var(--base-scale));
  animation: pulseCute 3s ease-in-out infinite alternate;
}
.sparkle-1 { top: 8%; right: 12%; --base-scale: 1.6; opacity: 0.8; }
.sparkle-2 { top: 25%; left: 10%; --base-scale: 0.5; background-color: var(--color-primary); animation-delay: 0.8s; }
.sparkle-3 { top: 42%; right: 8%; --base-scale: 1.0; animation-delay: 1.5s; }
.sparkle-4 { top: 55%; left: 15%; --base-scale: 1.2; background-color: var(--color-primary); animation-delay: 2.2s; }
.sparkle-5 { top: 70%; right: 18%; --base-scale: 0.6; animation-delay: 0.3s; }
.sparkle-6 { top: 82%; left: 7%; --base-scale: 1.6; opacity: 0.8; animation-delay: 1.9s; }
.sparkle-7 { top: 90%; right: 10%; --base-scale: 0.8; background-color: var(--color-primary); animation-delay: 1.1s; }
.sparkle-8 { top: 15%; left: 20%; --base-scale: 0.9; animation-delay: 2.5s; }
.sparkle-9 { top: 65%; left: 5%; --base-scale: 0.7; background-color: var(--color-primary); animation-delay: 1.4s; }
.sparkle-10 { top: 78%; right: 25%; --base-scale: 1.1; animation-delay: 0.7s; }
.sparkle-11 { top: 18%; left: 82%; --base-scale: 2.2; opacity: 0.9; animation-delay: 1.2s; }
.sparkle-12 { top: 48%; left: 4%; --base-scale: 2.0; background-color: var(--color-accent-pink); opacity: 0.9; animation-delay: 2.7s; }

/* ==========================================================================
   🏠 ヘッダー & ナビゲーション
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  background-color: rgba(243, 248, 2fc, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid rgba(123, 188, 231, 0.15);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(123, 188, 231, 0.3);
  animation: bounceSoft 3s ease-in-out infinite;
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-primary-dark);
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--color-text-main);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

nav a:hover, nav li.active a {
  background-color: #ffffff;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(123, 188, 231, 0.15);
}

/* モバイルメニューは基本レスポンシブで対応 */

/* ==========================================================================
   🧸 ヒーローセクション
   ========================================================================== */
.hero-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
}

.avatar-container {
  position: relative;
  margin-bottom: 30px;
  animation: floatAvatar 6s ease-in-out infinite;
}

.avatar-border {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: var(--border-cute);
  padding: 8px;
  background-color: #ffffff;
  box-shadow: var(--shadow-cute);
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #ffffff 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.avatar-inner svg {
  width: 110px;
  height: 110px;
  fill: var(--color-primary);
  animation: nodCute 4s ease-in-out infinite;
}

.avatar-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--color-accent-pink);
  color: var(--color-accent-pink-dark);
  border: 2px solid white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(232, 143, 162, 0.3);
  animation: spinSlow 15s linear infinite;
}

.hero-title {
  font-size: 42px;
  font-weight: 900;
  color: var(--color-primary-dark);
  margin-bottom: 15px;
  text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px rgba(123, 188, 231, 0.15);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-main);
  background: #ffffff;
  padding: 10px 24px;
  border-radius: 30px;
  border: 2px solid var(--color-primary-light);
  margin-bottom: 30px;
  box-shadow: var(--shadow-cute);
  max-width: 600px;
}

.btn-cute-container {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-cute {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-family);
  font-weight: 900;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  position: relative;
  outline: none;
}

.btn-cute-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-bottom: 5px solid #5fa6d6;
  box-shadow: 0 6px 15px rgba(123, 188, 231, 0.4);
}
.btn-cute-primary:hover {
  transform: translateY(-3px);
  border-bottom-width: 2px;
  margin-top: 3px;
  box-shadow: 0 4px 8px rgba(123, 188, 231, 0.3);
  background-color: #8ed0fc;
}
.btn-cute-primary:active {
  transform: translateY(2px);
  border-bottom-width: 0px;
  margin-top: 5px;
  box-shadow: none;
}

.btn-cute-secondary {
  background-color: #ffffff;
  color: var(--color-primary-dark);
  border: 3px solid var(--color-primary-light);
  border-bottom: 7px solid var(--color-primary-light);
}
.btn-cute-secondary:hover {
  transform: translateY(-3px);
  border-bottom-width: 4px;
  margin-top: 3px;
  background-color: var(--color-primary-light);
}
.btn-cute-secondary:active {
  transform: translateY(2px);
  border-bottom-width: 0px;
  margin-top: 7px;
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounceSoft 2s infinite;
}

.scroll-hint svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text-sub);
}

/* ==========================================================================
   🧩 メインコンテンツエリア（グリッド＆セクション）
   ========================================================================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--color-primary-dark);
  margin-bottom: 45px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 60px;
  height: 5px;
  background: var(--color-accent-pink);
  border-radius: 5px;
}

/* ==========================================================================
   🎀 自己紹介（About Me）
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 12px 10px;
    gap: 12px;
  }

  .logo-text {
    font-size: 18px;
  }

  nav ul {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    font-size: 13px;
    padding: 6px 12px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

.cute-card {
  background-color: var(--color-bg-card);
  border-radius: var(--border-radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-cute);
  border: var(--border-cute-light);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.cute-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-cute-hover);
  border-color: var(--color-primary);
}

.cute-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent-pink) 100%);
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.profile-table tr {
  border-bottom: 2px dashed var(--color-primary-light);
}
.profile-table tr:last-child {
  border-bottom: none;
}

.profile-table th, .profile-table td {
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
}

.profile-table th {
  width: 35%;
  font-weight: 900;
  color: var(--color-primary-dark);
  font-size: 15px;
}

.profile-table td {
  color: var(--color-text-main);
  font-size: 15px;
  font-weight: 500;
}

.bubble-text {
  display: inline-block;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 5px;
}

/* ==========================================================================
   🍼 スキルセクション（哺乳瓶・ジュースボトル型ゲージ）
   ========================================================================== */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.skill-info {
  width: 120px;
  font-weight: 900;
  color: var(--color-primary-dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bottle-container {
  flex-grow: 1;
  height: 36px;
  background-color: #ffffff;
  border: 3px solid var(--color-primary);
  border-radius: 18px 30px 30px 18px; /* ボトルの形を少し模す */
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}

.bottle-liquid {
  height: 100%;
  background: linear-gradient(90deg, #b3defa 0%, var(--color-primary) 100%);
  border-radius: 14px 0 0 14px;
  position: relative;
  transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  width: 0%; /* JSでアニメーション設定 */
}

/* 液体の中の泡アニメーション */
.bottle-liquid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.4) 20%, transparent 20%),
                    radial-gradient(circle, rgba(255,255,255,0.3) 15%, transparent 15%);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  animation: bubbleMove 4s linear infinite;
}

.bottle-cap {
  position: absolute;
  right: 0;
  top: -3px;
  width: 15px;
  height: 36px;
  background-color: var(--color-accent-pink);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 12px 12px 0;
}

.skill-percent {
  width: 50px;
  text-align: right;
  font-weight: 900;
  color: var(--color-primary-dark);
  font-size: 16px;
}

@keyframes bubbleMove {
  0% { background-position: 0 0, 15px 15px; }
  100% { background-position: 60px 0, 75px 15px; }
}

/* ==========================================================================
   🍭 好きなこと（My Favorites - ポラロイド風カード）
   ========================================================================== */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.polaroid-card {
  background-color: #ffffff;
  padding: 16px 16px 28px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-cute);
  border: 3px solid #ffffff;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.polaroid-card:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-cute-hover);
  border-color: var(--color-primary-light);
}

.polaroid-card:nth-child(even):hover {
  transform: scale(1.05) rotate(-2deg);
}

.polaroid-image-area {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-primary-light);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.polaroid-image-area svg {
  width: 60px;
  height: 60px;
  fill: var(--color-primary);
  transition: transform 0.5s ease;
}

.polaroid-card:hover .polaroid-image-area svg {
  transform: scale(1.2) rotate(10deg);
}

.polaroid-pin {
  position: absolute;
  top: -12px;
  width: 24px;
  height: 24px;
  background-color: var(--color-accent-pink);
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.polaroid-pin::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  background-color: rgba(255,255,255,0.6);
  border-radius: 50%;
}

.polaroid-title {
  margin-top: 15px;
  font-size: 16px;
  font-weight: 900;
  color: var(--color-primary-dark);
  text-align: center;
}

.polaroid-desc {
  margin-top: 5px;
  font-size: 13px;
  color: var(--color-text-main);
  text-align: center;
  font-weight: 500;
}

/* ==========================================================================
   💌 レターセット風問い合わせフォーム（Contact）
   ========================================================================== */
.letter-outer {
  max-width: 600px;
  margin: 0 auto;
  perspective: 1000px;
}

.letter-container {
  background-color: #ffffff;
  border-radius: var(--border-radius-lg);
  border: var(--border-cute);
  box-shadow: var(--shadow-cute);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 手紙の便箋風罫線背景 */
.letter-paper {
  position: relative;
}

.letter-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(123, 188, 231, 0.08) 2px, transparent 2px);
  background-size: 100% 32px;
  pointer-events: none;
  z-index: 0;
  margin-top: 40px;
}

.letter-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.form-input, .form-textarea {
  width: 100%;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 18px;
  border: 3px solid var(--color-primary-light);
  border-radius: var(--border-radius-sm);
  background-color: rgba(255,255,255,0.9);
  color: var(--color-text-main);
  outline: none;
  transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(123, 188, 231, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 32px; /* 便箋の線に合わせる */
}

/* アニメーション用の送信クラス */
.letter-container.sending {
  transform: rotateX(20deg) scale(0.9) translateY(-100px);
  opacity: 0;
  pointer-events: none;
}

.success-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #ffffff;
  border: var(--border-cute);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-cute-hover);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-message.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.success-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-accent-pink);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
  animation: bounceSoft 2s infinite;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--color-accent-pink-dark);
}

/* ==========================================================================
   🐾 フッター
   ========================================================================== */
footer {
  background-color: var(--color-primary-light);
  border-top: 3px solid rgba(123, 188, 231, 0.15);
  padding: 40px 20px 20px 20px;
  text-align: center;
  margin-top: 80px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-primary-dark);
}

.footer-copy {
  font-size: 13px;
  color: var(--color-text-sub);
  font-weight: 500;
}

.footer-copy strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* ==========================================================================
   ✨ 特殊なアニメーション定義
   ========================================================================== */
@keyframes floatAvatar {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes nodCute {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.05) rotate(-3deg); }
}

@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseCute {
  0% { transform: scale(calc(var(--base-scale) * 0.85)); opacity: 0.4; }
  100% { transform: scale(calc(var(--base-scale) * 1.15)); opacity: 0.85; }
}

/* クリック時に生成されるシャボン玉/ハートのエフェクト用 */
.click-effect-bubble {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background-color: rgba(123, 188, 231, 0.15);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0);
  animation: popBubble var(--duration, 0.8s) cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes popBubble {
  0% { 
    transform: translate(-50%, -50%) scale(0); 
    opacity: 1; 
  }
  80% { 
    opacity: 0.8; 
  }
  100% { 
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px))) scale(var(--scale, 1.8)); 
    opacity: 0; 
  }
}
