/* styles.css */

:root {
  --primary-color: #8e44ad;
  --primary-hover: #6c3483;
  --secondary-color: #9b59b6;
  --text-primary: #ecf0f1;
  --text-secondary: #bdc3c7;
  --card-bg: #2d3436;
  --border-color: #4a4a4a;
  --background: #1a1a1a;
  --success: #2ecc71;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 最低でも画面サイズ分の高さ */
  color: white;
}

main {
  flex-grow: 1;
}

/* ヘッダーのスタイル */
.main-header {
  background-color: #2c3e50;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
}

/* ナビゲーションリンク */
.navigation {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 現在のページ用のグレー */
.nav-link.active {
  background-color: #6c757d;
  color: white;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 21px;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: white;
  margin: 3px 0;
  transition: 0.3s;
}

/* メインコンテンツ */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.user-profile {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-bottom: 2rem;
}

.profile-header {
  display: flex;
  padding: 2rem;
  background-color: #3a3f43;
}

.avatar-container {
  margin-right: 1.5rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-name {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.position {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-weight: normal;
}

/* カードスタイル */
.intro-card,
.skills-card,
.contacts-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 2rem;
  margin-bottom: 2rem;
}

.intro-card h2,
.skills-card h2,
.contacts-card h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.intro-card p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.skill-tag {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    background-color: #343a40; /* ダークモードの背景色 */
    border-radius: 20px;
    font-size: 14px;
    color: #e9ecef; /* ダークモードのテキストカラー */
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #495057; /* ダークモードのボーダー */
}

.skill-tag:hover {
    background-color: #6a0dad; /* 紫色に変更 */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 13, 218, 0.3); /* 紫色の影 */
    cursor: pointer;
}

.skill-tag:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(106, 13, 218, 0.2);
}

.contacts-card .contact-list {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 8px;
  background-color: #3a3f43;
  min-width: 120px;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.4);
  background-color: #4a515d;
}

.contact-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
}

/* メディアクエリでハンバーガーメニューを表示 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .navigation {
    display: none; /* スマホでは非表示 */
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #2c3e50;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .navigation.active {
    display: flex;
  }
  
  .hamburger {
    display: flex; /* スマホでは表示 */
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .avatar-container {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .intro-card,
  .skills-card,
  .contacts-card {
    padding: 1.5rem;
  }
  
  .contact-list {
    flex-direction: column;
    align-items: center;
  }
}

/* メディアクエリでPC用のナビゲーションを表示 */
@media (min-width: 769px) {
  .navigation {
    display: flex;
  }
  
  .container {
    max-width: 100%;
    margin: 2rem 0;
    padding: 0;
  }
  
  .user-profile,
  .intro-card,
  .skills-card,
  .contacts-card {
    border-radius: 0;
    margin-bottom: 2rem;
  }
}

/* 既存のCSSに追加 */
.contacts-card .contact-list {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
    background-color: #3a3f43;
    min-width: 120px;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.4);
    background-color: #4a515d;
}

/* Font Awesomeアイコンのスタイル */
.contact-item i {
    font-size: 2rem; /* サイズを調整 */
    margin-bottom: 0.5rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .contact-list {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        max-width: 200px;
    }
}

.footer {
    background: linear-gradient(90deg, #6a0dad 0%, #343a40 100%);
    color: white;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer-text {
    font-size: 14px;
    font-weight: normal;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        gap: 15px;
    }
}

.footer-links a {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6a0dad, #343a40);
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

.footer-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(106, 13, 218, 0.4);
    background: linear-gradient(135deg, #7d1ae2, #4a515d);
}

.footer-links a:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 6px rgba(106, 13, 218, 0.3);
}

.footer-links a[href*="mcgendai"] {
    transition: all 0.3s ease;
}

.footer-links a[href*="mcgendai"].clicked {
    transform: scale(0.95);
    opacity: 0.8;
    filter: brightness(0.9);
}
