/* Design Brief: 设计师个人作品集 — 瑞士极简 + 编辑印刷混合
 * 底色 #f5f1e8 / 强调 #c8102e / 字阶 1.125 / 圆角 0 / 零阴影
 * 双族：Flecha Serif 展示 + Sohne 无衬线正文
 */

:root {
  /* 色板 (layout-patterns.md §10 编辑印刷) */
  --paper: #f5f1e8;
  --ink: #1a1a1a;
  --ink-soft: rgba(26, 26, 26, 0.6);
  --ink-muted: rgba(26, 26, 26, 0.22);
  --accent: #c8102e;

  /* 边框 (tokens-and-type.md §6.1) */
  --rule: 1px solid rgba(26, 26, 26, 0.22);

  /* Typography (srg.md §2.1 双族硬分工) */
  --font-display: "Flecha S", "Noto Serif SC", Georgia, serif;
  --font-sans: "Sohne", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Monaco, monospace;

  /* 字阶 Major Second 1.125, base 16px (tokens-and-type.md §1.1) */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 23px;
  --text-3xl: 26px;
  --text-hero: 42px;

  /* 间距 4px 基数 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Motion (motion.md §1.2, §2.1) */
  --ease-main: cubic-bezier(0.23, 1.04, 0.32, 1);
  --duration-ui: 200ms;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* === Masthead (作品集最简 header) === */
.masthead {
  padding: var(--space-8) 0;
  border-bottom: var(--rule);
}

.masthead-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.masthead-nav {
  display: flex;
  gap: var(--space-6);
}

.masthead-nav a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--duration-ui) var(--ease-main);
}

.masthead-nav a:hover {
  color: var(--ink);
}

/* === Label (小标签，全大写但只在 12px 以下) === */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

/* === Grid-12 (可见栅格，瑞士极简特征) === */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--space-6);
  row-gap: var(--space-12);
}

.opening-meta {
  grid-column: 1 / 4;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.opening-main {
  grid-column: 4 / 12;
}

/* === Opening (Hero) === */
.opening {
  padding: var(--space-24) 0;
  border-bottom: var(--rule);
}

.opening-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-8);
}

.opening-lede {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* === Section Head (带横线标题) === */
.section-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8) 0 var(--space-6) 0;
}

.rule {
  flex: 1;
  height: 1px;
  background: rgba(26, 26, 26, 0.22);
}

/* === Work (编辑式列表) === */
.work {
  border-bottom: var(--rule);
}

.entry {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  gap: var(--space-6);
  padding: var(--space-8) 0;
  border-bottom: var(--rule);
  transition: transform var(--duration-ui) var(--ease-main);
}

.entry:last-child {
  border-bottom: none;
}

.entry:hover {
  transform: translateX(4px);
}

.entry-year {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.entry-body {
  /* 占据主栅格 */
}

.entry-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.entry-desc {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}

.entry-tags {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.entry-tags span {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--ink-muted);
  padding: var(--space-1) var(--space-2);
  border: 1px solid rgba(26, 26, 26, 0.22);
}

.entry-role {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-align: right;
}

/* === About (单列正文 + 侧边栏) === */
.about {
  padding: var(--space-24) 0;
  border-bottom: var(--rule);
}

.about-body {
  grid-column: 1 / 8;
  max-width: 65ch;
}

.about-body p {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: var(--space-4);
}

.about-side {
  grid-column: 9 / 13;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.side-block ul {
  list-style: none;
  margin-top: var(--space-3);
}

.side-block li {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--ink-soft);
}

.side-block a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  transition: color var(--duration-ui) var(--ease-main);
}

.side-block a:hover {
  color: var(--accent);
}

/* === Colophon (Footer) === */
.colophon {
  padding: var(--space-8) 0;
}

.colophon-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* === Responsive === */
@media (max-width: 768px) {
  .opening-meta,
  .opening-main {
    grid-column: 1 / -1;
  }

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

  .entry {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .entry-role {
    text-align: left;
  }

  .about-body,
  .about-side {
    grid-column: 1 / -1;
  }

  .colophon-row {
    flex-direction: column;
  }
}

/* === Reduced motion (motion.md §3.2) === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-property: opacity, color !important;
  }
}
