﻿/* ===== 基础变量（继承首页）===== */
:root {
  --red: #b83229;
  --red-dark: #7e211d;
  --red-hover: #d63a2f;
  --red-light: rgba(184, 50, 41, 0.15);
  --paper: #ddd4c1;
  --paper-bright: #fff7e6;
  --paper-dim: rgba(221, 212, 193, 0.5);
  --paper-faint: rgba(221, 212, 193, 0.35);
  --ink: #151411;
  --bg: #060504;

  /* 字体系统 */
  --font-heading: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  --font-body: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;

  /* 过渡 */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* 展陈内容墙 */
  --wall-wide: 900px;
  --wall-reading: 820px;
  --wall-narrow: 680px;
  --exhibit-wall: var(--wall-wide);
  --text-column: 520px;
  --media-column: 350px;
  --pair-gap: clamp(56px, 5.8vw, 76px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--paper-bright);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航（与首页一致）===== */
.top-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding-left: clamp(22px, 3vw, 42px);
  color: #fff6e8;
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(10px);
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

.top-nav__brand {
  display: flex;
  align-items: center;
  color: #fff6e8;
  font-size: clamp(22px, 2.4vw, 38px);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  transition: color 0.3s;
}

.top-nav__brand:hover {
  color: var(--red);
}

.top-nav__links {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.top-nav__links a {
  position: relative;
  display: flex;
  min-width: clamp(82px, 8vw, 128px);
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: rgba(255, 246, 232, 0.86);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

.top-nav__links a:hover {
  color: #fff6e8;
}

.top-nav__links a.is-active {
  color: #ffffff;
  background: #e9283e;
}

.top-nav__links a.is-active::after {
  display: none;
}

.top-nav__links a:not(.is-active)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 5px;
  background: #e9283e;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.top-nav__links a:not(.is-active):hover::after {
  transform: scaleX(1);
}

/* ===== 主布局 ===== */
.life-wrapper {
  display: flex;
  margin-top: 76px;
  min-height: calc(100vh - 76px);
}

/* ===== 左侧时间线 ===== */
.timeline-sidebar {
  position: fixed;
  left: 0;
  top: 76px;
  bottom: 0;
  width: 180px;
  background: var(--bg);
  z-index: 50;
}

.timeline-nav {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  padding: 60px 0;
  align-items: stretch;
  gap: 0;
}

.timeline-link {
  position: relative;
  display: block;
  padding: 12px 32px 12px 0;
  text-align: right;
  color: rgba(221, 212, 193, 0.44);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: all var(--transition-normal) var(--ease);
  letter-spacing: 0.5px;
  border-radius: 0;
  white-space: nowrap;
}

.timeline-link {
  cursor: pointer !important;
}

/* 其他可点击元素恢复正常鼠标 */
a,
button,
input,
textarea,
select {
  cursor: pointer !important;
}

.timeline-link:hover {
  color: rgba(255, 247, 230, 0.82);
  background: none;
}

.timeline-link.active {
  color: #fff7e6 !important;
  background: transparent !important;
  font-weight: 700;
  cursor: pointer;
}

/* active状态下不触发hover效果 */
.timeline-link.active:hover {
  color: #fff7e6;
  background: transparent;
}

/* ===== 右侧内容区 ===== */
.life-main {
  margin-left: 180px;
  width: calc(100% - 180px);
  padding: 0 0 120px;
}

/* ===== 时期section ===== */
.period-section {
  padding: clamp(112px, 15vh, 168px) 0;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  width: min(100%, var(--exhibit-wall));
  margin: 0 auto;
}

.period-section::after {
  display: none;
}

.period-section:last-child::after {
  display: none;
}

.period-section.period-placeholder {
  opacity: 0.25;
}

.placeholder-text {
  color: rgba(221, 212, 193, 0.4);
  font-style: italic;
  text-align: center;
}

/* ===== 时期头部 ===== */
.period-header {
  position: relative;
  margin-bottom: clamp(68px, 9vh, 98px);
  padding-left: clamp(18px, 2vw, 28px);
}

.period-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: clamp(78px, 8vw, 116px);
  background: #e9283e;
}

.period-years {
  position: relative;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #fff6e8;
  letter-spacing: 1.8px;
  margin-bottom: 16px;
  text-transform: uppercase;
  padding: 5px 11px 6px;
  background: #e9283e;
}

.period-years::before {
  display: none;
}

.period-title {
  font-family: var(--font-body);
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 400;
  color: var(--paper-bright);
  letter-spacing: 0;
  line-height: 1.08;
  text-shadow: 0 22px 38px rgba(0, 0, 0, 0.42);
}

/* ===== 时期内容 ===== */
.period-body {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vh, 72px);
}

/* ===== 文字块 ===== */
.text-block {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.94;
  color: #eee3cf;
  letter-spacing: 0.28px;
  font-family: "Source Han Serif CN", "思源宋体 CN", Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

.text-block p {
  margin-bottom: 1.5em;
}

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

/* ===== 图片块（展览式淡入）===== */
.image-block {
  margin: 0;
  overflow: hidden;
  position: relative;
  opacity: 0.3;
  transform: translate3d(0, 28px, 0);
  clip-path: inset(0 0 72% 0);
  transition:
    clip-path 1.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1.35s ease,
    transform 1.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: clip-path, opacity, transform;
}

.image-block img {
  width: 100%;
  height: auto;
  max-height: 40vh;
  object-fit: contain;
  display: block;
  filter: grayscale(100%) contrast(1.1) brightness(0.72);
  transform: scale(1.035);
  transition:
    filter 1.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: filter, transform;
}

.image-block.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  clip-path: inset(0 0 0 0);
}

.image-block.is-revealed img {
  filter: grayscale(100%) contrast(1.06) brightness(1.01);
  transform: scale(1);
}

.image-block.is-revealed:hover img {
  filter: grayscale(92%) contrast(1.05) brightness(1.04);
  transform: scale(1.006);
}

figcaption {
  max-width: 34em;
  margin: 10px auto 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(221, 212, 193, 0.64);
  font-style: normal;
  font-family: var(--font-heading);
  letter-spacing: 0.45px;
  text-align: center;
}

/* ===== 图片尺寸 ===== */
.img-large {
  max-width: 80%;
}

.img-medium {
  max-width: 55%;
}

.img-small {
  max-width: 40%;
}

/* ===== 图片行（并排）===== */
.image-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

.image-row .image-block {
  flex: 0 0 auto;
  max-width: 200px;
  min-width: 160px;
}

/* ===== 左右并排布局 ===== */
.content-sidebyside {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content-sidebyside .text-block {
  flex: 2;
  min-width: 0;
  max-width: none;
}

.content-sidebyside .image-block {
  flex: 1;
  max-width: 320px;
}

.content-sidebyside > div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Period 1: 阳光、贫穷与尊严 ===== */
#period-1 .period-header {
  margin-bottom: clamp(78px, 10vh, 112px);
}

.period-body--origin {
  gap: clamp(112px, 14vh, 148px);
  padding-bottom: 0;
  align-items: stretch;
}

.origin-sea {
  width: min(720px, 100%);
  margin: 0 auto;
}

.origin-sea img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
}

.origin-lead {
  display: grid;
  grid-template-columns: minmax(0, var(--text-column)) clamp(200px, 23vw, 260px);
  gap: var(--pair-gap);
  align-items: center;
  justify-content: center;
}

.origin-lead .text-block {
  max-width: var(--text-column);
  line-height: 2.18;
}

.origin-lead .text-block p {
  margin-bottom: 2em;
}

.origin-child {
  width: 100%;
}

.origin-child img {
  width: 100%;
  height: clamp(320px, 43vh, 460px);
  max-height: none;
  object-fit: contain;
}

/* ===== Period 2: 从球场到现场 ===== */
#period-2 .period-header {
  margin-bottom: clamp(78px, 10vh, 112px);
}

.period-body--field {
  max-width: var(--wall-wide);
  gap: clamp(82px, 10vh, 118px);
}

.field-opening {
  display: flex;
  flex-direction: column;
  gap: clamp(68px, 8vh, 96px);
  max-width: var(--wall-wide);
  margin: 0 auto;
}

.field-opening-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pair-gap);
  align-items: start;
}

.field-opening-images .image-block {
  width: 100%;
  max-width: 430px;
  justify-self: center;
}

.field-opening-images .image-block img {
  width: 100%;
  height: clamp(250px, 27vh, 320px);
  max-height: none;
  object-fit: contain;
}

.field-opening-text {
  max-width: var(--wall-reading);
  margin: 0 auto;
}

.field-theatre {
  display: grid;
  grid-template-columns: minmax(340px, 500px) minmax(0, 500px);
  gap: clamp(56px, 7vw, 96px);
  max-width: 1040px;
  padding: 0;
  border-top: 0;
  align-items: center;
}

.field-journal {
  display: grid;
  grid-template-columns: minmax(0, var(--text-column)) minmax(260px, var(--media-column));
  gap: var(--pair-gap);
  align-items: center;
  justify-content: space-between;
  max-width: var(--wall-wide);
  padding: clamp(96px, 12vh, 144px) 0 0 0;
}

.field-theatre .text-block {
  grid-column: 1;
  grid-row: 1;
}

.field-theatre .theatre-photo {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
}

.theatre-photo {
  max-width: 400px;
}

.field-journal .text-block {
  line-height: 2.18;
  transform: none;
  max-width: var(--text-column);
}

.field-journal .journalist-photo {
  width: fit-content;
  max-width: var(--media-column);
  justify-self: end;
}

.theatre-photo img,
.field-journal .journalist-photo img {
  object-fit: contain;
}

.theatre-photo img {
  max-height: 320px;
}

.field-journal .journalist-photo img {
  max-height: 390px;
}

.field-theatre .text-block {
  max-width: 520px;
  transform: none;
}

/* ===== Period 3: 荒诞诞生 ===== */
#period-3 .period-header {
  margin-bottom: clamp(78px, 10vh, 112px);
}

.period-body--absurd {
  max-width: var(--wall-wide);
  gap: clamp(72px, 9vh, 104px);
}

.period-body--absurd .absurd-text {
  display: block;
  max-width: var(--wall-reading);
  margin: 0 auto;
}

.period-body--absurd .absurd-text .text-block {
  max-width: var(--wall-reading);
}

.absurd-archive {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 4.5vw, 54px);
  align-items: end;
  justify-content: center;
  width: 100%;
  max-width: var(--wall-wide);
  margin: 0 auto;
}

.absurd-archive .image-block {
  width: 100%;
  min-width: 0;
  max-width: 310px !important;
}

.absurd-marriage img,
.absurd-manuscript img,
.absurd-illustration img {
  max-height: 340px !important;
}

/* ===== Period 4: Combat在战争中写作 ===== */
#period-4 .period-header,
#period-5 .period-header,
#period-6 .period-header {
  margin-bottom: clamp(78px, 10vh, 112px);
}

.period-body--combat {
  width: min(100%, var(--wall-wide));
  max-width: var(--wall-wide);
  margin: 0 auto;
  gap: clamp(78px, 9.5vh, 112px);
}

.combat-lead {
  display: grid;
  grid-template-columns: minmax(0, var(--text-column)) minmax(260px, var(--media-column));
  gap: var(--pair-gap);
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.combat-lead .text-block {
  max-width: var(--text-column);
}

.combat-lead .combat-parade {
  width: fit-content;
  max-width: var(--media-column);
  justify-self: end;
}

.combat-lead .combat-parade img {
  width: auto;
  max-width: var(--media-column);
  max-height: 390px !important;
  object-fit: contain;
}

.combat-docs {
  display: grid;
  grid-template-columns: minmax(380px, 1.15fr) minmax(260px, 0.85fr);
  grid-template-rows: auto auto;
  column-gap: clamp(42px, 5vw, 64px);
  row-gap: clamp(40px, 5vh, 62px);
  width: 100%;
  max-width: var(--wall-reading);
  margin: 0 auto;
  align-items: start;
}

.combat-side-images {
  display: contents;
}

.combat-paper {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.combat-sartre {
  grid-column: 2;
  grid-row: 1;
}

.combat-id {
  grid-column: 2;
  grid-row: 2;
}

.combat-docs .image-block {
  width: 100%;
  max-width: none;
}

.combat-paper img {
  max-height: 560px !important;
}

.combat-sartre img,
.combat-id img {
  max-height: 300px !important;
  object-fit: contain;
}

.combat-close {
  width: 100%;
  max-width: var(--wall-reading);
  margin: 0 auto;
  line-height: 2.18;
}

/* ===== Period 5: 反抗者的裂痕 ===== */
.period-body--revolt {
  gap: clamp(96px, 12vh, 148px);
  padding-bottom: 0;
}

.revolt-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--text-column)) minmax(240px, var(--media-column));
  gap: var(--pair-gap);
  align-items: center;
  justify-content: center;
}

.revolt-layout--reverse {
  grid-template-columns: minmax(240px, var(--media-column)) minmax(0, var(--text-column));
}

.revolt-layout .text-block {
  line-height: 2.18;
}

.revolt-call img,
.revolt-truce img {
  max-height: 520px;
  background: #0b0a09;
}

/* ===== Period 6: 诺奖与《第一个人》 ===== */
.period-body--nobel {
  gap: clamp(96px, 12vh, 148px);
  padding-bottom: 0;
}

.nobel-hero {
  display: grid;
  grid-template-columns: minmax(260px, var(--media-column)) minmax(0, var(--text-column));
  gap: var(--pair-gap);
  align-items: center;
  justify-content: center;
}

.nobel-hero .image-block img {
  max-height: 500px;
  background: #0b0a09;
}

.nobel-hero .text-block,
.nobel-archive .text-block {
  line-height: 2.18;
}

.nobel-archive {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 510px);
  gap: clamp(118px, 9vw, 150px);
  align-items: center;
  justify-content: center;
  max-width: var(--wall-wide);
  margin: 0 auto;
}

.nobel-archive .text-block {
  max-width: 260px;
}

.nobel-archive-images {
  display: flex;
  gap: clamp(28px, 3.2vw, 44px);
  align-items: center;
  justify-content: center;
}

.nobel-archive-images .image-block {
  flex: 0 0 auto;
  max-width: 285px;
}

.nobel-archive .image-block img {
  max-height: 390px;
  background: #0b0a09;
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
  .life-main {
    padding: 0 60px 100px 60px;
  }

  .img-large {
    max-width: 90%;
  }

  .img-medium {
    max-width: 65%;
  }

  .img-small {
    max-width: 50%;
  }
}

@media (max-width: 1100px) {
  .field-opening,
  .field-theatre,
  .field-journal,
  .absurd-archive,
  .combat-docs {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 0 auto;
  }

  .field-opening-images {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .field-opening-images .image-block {
    justify-self: center;
  }

  .field-journal .journalist-photo,
  .combat-paper,
  .combat-sartre,
  .combat-id {
    grid-column: auto;
  }

  .combat-paper img,
  .combat-sartre img,
  .combat-id img {
    max-height: 430px !important;
  }
}

@media (max-width: 768px) {
  .top-nav {
    height: 64px;
    padding-left: 16px;
  }

  .top-nav__brand {
    font-size: 20px;
  }

  .top-nav__links a {
    min-width: 70px;
    padding: 0 12px;
    font-size: 14px;
  }

  .life-wrapper {
    margin-top: 64px;
  }

  /* 移动端：时间线变横向 */
  .timeline-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    height: 54px;
    background: rgba(6, 5, 4, 0.95);
    backdrop-filter: blur(10px);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .timeline-nav {
    position: static;
    flex-direction: row;
    padding: 0 18px;
    gap: 22px;
    height: 54px;
    align-items: center;
  }

  .timeline-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
    font-size: 14px;
  }

  .life-main {
    margin-left: 0;
    margin-top: 54px;
    width: 100%;
    padding: 0 24px 80px 24px;
  }

  .period-section {
    padding: 52px 0;
    min-height: auto;
  }

  .period-header {
    margin-bottom: 34px;
  }

  .period-title {
    font-size: 32px;
  }

  .period-body {
    gap: 35px;
  }

  .text-block {
    font-size: 16px;
    max-width: 100%;
  }

  .image-block img {
    max-height: 50vh;
  }

  .img-large,
  .img-medium,
  .img-small {
    max-width: 100%;
  }

  .image-row {
    flex-direction: column;
    gap: 30px;
  }

  .content-sidebyside {
    flex-direction: column;
    gap: 30px;
  }

  .origin-lead {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .combat-lead,
  .revolt-layout,
  .revolt-layout--reverse,
  .nobel-hero,
  .nobel-archive {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    width: 100%;
    max-width: 100%;
  }

  .combat-lead .text-block,
  .revolt-layout .text-block,
  .nobel-hero .text-block,
  .nobel-archive .text-block {
    width: 100%;
    max-width: 100%;
  }

  .combat-lead .combat-parade,
  .revolt-layout .image-block,
  .nobel-hero .image-block {
    width: 100%;
    max-width: 100%;
    justify-self: center;
  }

  .combat-lead .combat-parade img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .combat-paper,
  .combat-sartre,
  .combat-id {
    grid-column: auto;
    grid-row: auto;
  }

  .nobel-archive-images {
    width: 100%;
    flex-direction: column;
  }

  .nobel-archive-images .image-block {
    flex: 0 1 auto;
    width: 100%;
    max-width: min(100%, 285px);
  }
}

