/* デザインシステム変数 */
:root {
  /* カラーパレット */
  --primary: #2C3E50;
  --primary-light: #34495E;
  --accent: #3498DB;
  /* Bright Blue */
  --accent-dark: #2980B9;
  --accent-red: #E74C3C;
  /* Red Accent */
  --neutral-dark: #2C3E50;
  --neutral: #7F8C8D;
  --neutral-light: #BDC3C7;
  --background: #FFFFFF;
  --background-alt: #F0F4F8;
  /* Slightly blue-ish gray */
  --success: #2ECC71;
  --warning: #F1C40F;
  --error: #E74C3C;

  /* タイポグラフィ */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* スペーシング */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* シャドウ (より濃く調整) */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.22);
}

/* リセット & ベーススタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: var(--background);
}

main {
  padding-top: 70px;
  /* 固定ヘッダーの高さ分、メイン領域を下げる */
}

/* コンテナ */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* セクション */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background-color: var(--background-alt);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--primary);
}

/* アニメーション */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: none;
  border-radius: 4px;
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: var(--space-xs);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* カード */
.card {
  background: var(--background);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

/* Lightbox/Modal Styles */
.simple-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.simple-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.simple-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.simple-lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.simple-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  transition: color 0.3s ease;
}

.simple-lightbox-close:hover {
  color: var(--accent-red);
}

.simple-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--accent);
}

.simple-lightbox-prev {
  left: -60px;
}

.simple-lightbox-next {
  right: -60px;
}

@media (max-width: 768px) {
  .simple-lightbox-prev {
    left: 10px;
  }

  .simple-lightbox-next {
    right: 10px;
  }

  .simple-lightbox-close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
  }
}

/* 共通ページヘッダー (Glassmorphism & Dynamic) */
.page-header {
  padding: 60px 0 60px;
  /* 余白を増やして重なりを解消 */
  background-color: var(--primary);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center top;
  text-align: center;
  position: relative;
  color: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.3),
    /* 深い影 */
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  /* 下端の微かなライン */
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(44, 62, 80, 0.3) 0%,
      rgba(52, 152, 219, 0.1) 100%);
  backdrop-filter: blur(15px);
  /* ぼかしを強める */
  -webkit-backdrop-filter: blur(15px);

  /* 中心に向かってぼかすためのマスク（中心がぼけて、外側がクリアに） */
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 90%);
  mask-image: radial-gradient(circle at center, black 0%, transparent 90%);
  z-index: 1;
}

/* 光沢・シャドウ演出 */
.page-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 70%);
  z-index: 2;
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 3;
}

/* 気泡アニメーション */
.bubbles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -100px;
  /* 出現位置をさらに下へ */
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  opacity: 0;
  /* 最初は透明に */
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.3),
    0 4px 15px rgba(0, 0, 0, 0.2);
  animation: wave-rise linear infinite;
  animation-fill-mode: backwards;
  /* 遅延中も0%のスタイルを適用 */
}

@keyframes wave-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-120vh) scale(1.2);
    opacity: 0;
  }
}

.page-header-works {
  background-image: url('../images/header_works.jpg');
}

.page-header-about {
  background-image: url('../images/header_about.jpg');
}

.page-header-skills {
  background-image: url('../images/header_skills.jpg');
}

.page-header-contact {
  background-image: url('../images/header_contact.jpg');
}

.page-header-privacy {
  background-image: url('../images/header_privacy.jpg');
}

.breadcrumb {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.page-header h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: white;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

.page-description {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .page-header {
    padding: 20px 0 20px;
  }

  .page-header h1 {
    font-size: var(--text-3xl);
  }
}