@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700&family=Quicksand:wght@500;600;700&display=swap');

/* かわいい濃い青のデザインシステム */
:root {
  --bg-primary: #e0f2fe; /* よりはっきりとした空色・水色 */
  --bg-card: #ffffff;
  --text-primary: #075985; /* しっかりと濃いディープブルー */
  --text-secondary: #0369a1; /* はっきりとした青色 */
  --text-muted: #38bdf8; /* 明るいブルー */
  --accent: #0284c7; /* アクセント用の濃い青 */
  --accent-light: rgba(2, 132, 199, 0.08);
  --accent-gradient: linear-gradient(135deg, #7dd3fc 0%, #0ea5e9 50%, #0284c7 100%); /* 濃い青へのグラデーション */
  --border: #bae6fd; /* ボーダーも少し濃い青にして引き締める */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px; /* ぷっくり丸い角丸 */
  --shadow-sm: 0 4px 8px rgba(3, 105, 161, 0.06);
  --shadow-md: 0 16px 36px -10px rgba(3, 105, 161, 0.15);
  --shadow-lg: 0 24px 48px -15px rgba(3, 105, 161, 0.22);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* ぷにっと弾むイージング */
  --max-width: 900px;
}

/* 基本リセット & タイポグラフィ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--text-primary);
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

/* メインコンテナ */
.container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  gap: 35px;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ヒーローセクション */
.hero-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

/* ふわふわ浮遊する背景オブジェクト */
.hero-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: var(--accent-gradient);
  opacity: 0.2;
  border-radius: 50%;
  filter: blur(30px);
  animation: floatBackground 8s ease-in-out infinite alternate;
}

/* アバター */
.avatar-container {
  flex-shrink: 0;
}

/* CSSによるプレースホルダーアバター (SVG含む) */
.avatar-css {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
  border: 4px solid #ffffff;
  transition: var(--transition);
  animation: floatAvatar 4s ease-in-out infinite;
  overflow: hidden;
}

.avatar-css svg {
  width: 110px;
  height: 110px;
  transition: var(--transition);
}

.avatar-css:hover {
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 15px 30px rgba(2, 132, 199, 0.4);
}

.avatar-css:hover svg {
  transform: scale(1.05);
}

/* ユーザーが実画像を配置した時のスタイル */
.avatar-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid #ffffff;
  transition: var(--transition);
  animation: floatAvatar 4s ease-in-out infinite;
}

.avatar-img:hover {
  transform: scale(1.1) rotate(-5deg);
}

/* ヒーローテキスト */
.hero-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-tag {
  align-self: flex-start;
  background-color: var(--accent-light);
  color: var(--text-secondary);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid var(--border);
}

.hero-info h1 {
  font-size: 2.6rem;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-bio {
  color: var(--text-primary);
  font-size: 1rem;
  margin-top: 8px;
  max-width: 540px;
  background-color: #f0f9ff;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
}

/* セクション共通スタイル */
.section {
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: var(--transition);
}

.section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px); /* ぷにっと持ち上がる効果 */
}

.section-title {
  font-size: 1.6rem;
  position: relative;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '🎈';
  position: absolute;
  bottom: -4px;
  left: 0;
  font-size: 1rem;
  transition: var(--transition);
}

.section:hover .section-title::after {
  transform: translateY(-4px) rotate(15deg);
}

/* 自己紹介詳細セクション */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.about-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background-color: #f0f9ff;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.about-item:hover {
  background-color: #e0f2fe;
  border-color: var(--accent);
  transform: scale(1.03);
}

.about-item-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
}

.about-item-value {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 6px;
}

/* スキルセクション */
.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.skill-category h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-badge {
  background-color: #f0f9ff;
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skill-badge:hover {
  background: var(--accent-gradient);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(2, 132, 199, 0.2);
}

/* タイムライン（経歴）セクション */
.timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background-image: radial-gradient(var(--border) 2px, transparent 2px);
  background-size: 4px 12px;
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
  transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: scale(1.3) rotate(360deg);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  background-color: #f0f9ff;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* お問い合わせ・リンク */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: 3px solid var(--border);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 25px rgba(2, 132, 199, 0.35);
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-outline {
  border: 3px solid var(--border);
  color: var(--text-secondary);
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background-color: var(--accent-light);
  transform: translateY(-4px) scale(1.03);
}

/* フッター */
footer {
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* アニメーションの定義 */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatAvatar {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes floatBackground {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-10px, 10px) scale(1.1);
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  body {
    padding: 20px 12px;
  }
  
  .hero-card {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px;
  }

  .hero-tag {
    align-self: center;
  }
  
  .hero-bio {
    max-width: 100%;
  }

  .section {
    padding: 24px;
  }
  
  .contact-links {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}
