/* カラー変数 - デジタル庁風の洗練されたパレット */
:root {
  --color-primary: #1e5fa7;
  --color-primary-dark: #164177;
  --color-primary-light: #e8f2fc;
  --color-text: #212121;
  --color-text-light: #616161;
  --color-background: #ffffff;
  --color-background-alt: #f5f7fa;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;
  --font-family: "FOT-ハミング Std B", "HummingStd-B", sans-serif;
}

/* =========================================
   CSS Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* iOSでの文字サイズ自動調整を防止 */
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-background);
  outline: none;
  -webkit-font-smoothing: antialiased; /* Mac/iOSでのフォントレンダリング最適化 */
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  text-decoration: underline;
}

/* コンテナ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ヘッダー - 洗練されたデザイン */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s, background 0.3s;
}

.header--shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  z-index: 110;
}

/* デスクトップナビゲーション */
.header__nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

.header__nav a {
  font-weight: 700;
  color: var(--color-text);
  position: relative;
}

.header__nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.header__nav a:hover::after {
  width: 100%;
}

.header__nav a:hover {
  text-decoration: none;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: block;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero__name {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero__name-en {
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-light);
  margin-top: 8px;
}

.hero__tagline {
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, #1e5fa7 0%, #164177 100%);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 95, 167, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 16px rgba(30, 95, 167, 0.35);
}

.btn--secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn--secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(30, 95, 167, 0.15);
}

/* セクション */
.section {
  padding: 120px 0;
}

.section--alt {
  background: var(--color-background-alt);
}

.section__title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 48px;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s, transform 0.5s;
}

.section__title::before {
  content: "";
  width: 40px;
  height: 4px;
  background: var(--color-primary);
  position: absolute;
  bottom: -12px;
  left: 0;
  border-radius: 2px;
}

.section__title.show {
  opacity: 1;
  transform: translateX(0);
}

.section__content {
  max-width: 700px;
  margin: 0 auto;
}

/* Skills Section */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.skill-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.skill-card__icon svg {
  width: 100%;
  height: 100%;
}

.skill-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.skill-card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-light);
}

/* Nickname */
.nickname {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

/* Highlight Box */
.highlight-box {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  padding: 24px;
  border-radius: 8px;
}

.highlight-box p {
  margin: 0;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.8;
}

/* Page Header */
.page-header {
  background: var(--color-background-alt);
  padding: 80px 0 60px;
  text-align: center;
}

.page-header__title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text);
}

.page-header__desc {
  color: var(--color-text-light);
  font-size: 16px;
}

/* Footer */
.footer {
  background: var(--color-text);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 14px;
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
  z-index: 99;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-4px);
}

.scroll-top svg {
  width: 24px;
  height: 24px;
}

/* ギャラリーページ */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 1px solid var(--color-border);
  padding: 8px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-family);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-item__info {
  padding: 16px;
}

.gallery-item__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.gallery-item__cat {
  font-size: 12px;
  color: var(--color-text-light);
  background: var(--color-background-alt);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Aboutページ */
.about-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-image {
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  /* ドットの中心に合わせる */
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-date {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
}

.timeline-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* Worksページ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.work-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.work-card__img {
  width: 100%;
  height: 200px;
  background-color: #f0f0f0;
}

.work-card__content {
  padding: 24px;
}

.work-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.work-card__desc {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.work-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 12px;
  background: var(--color-background-alt);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--color-text-light);
}

.tag--clickable {
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.tag--clickable:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.work-card__link {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 14px;
}

/* Contactページ */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
}

.contact-social {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form {
  background: white;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* =========================================
   レスポンシブデザイン - 90%デバイスカバレッジ
   ========================================= */

/* 小型スマホ（360×800 など Android 主流） */
@media (max-width: 480px) {
  /* ヘッダー */
  .hamburger {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-background);
    padding-top: 80px;
    transition: right 0.3s;
    z-index: 100;
    display: flex;
    justify-content: center;
  }

  .header__nav.active {
    right: 0;
  }

  .header__nav ul {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .header__nav a {
    font-size: 18px;
  }

  /* Hero */
  .hero__avatar {
    width: 100px;
    height: 100px;
    font-size: 32px;
  }

  .hero__name {
    font-size: 22px;
  }

  .hero__tagline {
    font-size: 14px;
    padding: 0 12px;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .btn {
    width: 100%;
    max-width: 260px;
    text-align: center;
    font-size: 14px;
    padding: 10px 20px;
  }

  /* セクション */
  .section {
    padding: 40px 0;
  }

  .section__title {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .section__content {
    padding: 0 12px;
  }

  .section__content p {
    font-size: 14px;
    line-height: 1.7;
  }

  .text-small {
    font-size: 10px !important;
  }

  .nickname {
    font-size: 11px;
  }

  /* About */
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* スキル */
  .skills {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 12px;
  }

  .skill-card {
    padding: 16px;
  }

  /* ギャラリー */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-filter {
    gap: 8px;
    margin-bottom: 24px;
  }

  .filter-btn {
    padding: 6px 16px;
    font-size: 13px;
  }

  /* ブログ */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blog-card__content {
    padding: 16px;
  }

  .blog-card__title {
    font-size: 18px;
  }

  /* コンタクト */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-form {
    padding: 20px;
  }

  /* タイムライン */
  .timeline::before {
    left: 12px;
  }

  .timeline-date {
    width: 26px;
    height: 26px;
    font-size: 9px;
  }

  .timeline-item {
    padding-left: 44px;
    margin-bottom: 32px;
  }

  /* ページヘッダー */
  .page-header__title {
    font-size: 28px;
  }

  .page-header__desc {
    font-size: 14px;
  }

  /* 記事詳細 */
  .article-header {
    padding: 40px 0 30px;
  }

  .article-header__title {
    font-size: 24px;
  }

  .article-body {
    padding: 0 12px;
  }

  .article-body h2 {
    font-size: 20px;
    margin-top: 28px;
  }

  .article-body h3 {
    font-size: 18px;
  }

  .article-body pre {
    padding: 14px;
    font-size: 12px;
  }
}

/* スマホ横・大型スマホ（481px〜768px）iPhone Plus/Max, タブレット小 */
@media (min-width: 481px) and (max-width: 768px) {
  /* ハンバーガーメニューは継続 */
  .hamburger {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-background);
    padding-top: 80px;
    transition: right 0.3s;
    z-index: 100;
    display: flex;
    justify-content: center;
  }

  .header__nav.active {
    right: 0;
  }

  .header__nav ul {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .header__nav a {
    font-size: 20px;
  }

  /* Hero - サイズアップ */
  .hero__avatar {
    width: 130px;
    height: 130px;
  }

  .hero__name {
    font-size: 26px;
  }

  .hero__tagline {
    font-size: 16px;
  }

  .btn {
    max-width: 300px;
  }

  /* セクション */
  .section {
    padding: 56px 0;
  }

  .section__title {
    font-size: 28px;
  }

  .section__content {
    padding: 0 16px;
  }

  .section__content p {
    font-size: 15px;
  }

  /* スキル・ギャラリー - 2カラム化 */
  .skills {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* ブログ */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* About・コンタクト */
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* タイムライン */
  .timeline::before {
    left: 14px;
  }

  .timeline-date {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .timeline-item {
    padding-left: 48px;
  }
}

/* タブレット縦（768px〜1024px）iPad など */
@media (min-width: 769px) and (max-width: 1024px) {
  /* デスクトップナビゲーション表示（横幅十分） */
  .hamburger {
    display: none;
  }

  /* コンテナ幅調整 */
  .container {
    max-width: 900px;
  }

  /* Hero */
  .hero__avatar {
    width: 140px;
    height: 140px;
  }

  .hero__name {
    font-size: 32px;
  }

  .hero__tagline {
    font-size: 18px;
  }

  /* セクション */
  .section {
    padding: 80px 0;
  }

  .section__title {
    font-size: 30px;
  }

  /* スキル・ギャラリー - 2カラム */
  .skills {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* ブログ - 2カラム */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  /* コンタクト - 1カラムで余裕を持たせる */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 小型ノートPC（1025px〜1366px） */
@media (min-width: 1025px) and (max-width: 1366px) {
  .container {
    max-width: 1000px;
  }

  /* ギャラリー - 3カラム */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* ブログ - 2カラム */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  /* Works */
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* コンタクト - 2カラムに */
  .contact-wrapper {
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
  }
}

/* 標準ノートPC・デスクトップ（1367px〜1920px） */
@media (min-width: 1367px) and (max-width: 1920px) {
  .container {
    max-width: 1100px;
  }

  /* デフォルトスタイルがこの範囲に最適化済み */
  
  /* ギャラリー - 3カラム */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* ブログ - 3カラム */
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Works */
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 大型デスクトップ（1920px以上）*/
@media (min-width: 1921px) {
  .container {
    max-width: 1400px;
  }

  /* 余白を増やして見やすく */
  .section {
    padding: 140px 0;
  }

  /* Hero */
  .hero__avatar {
    width: 180px;
    height: 180px;
  }

  .hero__name {
    font-size: 48px;
  }

  .hero__tagline {
    font-size: 22px;
  }

  /* セクションタイトル */
  .section__title {
    font-size: 36px;
  }

  /* ギャラリー - 4カラム */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }

  /* ブログ - 3カラム維持（読みやすさ優先） */
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  /* Works - 3カラム */
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }
}

/* 動きを減らす設定の人向け */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .hero__avatar,
  .hero__name,
  .hero__tagline,
  .hero__buttons,
  .section__title,
  .section__content,
  .skill-card {
    opacity: 1;
    transform: none;
  }
}

/* =========================================
   Contactページ (SNS)
   ========================================= */
.contact-sns-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-message {
  margin-bottom: 32px;
  line-height: 1.8;
}

.sns-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.sns-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  color: white;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sns-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.sns-link svg {
  width: 24px;
  height: 24px;
}

.sns-link--x {
  background-color: #000;
}

.sns-link--instagram {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.sns-link--note {
  background-color: #41c9b4; /* note brand color */
}

/* =========================================
   Blogページ
   ========================================= */

/* ブログタグフィルター */
.blog-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* ブログ記事一覧グリッド */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

/* ブログカード */
.blog-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card__link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.blog-card__img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--color-background-alt);
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card__img img {
  transform: scale(1.05);
}

.blog-card__content {
  padding: 24px;
}

.blog-card__date {
  display: block;
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.blog-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--color-text);
}

.blog-card__excerpt {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.blog-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================================
   記事詳細ページ
   ========================================= */

/* 記事ヘッダー */
.article-header {
  background: var(--color-primary-light);
  padding: 60px 0 40px;
  margin-bottom: 40px;
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-header__date {
  font-size: 14px;
  color: var(--color-text-light);
}

.article-header__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-header__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

/* 記事本文 */
.article-content {
  padding: 40px 0;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.article-body h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-body p {
  margin-bottom: 24px;
  color: var(--color-text);
}

.article-body ul,
.article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

/* 記事内画像 */
.article-image {
  margin: 40px 0;
  text-align: center;
}

.article-image img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.article-image figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-text-light);
  font-style: italic;
}

/* 引用 */
.article-quote {
  background: var(--color-background-alt);
  border-left: 4px solid var(--color-primary);
  padding: 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
}

.article-quote p {
  margin: 0;
  font-style: italic;
  color: var(--color-text-light);
}

/* コードブロック */
.article-body pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.article-body code {
  background: var(--color-background-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
}

.article-body pre code {
  background: none;
  padding: 0;
}

/* 記事ナビゲーション */
.article-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.article-nav__back {
  display: inline-block;
  padding: 12px 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.3s, transform 0.2s;
}

.article-nav__back:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  text-decoration: none;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-header {
    padding: 40px 0 30px;
  }

  .article-header__title {
    font-size: 28px;
  }

  .article-body h2 {
    font-size: 24px;
    margin-top: 32px;
  }

  .article-body h3 {
    font-size: 20px;
  }

  .article-body {
    padding: 0 16px;
  }

  .article-body pre {
    padding: 16px;
    font-size: 13px;
  }
}

/* =========================================
   コメント欄
   ========================================= */
.comments {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.comments h2 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}

/* Image Info Overlay */
.image-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .image-info {
  opacity: 1;
}

.image-date,
.image-location {
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.image-date {
  font-weight: 700;
}

/* Image Tags */
.image-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.image-tag {
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
