/* ============================================================
 * 个人主页样式 - 杂志风
 * 核心特征：
 *   1. 大字号衬线标题（Display Serif）
 *   2. 首屏大图 hero
 *   3. 多栏网格 + 图文混排
 *   4. 强视觉层次、克制装饰
 *   5. 大量留白 + 网格分割
 * ============================================================ */

:root {
  /* 配色：纸感米白 + 墨黑 + 红铜强调 */
  --c-bg:         #faf8f3;
  --c-bg-alt:     #f1ede2;
  --c-text:       #1a1a1a;
  --c-text-soft:  #5c5c5c;
  --c-text-fade:  #8a8a8a;
  --c-border:     #e1dccc;
  --c-accent:     #a13d2d;      /* 红铜 */
  --c-accent-dk:  #7a2c20;
  --c-overlay:    rgba(20,16,12,.55);

  /* 字号体系（杂志感：标题很大，正文适中） */
  --fs-hero:      clamp(48px, 7vw, 96px);
  --fs-h1:        clamp(36px, 4.5vw, 56px);
  --fs-h2:        clamp(28px, 3vw, 38px);
  --fs-h3:        clamp(20px, 2vw, 26px);
  --fs-lead:      clamp(18px, 1.6vw, 22px);
  --fs-body:      17px;
  --fs-meta:      13px;

  --serif-display: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif SC",
                   "Songti SC", "SimSun", serif;
  --serif-text:    "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans:          -apple-system, BlinkMacSystemFont, "PingFang SC",
                   "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --max-w-narrow: 720px;
  --max-w:        1100px;
  --max-w-wide:   1320px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--serif-text);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s, opacity .2s;
}

/* ---------- 容器 ---------- */
.wrap         { max-width: var(--max-w);      margin: 0 auto; padding: 0 32px; }
.wrap-narrow  { max-width: var(--max-w-narrow);margin: 0 auto; padding: 0 32px; }
.wrap-wide    { max-width: var(--max-w-wide);  margin: 0 auto; padding: 0 32px; }

/* ---------- 顶部导航（极简，浮于大图上） ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,243,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--serif-display);
  font-size: 22px; font-weight: 600; letter-spacing: .02em;
}
.brand .sep { color: var(--c-text-fade); font-size: .7em; font-weight: 400; }
.nav { display: flex; gap: 32px; }
.nav a {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--c-text-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.nav a:hover { color: var(--c-text); }
.nav a.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* ---------- 杂志风 Hero（首页大图） ---------- */
.hero-magazine {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #1a1a1a;
}
.hero-magazine .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.78) contrast(1.05);
  z-index: 0;
}
.hero-magazine .bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6) 100%);
}
.hero-magazine .hero-inner {
  position: relative; z-index: 2;
  padding: 60px 32px 70px;
  max-width: var(--max-w-wide);
  margin: 0 auto; width: 100%;
}
.hero-magazine .kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.8);
  margin-bottom: 18px;
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.5);
}
.hero-magazine h1 {
  font-family: var(--serif-display);
  font-size: var(--fs-hero);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 18px;
  max-width: 16ch;
}
.hero-magazine .lede {
  font-family: var(--serif-text);
  font-size: var(--fs-lead);
  line-height: 1.6;
  max-width: 52ch;
  color: rgba(255,255,255,.92);
  margin: 0 0 28px;
}
.hero-magazine .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-magazine .cta {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .15em; text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,.7);
  color: #fff;
  transition: background .2s, color .2s;
}
.hero-magazine .cta:hover { background: #fff; color: var(--c-text); }
.hero-magazine .cta.alt { background: rgba(255,255,255,.12); }

/* ---------- 内页 Hero（小一些） ---------- */
.page-hero {
  padding: 80px 0 50px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-alt);
}
.page-hero .wrap { padding: 0 32px; }
.page-hero .kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 14px;
}
.page-hero h1 {
  font-family: var(--serif-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.page-hero .lede {
  font-size: var(--fs-lead);
  color: var(--c-text-soft);
  max-width: 60ch;
  margin: 0;
}

/* ---------- 区块标题（杂志分割线风格） ---------- */
.section { margin-top: 80px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 32px;
  border-bottom: 2px solid var(--c-text);
}
.section-head .left { display: flex; align-items: baseline; gap: 16px; }
.section-head .kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--c-accent);
}
.section-head h2 {
  font-family: var(--serif-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  margin: 0;
  line-height: 1;
}
.section-head .more {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-text-soft);
}
.section-head .more:hover { color: var(--c-accent); }

/* ---------- 博客列表：杂志风多栏 ---------- */
.posts-magazine {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px 40px;
}
.post-card { display: flex; flex-direction: column; }
.post-card .thumb {
  aspect-ratio: 16/10;
  background: var(--c-bg-alt);
  margin-bottom: 18px;
  overflow: hidden;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .meta {
  font-family: var(--sans);
  font-size: var(--fs-meta); letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-text-fade);
  margin-bottom: 8px;
}
.post-card .meta .dot { margin: 0 8px; opacity: .5; }
.post-card h3 {
  font-family: var(--serif-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -.005em;
}
.post-card .excerpt {
  color: var(--c-text-soft);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.post-card .read-more {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--c-accent);
  margin-top: auto;
}
.post-card .read-more:hover { color: var(--c-accent-dk); }

/* 简洁列表（用于博客列表页 / 文章下方相关） */
.post-list-simple {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--c-border);
}
.post-list-simple li {
  display: grid;
  grid-template-columns: 100px 1fr 140px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--c-border);
  transition: padding-left .2s;
}
.post-list-simple li:hover { padding-left: 12px; }
.post-list-simple .date {
  font-family: var(--sans);
  font-size: var(--fs-meta); letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-text-fade);
}
.post-list-simple .title {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}
.post-list-simple .title:hover { color: var(--c-accent); }
.post-list-simple .tag {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-text-fade);
  text-align: right;
}

/* ---------- 摄影专辑网格 ---------- */
.album-grid-magazine {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.album-mag {
  position: relative;
  overflow: hidden;
  display: block;
  background: #000;
  color: #fff;
}
.album-mag.size-lg { grid-column: span 8; aspect-ratio: 16/10; }
.album-mag.size-md { grid-column: span 4; aspect-ratio: 3/4; }
.album-mag.size-sm { grid-column: span 4; aspect-ratio: 1/1; }
.album-mag img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s, opacity .3s;
  opacity: .9;
}
.album-mag:hover img { transform: scale(1.05); opacity: 1; }
.album-mag .overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.85) 100%);
}
.album-mag .album-kicker {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 8px;
}
.album-mag h3 {
  font-family: var(--serif-display);
  font-size: 28px; font-weight: 600;
  margin: 0 0 6px; line-height: 1.15;
}
.album-mag .desc {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin: 0;
}

/* ---------- 文章正文（杂志阅读体验） ---------- */
.article-hero { padding: 70px 0 30px; text-align: center; }
.article-hero .kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 18px;
}
.article-hero h1 {
  font-family: var(--serif-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 auto 18px;
  max-width: 18ch;
  letter-spacing: -.01em;
}
.article-hero .meta {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .1em;
  color: var(--c-text-fade);
}
.article-hero .meta .dot { margin: 0 10px; opacity: .5; }

.article-cover {
  margin: 30px auto 50px;
  max-width: var(--max-w-wide);
  padding: 0 32px;
}
.article-cover img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.article-cover .caption {
  font-family: var(--sans);
  font-size: 12px; color: var(--c-text-fade);
  margin-top: 10px; text-align: center;
  letter-spacing: .05em;
}

.article-body {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 32px 60px;
  font-size: 18px;
  line-height: 1.85;
}
.article-body p { margin: 0 0 1.3em; }
.article-body h2 {
  font-family: var(--serif-display);
  font-size: 32px;
  font-weight: 600;
  margin: 1.8em 0 .6em;
  letter-spacing: -.005em;
}
.article-body h3 {
  font-family: var(--serif-display);
  font-size: 22px;
  margin: 1.5em 0 .5em;
  font-weight: 600;
}
.article-body img { margin: 2em auto; }
.article-body blockquote {
  margin: 2em 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--c-accent);
  font-family: var(--serif-display);
  font-size: 24px;
  font-style: italic;
  color: var(--c-text);
  line-height: 1.45;
}
.article-body code, .article-body pre {
  font-family: "JetBrains Mono", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--c-bg-alt);
  border-radius: 3px;
}
.article-body code { padding: 2px 6px; }
.article-body pre { padding: 16px 20px; overflow-x: auto; line-height: 1.6; }

.back-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--c-text-soft);
  margin-bottom: 30px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
}
.back-link:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* ---------- 摄影 album 详情：大图网格 ---------- */
.album-intro {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
}
.album-intro .kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 14px;
}
.album-intro h1 {
  font-family: var(--serif-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.album-intro .desc {
  font-size: var(--fs-lead);
  color: var(--c-text-soft);
  max-width: 60ch;
  margin: 0 auto;
}

.photo-magazine {
  max-width: var(--max-w-wide);
  margin: 50px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.photo-magazine figure {
  margin: 0;
  position: relative;
  cursor: zoom-in;
  background: var(--c-bg-alt);
  overflow: hidden;
}
.photo-magazine figure.tall   { grid-column: span 5; aspect-ratio: 3/4; }
.photo-magazine figure.wide   { grid-column: span 7; aspect-ratio: 16/10; }
.photo-magazine figure.square { grid-column: span 4; aspect-ratio: 1/1; }
.photo-magazine figure.full   { grid-column: span 12; aspect-ratio: 21/9; }
.photo-magazine img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.photo-magazine figure:hover img { transform: scale(1.03); }
.photo-magazine figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff;
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .1em;
  opacity: 0;
  transition: opacity .3s;
}
.photo-magazine figure:hover figcaption { opacity: 1; }

/* ---------- 关于页（杂志栏目感） ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  padding: 70px 0;
}
.about-side .portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-bottom: 18px;
  background: var(--c-bg-alt);
}
.about-side .name {
  font-family: var(--serif-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 4px;
}
.about-side .role {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-text-soft);
  margin: 0 0 18px;
}
.about-side .contact-list {
  font-family: var(--sans);
  font-size: 13px;
  list-style: none;
  padding: 0; margin: 18px 0 0;
  border-top: 1px solid var(--c-border);
}
.about-side .contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between;
  color: var(--c-text-soft);
}
.about-side .contact-list a:hover { color: var(--c-accent); }
.about-main h2 {
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 600;
  margin: 1.6em 0 .4em;
}
.about-main h2:first-child { margin-top: 0; }
.about-main p { font-size: 17px; line-height: 1.85; color: var(--c-text); }
.about-main ul { padding-left: 1.2em; }
.about-main li { margin-bottom: .5em; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 100px;
  background: #1a1a1a;
  color: rgba(255,255,255,.7);
  padding: 60px 0 40px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.site-footer .brand-foot {
  font-family: var(--serif-display);
  font-size: 28px;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer .tagline {
  font-size: 14px; max-width: 36ch;
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin: 0 0 14px;
  font-weight: 500;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a {
  font-size: 14px;
  color: rgba(255,255,255,.8);
}
.site-footer a:hover { color: #fff; }
.site-footer .copy {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(255,255,255,.4);
  letter-spacing: .05em;
}

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(15,12,10,.96);
  display: none; z-index: 10000;
}
#lightbox.show { display: block; }
#lightbox .lb-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#lightbox img {
  max-width: 92vw; max-height: 86vh;
  box-shadow: 0 6px 30px rgba(0,0,0,.5);
}
#lightbox .lb-caption {
  position: absolute; left: 0; right: 0; bottom: 30px;
  text-align: center;
  color: rgba(255,255,255,.85);
  font-family: var(--sans);
  font-size: 13px; letter-spacing: .1em;
}
#lightbox .lb-close, #lightbox .lb-prev, #lightbox .lb-next {
  position: absolute; color: #fff;
  font-size: 38px; cursor: pointer; user-select: none;
  opacity: .55; transition: opacity .2s; line-height: 1;
}
#lightbox .lb-close:hover, #lightbox .lb-prev:hover, #lightbox .lb-next:hover { opacity: 1; }
#lightbox .lb-close { top: 24px; right: 32px; }
#lightbox .lb-prev  { left: 28px; top: 50%; transform: translateY(-50%); }
#lightbox .lb-next  { right: 28px; top: 50%; transform: translateY(-50%); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .posts-magazine { grid-template-columns: 1fr; gap: 36px; }
  .album-mag.size-lg, .album-mag.size-md, .album-mag.size-sm { grid-column: span 12; aspect-ratio: 16/10; }
  .photo-magazine figure.tall,
  .photo-magazine figure.wide,
  .photo-magazine figure.square { grid-column: span 12; aspect-ratio: 4/3; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 30px; }
  .post-list-simple li { grid-template-columns: 80px 1fr; }
  .post-list-simple .tag { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow, .wrap-wide { padding: 0 20px; }
  .site-header .wrap { height: 56px; padding: 0 20px; }
  .nav { gap: 18px; }
  .nav a { font-size: 12px; letter-spacing: .1em; }
  .brand { font-size: 18px; }
  .hero-magazine { min-height: 70vh; }
  .hero-magazine .hero-inner { padding: 40px 20px 50px; }
  .section { margin-top: 56px; }
  .article-body { font-size: 17px; padding: 0 20px 40px; }
}

::selection { background: var(--c-accent); color: #fff; }
