/* Google Fonts */
body {
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Meiryo', sans-serif;
  background: #fff;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

/* アクセシビリティ対応 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* フォーカス表示の改善 */
*:focus {
  outline: 2px solid #007BFF;
  outline-offset: 2px;
}

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #007BFF;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
}

.site-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 12px;
}

.nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: #007BFF;
}

.hero {
  background: #f8f9fa;
  padding: 12px 0 16px 0;
  text-align: center;
}

.hero-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-title {
  font-size: 1.1rem;
  color: #007BFF;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  color: #007BFF;
  text-align: left;
}

.works-section {
  padding: 64px 0 48px 0;
}

.works-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #fff;
  border: 1.5px solid #007BFF;
  color: #007BFF;
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
}

.filter-btn.active,
.filter-btn:hover {
  background: #007BFF;
  color: #fff;
}

/* フィルターボタンのアクセシビリティ */
.filter-btn[aria-selected="true"] {
  background: #007BFF;
  color: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.work-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.10);
}

.work-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #eee;
}

/* 遅延読み込み対応 */
.work-thumb.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.work-thumb.lazy.loaded {
  opacity: 1;
}

.work-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.work-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.work-category {
  font-size: 0.95rem;
  color: #007BFF;
  margin-bottom: 12px;
}

/* 作品説明文のスタイル */
.work-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 8px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-link {
  margin-top: auto;
  color: #007BFF;
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.2s;
}

.work-link:hover {
  text-decoration: underline;
}

.about-section,
.contact-section {
  padding: 64px 0 48px 0;
}

.about-content {
  font-size: 1.05rem;
  color: #333;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 32px 24px;
}

.about-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 24px;
  display: block;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #f8f9fa;
  border-radius: 50%;
  transition: background 0.2s;
}

.contact-links a:hover {
  background: #e9ecef;
}

.contact-note {
  text-align: center;
  color: #666;
  margin: 0;
}

footer {
  background: #f8f9fa;
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid #eee;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    padding: 24px 16px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    text-align: center;
  }
}

.links-section {
  padding: 64px 0 48px 0;
  background: #f8f9fa;
}

.links-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  color: #007BFF;
  text-align: center;
}

.links-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.link-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s;
}

.link-circle:hover {
  transform: translateY(-2px);
}

.link-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.link-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .work-card {
    border: 2px solid #333;
  }
  
  .filter-btn {
    border-width: 2px;
  }
}

/* モーション削減対応 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .work-card:hover {
    transform: none;
  }
  
  .link-circle:hover {
    transform: none;
  }
}



@media (max-width: 600px) {
  .links-grid {
    gap: 24px;
  }

  .link-circle {
    width: 80px;
  }

  .links-title {
    font-size: 1.4rem;
  }

  .link-label {
    font-size: 0.8rem;
  }
}

/* 印刷スタイル */
@media print {
  header,
  .works-filter,
  .contact-links,
  footer {
    display: none;
  }
  
  .work-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .hero {
    background: none;
    padding: 20px 0;
  }
} 

/* ダークモード切替ボタン */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  border: 1.5px solid #eee;
  border-radius: 20px;
  font-size: 1rem;
  padding: 6px 16px;
  margin-left: 18px;
  color: #333;
  transition: background 0.2s, color 0.2s, border 0.2s;
  outline: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.theme-toggle:hover, .theme-toggle:focus {
  background: #e9ecef;
  color: #007BFF;
  border-color: #007BFF;
}
body.dark-mode .theme-toggle {
  background: #23272b;
  color: #f2f4f8;
  border-color: #333;
}
body.dark-mode .theme-toggle:hover, body.dark-mode .theme-toggle:focus {
  background: #181c1f;
  color: #6ea8fe;
  border-color: #6ea8fe;
}

/* ダークモード本体 */
body.dark-mode {
  background: #181c1f;
  color: #f2f4f8;
}
body.dark-mode header {
  background: #181c1f;
  border-bottom-color: #222;
}
body.dark-mode .hero {
  background: #23272b;
}
body.dark-mode .site-title,
body.dark-mode .section-title,
body.dark-mode .links-title {
  color: #6ea8fe;
}
body.dark-mode .work-card {
  background: #23272b;
  color: #f2f4f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
body.dark-mode .work-category {
  color: #6ea8fe;
}
body.dark-mode .work-description {
  color: #bfc8d6;
}
body.dark-mode .about-content {
  background: #23272b;
  color: #f2f4f8;
}
body.dark-mode .links-section {
  background: #23272b;
}
body.dark-mode .link-circle {
  color: #f2f4f8;
}
body.dark-mode .link-circle:hover {
  color: #6ea8fe;
}
body.dark-mode .link-label {
  color: #bfc8d6;
}
body.dark-mode .link-img {
  background: #23272b;
}
body.dark-mode .contact-links a {
  background: #23272b;
}
body.dark-mode .contact-links a:hover {
  background: #2d3237;
}
body.dark-mode .contact-note {
  color: #bfc8d6;
}
body.dark-mode footer {
  background: #23272b;
  border-top-color: #222;
  color: #bfc8d6;
}
body.dark-mode .filter-btn {
  background: #23272b;
  color: #6ea8fe;
  border-color: #6ea8fe;
}
body.dark-mode .filter-btn.active,
body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn[aria-selected="true"] {
  background: #6ea8fe;
  color: #23272b;
}
body.dark-mode .sr-only {
  color: #23272b;
} 
body.dark-mode .hero-name {
  color: #fff;
}
body.dark-mode .hero-title {
  color: #6ea8fe;
}
body.dark-mode .hero-desc {
  color: #e0e6eb;
} 
body.dark-mode .nav-list a {
  color: #f2f4f8 !important;
  font-weight: 700;
}
body.dark-mode .nav-list a:hover {
  color: #6ea8fe !important;
} 
body.dark-mode .contact-links svg,
body.dark-mode .links-grid svg {
  filter: brightness(2) drop-shadow(0 0 2px #23272b);
  fill: #f2f4f8 !important;
}
body.dark-mode .link-img,
body.dark-mode .about-icon {
  background: #181c1f;
  border: 2px solid #6ea8fe;
  box-shadow: 0 2px 8px rgba(110,168,254,0.15);
} 

/* ロードモアボタン */
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 40px auto 20px;
  padding: 16px 32px;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.load-more-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn:focus {
  outline: 2px solid #0056b3;
  outline-offset: 2px;
}

/* ローディングインジケーター */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007BFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-indicator p {
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

/* ダークモード対応 */
body.dark-mode .load-more-btn {
  background: #6ea8fe;
  color: #23272b;
  box-shadow: 0 2px 8px rgba(110, 168, 254, 0.3);
}

body.dark-mode .load-more-btn:hover {
  background: #5b9bfe;
  box-shadow: 0 4px 12px rgba(110, 168, 254, 0.4);
}

body.dark-mode .load-more-btn:focus {
  outline: 2px solid #5b9bfe;
}

body.dark-mode .spinner {
  border-color: #23272b;
  border-top-color: #6ea8fe;
}

body.dark-mode .loading-indicator p {
  color: #bfc8d6;
}