/* ================================================
   Visual Poem CSS - 20251119-001
   思いがけない揺れ

   Theme: エルゴード文学風モノトーン視覚詩
   Concept: 非線形的な読書体験、揺らぎと気づき
   ================================================ */

/* ========== タイトルエフェクト無効化 ========== */
.article-title {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* ========== キーワード共通スタイル ========== */
.keyword {
  position: relative;
  display: inline-block;
  font-weight: 500;
  padding: 0 0.2em;
  transition: all 0.3s ease;
}

/* ========== subtle (繊細) - 薄い線、透明度 ========== */
.keyword-subtle {
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  padding: 0 0.3em;
}

.keyword-subtle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateY(-50%);
}

.keyword-subtle::after {
  content: '';
  position: absolute;
  left: -0.5em;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ========== perception (知覚) - 焦点 ========== */
.keyword-perception {
  color: rgba(255, 255, 255, 0.95);
  position: relative;
  letter-spacing: 0.08em;
}

.keyword-perception::before {
  content: '◦';
  position: absolute;
  left: -1em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.3);
}

.keyword-perception::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* ========== fluctuation (揺らぎ) - ずれ、不安定 ========== */
.keyword-fluctuation {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  display: inline-block;
}

.keyword-fluctuation::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.12);
  transform: translate(2px, 1px);
  z-index: -1;
  pointer-events: none;
}

.keyword-fluctuation::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.08);
  transform: translate(-1px, -1px);
  z-index: -1;
  pointer-events: none;
}

/* ========== awareness (気づき) - 明るさの変化 ========== */
.keyword-awareness {
  color: rgba(255, 255, 255, 1);
  position: relative;
  font-weight: 600;
  padding: 0.05em 0.25em;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.keyword-awareness::before {
  content: '';
  position: absolute;
  left: -0.3em;
  top: 50%;
  width: 3px;
  height: 60%;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

/* ========== sensitivity (感受性) - 影、深さ ========== */
.keyword-sensitivity {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  font-style: italic;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.1),
    2px 2px 0 rgba(255, 255, 255, 0.06);
}

.keyword-sensitivity::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ========== エルゴード文学的レイアウト ========== */

/* 段落の視覚的な配置をずらす */
.article-content p {
  position: relative;
  line-height: 2.2;
  margin: 1.8em 0;
}

/* 奇数段落を右にずらす */
.article-content section:nth-child(odd) p:nth-of-type(odd) {
  padding-left: 2em;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* 偶数段落を左にインデント */
.article-content section:nth-child(even) p:nth-of-type(even) {
  padding-left: 1em;
}

/* 重要な段落（キーワードを含む）を強調 */
.article-content p:has(.keyword-fluctuation) {
  padding-left: 1.5em;
  position: relative;
}

.article-content p:has(.keyword-fluctuation)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 0.8em;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* ========== 見出しのエルゴード的配置 ========== */
.article-content h2 {
  position: relative;
  padding: 2em 0 1em 0;
  margin: 3em 0 2em 0;
  line-height: 1.9;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: left;
}

/* 見出しごとに異なる視覚的位置 */
.article-content section:nth-child(1) h2 {
  padding-left: 0;
}

.article-content section:nth-child(2) h2 {
  padding-left: 1.5em;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.article-content section:nth-child(3) h2 {
  padding-left: 0.8em;
}

.article-content section:nth-child(4) h2 {
  padding-left: 1.2em;
}

.article-content section:nth-child(5) h2 {
  padding-left: 0.5em;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ========== リストの非線形配置 ========== */
.article-content ul {
  list-style: none;
  padding-left: 3em;
  margin: 2.5em 0;
  position: relative;
}

.article-content ul::before {
  content: '';
  position: absolute;
  left: 1em;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.article-content ul li {
  position: relative;
  padding: 0.5em 0;
  margin: 0.8em 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.article-content ul li::before {
  content: '·';
  position: absolute;
  left: -1.5em;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2em;
}

/* リストアイテムをジグザグ配置 */
.article-content ul li:nth-child(1) {
  transform: translateX(0);
}

.article-content ul li:nth-child(2) {
  transform: translateX(0.5em);
}

.article-content ul li:nth-child(3) {
  transform: translateX(1em);
}

.article-content ul li:nth-child(4) {
  transform: translateX(0.3em);
}

/* ========== セクション区切り ========== */
.article-content section {
  position: relative;
  margin: 4em 0;
  padding: 2em 0;
}

.article-content section::after {
  content: '⋯';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.8em;
  font-size: 0.8em;
}

.article-content section:last-of-type::after {
  content: '━';
  letter-spacing: 0;
}

/* ========== 画像キャプション ========== */
.image-caption {
  text-align: center;
  font-style: italic;
  margin-top: 2em;
  padding-top: 1.5em;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  font-size: 0.9em;
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-caption::before {
  content: '╱';
  position: absolute;
  left: 50%;
  top: -0.5em;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.2em;
}

/* ========== ホバー効果（控えめ） ========== */
.keyword:hover {
  color: rgba(255, 255, 255, 1);
  letter-spacing: 0.1em;
}

.keyword-fluctuation:hover::before,
.keyword-fluctuation:hover::after {
  opacity: 0.3;
}

/* ========== レスポンシブ調整 ========== */
@media (max-width: 768px) {
  .article-content section:nth-child(odd) p:nth-of-type(odd),
  .article-content section:nth-child(even) p:nth-of-type(even) {
    padding-left: 1em;
  }

  .article-content section h2 {
    padding-left: 0 !important;
    border-left: none !important;
  }

  .article-content ul {
    padding-left: 2em;
  }

  .article-content ul li {
    transform: translateX(0) !important;
  }
}

/* ========== アクセシビリティ ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01s !important;
  }
}

@media (prefers-contrast: high) {
  .keyword {
    font-weight: 600;
  }
}
