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

/* --- デザインシステム / 変数設定 --- */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --color-primary: #3b82f6; /* インディゴブルー */
  --color-primary-light: #dbeafe;
  --color-secondary: #0d9488; /* ティールグリーン */
  --color-secondary-light: #ccfbf1;
  --color-accent: #f59e0b; /* アンバー */
  
  --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
  --gradient-avatar: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(13, 148, 136, 0.05) 100%);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 8px -1px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* --- コンテナレイアウト --- */
.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- ヘッダー・ナビゲーション --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(241, 245, 249, 0.8);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

/* --- ヒーローセクション --- */
.hero-section {
  padding: 80px 0 60px 0;
  background: var(--gradient-hero);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

/* アバターまわりのスタイリング（画像が無い場合のフォールバック実装） */
.avatar-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  padding: 4px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  z-index: 2;
  transition: var(--transition-smooth);
}

.avatar-img.hide {
  display: none;
}

.avatar-fallback {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: var(--radius-full);
  background: var(--gradient-avatar);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 1;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.hero-text .subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: var(--text-muted);
}

/* --- セクション共通 --- */
.section {
  padding: 50px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

/* --- プロフィール・アバウトセクション --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
  }
}

.about-card, .info-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(241, 245, 249, 0.8);
}

.about-card p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.about-card p:last-child {
  margin-bottom: 0;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

/* --- スキルセクション --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(241, 245, 249, 0.8);
  transition: var(--transition-smooth);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.15);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.skill-card:nth-child(even) .skill-icon {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary);
}

.skill-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name-percent {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.skill-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: width 1s ease-in-out;
}

/* --- プロジェクトセクション --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(241, 245, 249, 0.8);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.15);
}

/* 画像はユーザーが配置することを想定したプレースホルダー表示 */
.project-image-placeholder {
  width: 100%;
  height: 180px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 2.5rem;
  border-bottom: 1px solid rgba(241, 245, 249, 0.8);
  position: relative;
}

.project-image-placeholder::before {
  content: "📂";
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
}

.project-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
}

/* --- コンタクトセクション --- */
.contact-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(241, 245, 249, 0.8);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-muted);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
}

.btn-outline:hover {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  background-color: rgba(13, 148, 136, 0.02);
  transform: translateY(-2px);
}

/* --- フッター --- */
footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(241, 245, 249, 0.8);
  color: var(--text-light);
  font-size: 0.85rem;
}

/* --- レスポンシブ調整 --- */
@media (max-width: 640px) {
  .hero-section {
    padding: 60px 0 40px 0;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
  
  .about-card, .info-card {
    padding: 24px;
  }
  
  .contact-card {
    padding: 30px 20px;
  }
}
