:root {
  --gitanes-blue: #2a52be; /* ジタンブルーをイメージした鮮やかな青 */
  --bg-main: #f0f4f8;      /* 背景は少し明るめのグレーで青を引き立てる */
  --bg-card: #ffffff;      /* カードは白でマテリアルデザイン風に */
  --primary-blue: #2a52be;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: scroll; /* 常にスクロールバーを表示してガタつきを防止 */
}

.container {
  max-width: 1100px;
  width: 95%;
  margin: 1rem auto;
  padding: 2rem;
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  border-radius: 1rem;
}

header {
  padding: 1.5rem 0;
  text-align: center;
  background-color: var(--gitanes-blue);
  margin: -2rem -2rem 0 -2rem; /* 下のマージンを削除 */
  border-radius: 1rem 1rem 0 0;
  color: #ffffff;
}

#introduction {
  background-color: #f8fafc; /* 最初の、ごく淡いブルーグレーに戻す */
  margin: 0 -2rem 2.5rem -2rem;
  padding: 2rem 2rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: inset 0 -5px 15px rgba(0,0,0,0.02); /* 落ち着いた奥行き */
}

.profile-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-md);
}

.profile-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

header .title {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.links a svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.links a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.link-disabled {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.5); /* 文字を薄く */
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05); /* 背景も薄く */
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: not-allowed; /* 禁止マークのカーソル */
  user-select: none;
}

.link-disabled svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* Terminal Styling */
.terminal-window {
  max-width: 1000px;
  margin: 0 auto;
  background-color: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  text-align: left;
  border: 1px solid #333;
}

.terminal-header {
  background-color: #323232;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  position: relative;
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.terminal-title {
  color: #999;
  font-size: 0.75rem;
  font-family: 'Courier New', Courier, monospace;
  position: absolute;
  width: 100%;
  text-align: center;
  left: 0;
  pointer-events: none;
}

.terminal-body {
  padding: 1.25rem;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d4d4d4; /* 落ち着いたグレーに戻す */
}

.terminal-line {
  display: flex;
  gap: 8px;
  margin-bottom: 0.25rem;
  justify-content: flex-start;
}

.prompt {
  color: #38bdf8; /* プロンプトは鮮やかなスカイブルー */
  font-weight: bold;
}

.command {
  color: #f8fafc; /* コマンドはほぼ白 */
}

.terminal-output {
  margin-bottom: 1rem;
  color: #d4d4d4;
  white-space: pre-wrap;
  text-align: left;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 1.1rem;
  background-color: #f8fafc;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

section {
  margin-bottom: 2.5rem;
}

section h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--gitanes-blue);
  border-left: 5px solid var(--gitanes-blue);
  padding-left: 1rem;
}

/* Skills Tags */
.skill-category {
  margin-bottom: 2.5rem;
}

.skill-category h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background: #f1f5f9; /* 白から薄いグレーに変更 */
  border: 1px solid #e2e8f0;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* わずかな影で立体感を */
  transition: all 0.2s ease;
}

.tag svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.tag:hover {
  background: #ffffff; /* ホバー時は白くして浮かび上がらせる */
  border-color: var(--gitanes-blue);
  color: var(--gitanes-blue);
}

.tag-pride {
  background: var(--gitanes-blue);
  color: #ffffff;
  border: none;
}

.tag-pride:hover {
  background: #3b66f5; /* ホバー時は少し明るい青に */
  opacity: 1;
  color: #ffffff;
}

.tag-core {
  background: #0ea5e9; /* 明るいスカイブルー */
  color: #ffffff;
  border: none;
}

.tag-core:hover {
  background: #38bdf8; /* ホバー時は少し明るいスカイブルーに */
  opacity: 1;
  color: #ffffff;
}

/* Career Journey */
.timeline {
  border-left: 3px solid var(--border-color);
  padding-left: 2rem;
  margin-left: 1rem;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.1rem; /* ユーザーの指定：左から-2.1remの位置に配置 */
  top: 0.35rem; /* テキストの1行目の上端付近に調整 */
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 3px solid var(--gitanes-blue);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--gitanes-blue);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  background: var(--bg-main);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 500;
}

.tag-sm svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.tag-more {
  font-size: 0.75rem;
  color: var(--gitanes-blue);
  background: transparent;
  padding: 0.2rem 0.6rem;
  font-weight: bold;
}

/* Achievements */
.achievement-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gitanes-blue);
}

.achievement-thumb {
  width: 100%;
  height: 180px;
  background-color: #f1f5f9;
  overflow: hidden;
  position: relative;
}

.achievement-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.achievement-card:hover .achievement-thumb img {
  transform: scale(1.05);
}

.achievement-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.achievement-category {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--gitanes-blue);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.achievement-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.achievement-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.external-link {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--gitanes-blue);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.external-link svg {
  width: 14px;
  height: 14px;
}

/* Hobby & Values */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列固定 */
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--gitanes-blue);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.card h3 svg {
  width: 20px;
  height: 20px;
  stroke: var(--gitanes-blue);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr; /* スマホやタブレットでは1列 */
  }

  .timeline {
    padding-left: 1.5rem;
    margin-left: 0.5rem;
  }

  .timeline-item::before {
    left: -1.6rem;
  }
}

@media (max-width: 640px) {
  .container {
    margin: 0;
    border-radius: 0;
    padding: 1.25rem;
    width: 100%;
    overflow-x: hidden;
  }
  header {
    margin: -1.25rem -1.25rem 0 -1.25rem;
    border-radius: 0;
    padding: 2rem 1rem;
  }
  header h1 {
    font-size: 1.8rem;
  }
  
  .links {
    gap: 0.5rem;
  }
  .links a, .link-disabled {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
  }
  
  #introduction {
    margin: 0 -1.25rem 2rem -1.25rem;
    padding: 1.5rem 1.25rem;
  }

  .terminal-title {
    display: none; /* スマホではボタンとの重なりを防ぐためタイトルを非表示 */
  }

  .terminal-header {
    justify-content: flex-start;
    height: 32px;
  }

  .terminal-body {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .terminal-line {
    flex-wrap: wrap;
    gap: 4px;
  }

  .prompt {
    word-break: break-all;
  }

  .achievement-cards {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 1.5rem;
    margin-left: 0.5rem;
  }

  .timeline-item::before {
    left: -1.6rem;
  }
}

footer {
  text-align: center;
  padding: 4rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
