/*! laoguanTX bundle: about-page */
/* source: components/post-content.css */
/* ========================================
 * Post Content — 文章正文排样 / 上下一篇 / 分页导航
 * 配对组件: components/post-content.php、components/post-near.php、
 *           components/page-navigator.php
 * ======================================== */

/* --- Post Content --- */
.post-content {
  font-size: var(--content-font-size, var(--text-base));
  line-height: var(--leading-relaxed);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-content p {
  margin-bottom: var(--space-4);
}

/* ========================================
 * 文章标题
 * H2: 主题色下边框
 * H3: 主题色左圆头短条
 * H4: 无额外装点
 * ======================================== */
.post-content h2 {
  position: relative;
  margin-top: var(--space-10);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-2);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: 1.5;
  border-bottom: 2px solid var(--color-primary);
}

.post-content h3 {
  position: relative;
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
  padding-left: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: 1.55;
}

/* H3 左侧圆头短条装点 */
.post-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  background: var(--color-primary);
  border-radius: 999px;
}

.post-content h4 {
  position: relative;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: 1.55;
}

/* H4 左侧主题色圆点 */
.post-content h4::before {
  content: '';
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-right: 0.3em;
  background: var(--color-primary);
  border-radius: 50%;
  vertical-align: middle;
}
/* ========================================
 * 标题悬浮效果
 * 悬浮变主题色 + 右侧淡入 Iconify 锚点图标
 * ======================================== */
.post-content h2,
.post-content h3,
.post-content h4 {
  transition: color var(--transition-base) ease;
}

.post-content h2:hover,
.post-content h3:hover,
.post-content h4:hover {
  color: var(--color-primary);
}

/* Iconify 锚点图标：等大、居中、悬停淡入 */
.post-content .heading-anchor-icon {
  margin-left: 10px;
  vertical-align: -7%;
  font-size: 1em;
  color: color-mix(in srgb, var(--color-primary) 60%, transparent);
  opacity: 0;
  transition: opacity var(--transition-base) ease;
  cursor: pointer;
  pointer-events: auto;
}

.post-content .heading-anchor-icon + .heading-anchor-icon {
  margin-left: 2px;
}

.post-content h2:hover .heading-anchor-icon,
.post-content h3:hover .heading-anchor-icon,
.post-content h4:hover .heading-anchor-icon {
  opacity: 1;
}

.post-content ul,
.post-content ol {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.post-content li {
  margin-bottom: var(--space-2);
}

.post-content img,
.post-content video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  border-radius: var(--radius-md);
}

.post-content a {
  color: var(--color-primary);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast) var(--ease-in-out),
              color var(--transition-fast) var(--ease-in-out);
}

.post-content a:hover {
  color: var(--color-primary-dark);
  background: color-mix(in srgb, var(--color-bg-secondary) 93%, var(--color-primary) 7%);
}

.post-content a img {
  display: block;
  background: transparent;
}

/* --- MathJax 数学公式 --- */
.post-content mjx-container {
  font-size: 1.05em;
  line-height: 1.2;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--color-primary) 30%, transparent) transparent;
}

.post-content mjx-container::-webkit-scrollbar {
  height: 6px;
}
.post-content mjx-container::-webkit-scrollbar-track {
  background: transparent;
}
.post-content mjx-container::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: var(--radius-full);
}
.post-content mjx-container::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--color-primary) 50%, transparent);
}

.post-content mjx-container[display="true"] {
  display: block;
  margin: var(--space-4) 0;
  text-align: center;
  padding: var(--space-2) 0;
}

/* --- Post Navigation (上一篇 / 下一篇) --- */
.post-near {
  margin: var(--space-8) 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-near li {
  margin: 0;
  padding: var(--space-4);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition-fast) var(--ease-in-out);
}

.post-near li:hover {
  border-color: var(--color-primary);
}

.post-near a {
  font-weight: var(--font-medium);
}

/* --- Page Navigator (分页) --- */
.page-navigator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-8) 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.page-navigator li {
  display: inline-block;
}

.page-navigator a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition-fast) var(--ease-in-out);
}

.page-navigator a:hover {
  background: color-mix(in srgb, var(--color-bg-secondary) 92%, var(--color-primary) 8%);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.page-navigator .current a {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* --- Post Copyright 版权卡片 --- */
.post-copyright {
  position: relative;
  overflow: hidden;
  margin: var(--space-8) 0 0 0;
  padding: var(--space-5);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.6;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-copyright-bg-icon {
  position: absolute;
  right: -0.08em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14em;
  color: var(--color-text-muted);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.post-copyright-body {
  position: relative;
  z-index: 1;
}

.post-copyright-item {
  display: flex;
  align-items: baseline;
  margin-bottom: var(--space-1);
}

.post-copyright-label {
  flex-shrink: 0;
  width: 6em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.post-copyright-label iconify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3em;
  margin-right: 0.25em;
  font-size: 1.1em;
  color: var(--color-primary);
}

.post-copyright-sep {
  width: 1px;
  height: 1.1em;
  background: var(--color-border);
  margin: 0 var(--space-1);
  align-self: center;
  flex-shrink: 0;
}

.post-copyright-value {
  flex: 1;
  color: var(--color-text-primary);
}

.post-copyright-value a {
  color: var(--color-primary);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast) var(--ease-in-out),
              color var(--transition-fast) var(--ease-in-out);
}

.post-copyright-value a:hover {
  color: var(--color-primary-dark);
  background: color-mix(in srgb, var(--color-bg-secondary) 93%, var(--color-primary) 7%);
}

/* --- 响应式 (移动) --- */
@media (max-width: 767px) {
  .page-navigator a {
    min-width: 32px;
    height: 32px;
    font-size: var(--text-xs);
  }

  .post-copyright {
    padding: var(--space-4);
  }

  .post-copyright-item {
    flex-direction: column;
    margin-bottom: var(--space-2);
  }

  .post-copyright-label {
    width: auto;
    margin-bottom: var(--space-1);
  }

  .post-copyright-sep {
    display: none;
  }
}

.page-navigator-list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* source: pages/about.css */
/* ========================================
 * About Page — Bento 网格布局骨架
 * 配对页面: pages/about.php
 *
 * 短代码的具体样式在各自的 CSS 中：
 *   shortcodes/about_hero.css
 *   shortcodes/about_motto.css
 *   shortcodes/about_now.css
 *   shortcodes/about_social.css
 *   shortcodes/about_skills.css
 *   shortcodes/about_timeline.css
 *
 * 本文件仅保留：
 *   1. Bento 网格容器
 *   2. 基础卡片（通用层）
 *   3. Grid placement（桌面/平板/手机）
 *   4. 页面 Markdown 正文
 * ======================================== */

/* ========================================
 * 1. BENTO GRID CONTAINER
 * ======================================== */

.about-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

/* ========================================
 * 2. BASE CARD
 * ======================================== */

.about-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base) var(--ease-in-out),
              box-shadow var(--transition-base) var(--ease-in-out),
              border-color var(--transition-base) var(--ease-in-out);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.about-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.about-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about-card-title iconify-icon {
  color: var(--color-primary);
  font-size: var(--text-base);
  flex-shrink: 0;
}

/* ========================================
 * 3. GRID PLACEMENT — Desktop (4 cols)
 * ======================================== */

.about-card--hero {
  grid-column: 1 / 5;
  grid-row: 1 / 2;
}

.about-card--motto {
  grid-column: 1 / 5;
  grid-row: 2 / 3;
}

.about-card--now {
  grid-column: 1 / 3;
  grid-row: 3 / 4;
}

.about-card--skills {
  grid-column: 3 / 5;
  grid-row: 3 / 4;
}

.about-card--timeline {
  grid-column: 1 / 5;
  grid-row: 5 / 6;
}

.about-card--social {
  grid-column: 1 / 5;
  grid-row: 4 / 5;
}

/* ========================================
 * 4. PAGE CONTENT (Markdown 补充介绍)
 * ======================================== */

.about-content {
  margin-top: var(--space-8);
  padding: var(--space-8);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ========================================
 * 5. RESPONSIVE — Tablet (≤ 767px)
 * ======================================== */

@media (max-width: 767px) {
  .about-bento {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Reset all placements — auto-flow */
  .about-card--hero,
  .about-card--motto,
  .about-card--now,
  .about-card--social,
  .about-card--skills,
  .about-card--timeline {
    grid-column: auto;
    grid-row: auto;
  }

  /* 所有卡片在 tablet 均占满一行 */
  .about-card--hero,
  .about-card--motto,
  .about-card--now,
  .about-card--skills,
  .about-card--social,
  .about-card--timeline {
    grid-column: 1 / 3;
  }

  .about-content {
    padding: var(--space-5);
  }
}

/* ========================================
 * 6. RESPONSIVE — Mobile (≤ 480px)
 * ======================================== */

@media (max-width: 480px) {
  .about-bento {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-card--hero,
  .about-card--motto,
  .about-card--now,
  .about-card--skills,
  .about-card--social,
  .about-card--timeline {
    grid-column: 1 / 2;
  }

  .about-card {
    padding: var(--space-5);
  }
}
