/* ============================================================
   GAIA — 金融投资视觉画廊
   极简苹果风：留白 · 无边框 · 无装饰
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --ink: #1D1D1F;
  --ink-soft: #6E6E73;
  --ink-faint: #A1A1A6;
  --hairline: #E8E8ED;
  --accent: #000000;
  --max-read: 680px;
  --gutter: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------------- 导航 ---------------- */
.site-nav {
  width: 100%;
  padding: 0 var(--gutter);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand em {
  font-style: normal;
  color: var(--ink-faint);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  color: var(--ink-soft);
  transition: color .2s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------------- 布局骨架 ---------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  padding: 9vh 0 6vh;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero p {
  margin-top: 20px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 560px;
}

.hero-mini {
  margin-top: 14px !important;
  font-size: 14px !important;
  color: var(--ink-faint) !important;
}

.hero-mini a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color .18s ease, border-color .18s ease;
}

.hero-mini a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------------- 首页：画廊网格 ---------------- */
.gallery {
  padding: 0 0 10vh;
}

.gallery-item {
  display: block;
  margin-bottom: 9vh;
}

.gallery-item:last-child { margin-bottom: 0; }

.gallery-figure {
  overflow: hidden;
}

.gallery-figure img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}

.gallery-item:hover .gallery-figure img {
  transform: scale(1.02);
}

.gallery-caption {
  padding: 14px 2px 0;
}

.gallery-caption h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.gallery-caption time {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ---------------- 博文页 ---------------- */
.post {
  padding: 8vh 0 12vh;
}

.post-head {
  max-width: var(--max-read);
  margin: 0 auto;
}

.post-head h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.post-head time {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 正文：文字左对齐，图片全宽居中 */
.post-body {
  max-width: var(--max-read);
  margin: 0 auto;
}

.post-body p {
  margin: 0 0 1.4em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}

.post-body p:last-child { margin-bottom: 0; }

.post-figure {
  margin: 6vh auto;
  max-width: 1200px;
}

.post-figure img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.post-figure figcaption {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.post-divider {
  height: 1px;
  background: var(--hairline);
  margin: 10vh auto;
  max-width: var(--max-read);
}

.post-foot {
  max-width: var(--max-read);
  margin: 0 auto;
  padding-bottom: 10vh;
}

.post-foot a {
  display: inline-block;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color .2s ease;
}

.post-foot a:hover { color: var(--ink); }

/* ---------------- Giscus 评论区 ---------------- */
.comments {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 0 14vh;
}

.comments h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.giscus {
  width: 100%;
}

/* ---------------- 关于页 ---------------- */
.about {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 8vh 0 14vh;
}

.about h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 6vh;
}

.about p {
  margin-bottom: 1.5em;
  font-size: 19px;
  line-height: 1.6;
}

.about p:last-child { margin-bottom: 0; }

.about-sign {
  margin-top: 8vh;
  font-size: 15px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ---------------- 归档页 ---------------- */
.archive {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 8vh 0 14vh;
}

.archive h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 8vh;
}

.archive-year {
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.archive-list {
  list-style: none;
}

.archive-list li {
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}

.archive-list li:first-child { padding-top: 0; }
.archive-list li:last-child { border-bottom: none; }

.archive-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.archive-list .t {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .2s ease;
}

.archive-list a:hover .t { color: var(--ink-soft); }

.archive-list .d {
  font-size: 14px;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  padding: 0 var(--gutter) 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner small {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.footer-inner a {
  font-size: 13px;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.footer-inner a:hover { color: var(--ink); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  body { font-size: 18px; }

  .nav-inner { padding: 20px 0; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 15px; }

  .hero { padding: 7vh 0 5vh; }
  .gallery-item { margin-bottom: 7vh; }
  .gallery-caption h2 { font-size: 21px; }

  .post { padding: 6vh 0 9vh; }
  .post-figure { margin: 4.5vh auto; }
  .post-divider { margin: 8vh auto; }

  .archive-list a {
    flex-direction: column;
    gap: 6px;
  }

  .archive-list .d { white-space: normal; }
}

/* 触控设备：去掉 hover 缩放避免粘连感 */
@media (hover: none) {
  .gallery-item:hover .gallery-figure img { transform: none; }
}

/* ---------------- 减弱动效偏好 ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------- 预加载字体提示 ---------------- */
.fonts-loaded body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}
