/* ============================================================
   cindying.com —— 米色方格纸 · 拟物桌面风个人作品集
   设计语言参考 artofadditti.com：奶油纸底 + 方格网格，
   蓝色气泡字 logo，胶囊导航，混排大标题，纸质拟物元素。

   ✏️ 想整体换风格，改下面 :root 这一段就够了。
   ============================================================ */

:root {
  /* ---- 配色 ---- */
  --paper:   #F7F2E6;   /* 米色纸张底 */
  --grid:    rgba(59, 74, 214, 0.07);   /* 方格线 */
  --blue:    #3B4AD6;   /* 主色，logo 和链接 */
  --orange:  #FF5E00;   /* 强调色，按钮和数字 */
  --lime:    #EBECB0;   /* 黄绿，高亮块 */
  --ink:     #14140F;   /* 正文 */
  --ink-soft:#5A5647;   /* 次要文字 */
  --manila:  #E8CFA9;   /* 牛皮纸文件夹 */
  --manila-d:#D9B98A;   /* 文件夹暗部 */
  --tape:    rgba(235, 236, 176, 0.75);

  /* ---- 尺寸 ---- */
  --pad:     clamp(1.25rem, 4vw, 4.5rem);
  --measure: 46rem;
  --wide:    82rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* 方格纸：两道 1px 线交叉。改 background-size 就是改格子大小 */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============ 顶栏 ============ */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--pad);
  /* 滚动时顶栏底下有一层米色渐隐，文字不会和内容糊在一起 */
  background: linear-gradient(to bottom, var(--paper) 55%, rgba(247,242,230,0));
}

/* 气泡字 logo */
.logo {
  font-family: "Gluten", "Instrument Sans", cursive;
  font-weight: 900;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  display: inline-block;
}
.logo:hover { transform: rotate(-3deg) scale(1.04); }

.nav { display: flex; gap: .55rem; }

/* 描边胶囊导航 */
.pill {
  font-size: .9rem;
  color: var(--blue);
  text-decoration: none;
  padding: .42rem 1.1rem;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
  transition: background .2s, color .2s, transform .2s;
}
.pill:hover { background: var(--blue); color: var(--paper); transform: translateY(-2px); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--pad); top: .8rem; z-index: 99;
  background: var(--paper); padding: .5rem .9rem;
  border: 1.5px solid var(--blue); border-radius: 999px; text-decoration: none; color: var(--blue);
}

/* ============ 通用区块 ============ */

.section { padding: clamp(4rem, 9vw, 8rem) var(--pad); max-width: var(--wide); margin: 0 auto; }

.eyebrow {
  font-family: "Instrument Sans", sans-serif;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

h2.section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 2.5rem;
}
h2.section-title em { font-style: italic; color: var(--blue); }

p { margin: 0 0 1.1rem; }
a { color: var(--blue); }

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem var(--pad) 4rem;
  max-width: var(--wide);
  margin: 0 auto;
}

.hero-inner { position: relative; z-index: 2; width: 100%; }

/* 混排大标题：不同的词用不同字体和颜色，是这套设计的灵魂 */
.hero-title {
  font-family: "Instrument Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7.2vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 16ch;
}
.hero-title .serif  { font-family: "Instrument Serif", Georgia, serif; font-style: italic; color: var(--blue); }
.hero-title .bubble { font-family: "Gluten", cursive; font-weight: 900; color: var(--orange); letter-spacing: -0.01em; }
.hero-title .mark   {
  background: var(--lime);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  padding: 0 .12em; border-radius: .12em;
}

.hero-sub {
  margin-top: 2rem;
  max-width: 34ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.hero-cta { margin-top: 2.25rem; display: flex; gap: .7rem; flex-wrap: wrap; }

/* ============ 按钮 ============ */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 500;
  padding: .78rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 0 -2px rgba(20,20,15,.18); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.accent { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ============ 拟物纸片：文件夹 / 宝丽来 / 胶带 ============ */

/* 装饰层，鼠标穿透，窄屏隐藏 */
.props { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.polaroid {
  position: absolute;
  width: 190px;
  padding: 11px 11px 40px;
  background: #fffdf7;
  box-shadow: 0 10px 26px rgba(20,20,15,.16);
  border-radius: 2px;
}
.polaroid .ph {
  aspect-ratio: 1 / 1;
  background: var(--manila);
  background-image: radial-gradient(circle at 32% 30%, rgba(255,255,255,.65), transparent 55%);
  border-radius: 1px;
  display: grid; place-items: center;
  font-size: 2.4rem;
}
.polaroid .cap {
  position: absolute; left: 0; right: 0; bottom: 12px;
  text-align: center;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: .95rem; color: var(--ink-soft);
}
.polaroid.p1 { top: 8%;  right: 6%;  transform: rotate(6deg); }
.polaroid.p2 { bottom: 12%; right: 20%; transform: rotate(-8deg); width: 150px; }

/* 牛皮纸文件夹 */
.folder {
  position: absolute;
  width: 230px; height: 160px;
  bottom: 14%; right: 3%;
  transform: rotate(-4deg);
}
.folder::before {   /* 文件夹上方的小凸起（标签页） */
  content: "";
  position: absolute; top: -16px; left: 12px;
  width: 88px; height: 20px;
  background: var(--manila-d);
  border-radius: 7px 12px 0 0;
}
.folder::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(165deg, var(--manila), var(--manila-d));
  border-radius: 5px 10px 10px 10px;
  box-shadow: 0 12px 30px rgba(20,20,15,.18);
}

/* 胶带 */
.tape {
  position: absolute;
  width: 96px; height: 27px;
  background: var(--tape);
  box-shadow: 0 1px 3px rgba(20,20,15,.1);
}
.tape.t1 { top: 6%; right: 12%; transform: rotate(-22deg); }

/* 纸飞机 */
.plane { position: absolute; top: 16%; right: 34%; width: 62px; color: var(--blue); opacity: .85; }
.plane svg { width: 100%; height: auto; }

@media (max-width: 900px) { .props { display: none; } }

/* ============ 作品列表 ============ */

.work-grid {
  display: grid;
  /* 两列大卡片。窄屏自动变一列 —— 作品图大一点更像作品集 */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #FFFDF7;
  border: 1.5px solid rgba(20,20,15,.1);
  border-radius: 14px;
  padding: 1rem 1rem 1.35rem;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, border-color .25s;
}
.work-card:hover {
  transform: translateY(-6px) rotate(-.6deg);
  box-shadow: 0 16px 34px rgba(20,20,15,.14);
  border-color: var(--blue);
}

/* 封面：没有图片时用色块占位，有图片就把 <img> 放进去 */
.work-cover {
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  overflow: hidden;
  display: grid; place-items: center;
  font-size: 3.2rem;
  background: var(--lime);
}
.work-cover img { width: 100%; height: 100%; object-fit: cover; }
.work-card:nth-child(4n+2) .work-cover { background: var(--manila); }
.work-card:nth-child(4n+3) .work-cover { background: #D9DDF7; }
.work-card:nth-child(4n)   .work-cover { background: #F3D9CE; }

/* 卡片轻微交替倾斜，像随手摆在桌面上的照片 */
.work-card:nth-child(odd)  { transform: rotate(-.35deg); }
.work-card:nth-child(even) { transform: rotate(.4deg); }
.work-card:nth-child(odd):hover  { transform: translateY(-6px) rotate(-1deg); }
.work-card:nth-child(even):hover { transform: translateY(-6px) rotate(.9deg); }

.work-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
  margin-top: .95rem;
}
.work-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem; line-height: 1.2; letter-spacing: -.01em;
}
.work-year { font-size: .82rem; color: var(--ink-soft); flex: 0 0 auto; }
.work-desc { margin: .4rem 0 0; font-size: .93rem; color: var(--ink-soft); }

.work-tags { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.work-tags span {
  font-size: .74rem; padding: .12rem .6rem;
  border: 1px solid rgba(20,20,15,.18); border-radius: 999px; color: var(--ink-soft);
}

/* ============ 关于 ============ */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.about-text { font-size: clamp(1.1rem, 1.7vw, 1.42rem); line-height: 1.55; max-width: var(--measure); }
.about-text em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; color: var(--blue); }

/* 关于页那张贴着胶带的照片 */
.photo-tape { position: relative; transform: rotate(2.5deg); }
.photo-tape::before {
  content: ""; position: absolute; top: -13px; left: 50%;
  width: 104px; height: 28px; transform: translateX(-50%) rotate(-3deg);
  background: var(--tape); z-index: 2;
}
.photo-tape .frame {
  background: #fffdf7; padding: 12px 12px 46px;
  box-shadow: 0 12px 30px rgba(20,20,15,.16);
}
.photo-tape .ph {
  aspect-ratio: 3 / 4; background: var(--manila);
  background-image: radial-gradient(circle at 35% 28%, rgba(255,255,255,.6), transparent 58%);
  display: grid; place-items: center; font-size: 3rem;
}
.photo-tape .cap {
  position: absolute; left: 0; right: 0; bottom: 14px; text-align: center;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: .95rem; color: var(--ink-soft);
}

/* ============ 我擅长的（01 / 02 / 03） ============ */

.skills { border-top: 1.5px solid rgba(20,20,15,.14); margin-top: 1rem; }

.skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem 1.5rem;
  padding: 1.9rem 0;
  border-bottom: 1.5px solid rgba(20,20,15,.14);
}
.skill h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.1; letter-spacing: -.02em;
}
.skill .num {
  font-family: "Gluten", cursive; font-weight: 900;
  font-size: 1.15rem; color: var(--orange);
  align-self: start;
}
.skill p { grid-column: 1 / -1; margin: .5rem 0 0; max-width: 52ch; color: var(--ink-soft); }

/* ============ 联系 ============ */

.contact-band {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad);
}
.contact-inner {
  background: var(--blue);
  color: var(--paper);
  border-radius: 26px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.contact-inner h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  line-height: 1.12; letter-spacing: -.02em;
  margin: 0 0 1.9rem; max-width: 20ch;
}
.contact-inner .btn { background: var(--paper); color: var(--blue); border-color: var(--paper); }
.contact-inner .btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ============ 页脚 ============ */

.site-foot {
  max-width: var(--wide); margin: 0 auto;
  padding: 2.5rem var(--pad) 3.5rem;
  border-top: 1.5px solid rgba(20,20,15,.14);
  display: flex; flex-wrap: wrap; gap: 2.5rem 4rem;
  font-size: .92rem;
}
.foot-col h4 {
  margin: 0 0 .6rem;
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.foot-col a { display: block; color: var(--ink); text-decoration: none; margin-bottom: .28rem; }
.foot-col a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.foot-end { margin-left: auto; align-self: flex-end; color: var(--ink-soft); font-size: .85rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .foot-end { margin-left: 0; }
  .work-head { flex-direction: column; gap: .1rem; }
}

/* ============ 入场动画 ============ */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============ 作品详情页 ============ */

.detail { max-width: var(--measure); margin: 0 auto; padding: 7.5rem var(--pad) 2rem; }

.back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .88rem; color: var(--blue); text-decoration: none;
  border: 1.5px solid var(--blue); border-radius: 999px;
  padding: .35rem 1rem; margin-bottom: 2.25rem;
  transition: background .2s, color .2s;
}
.back:hover { background: var(--blue); color: var(--paper); }

.detail h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3.8rem);
  line-height: 1.08; letter-spacing: -.025em;
  margin: 0 0 1rem;
}
.detail .lede { font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: var(--ink-soft); margin-bottom: 2rem; }

.detail-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem;
  padding: 1.1rem 0; margin-bottom: 2.5rem;
  border-top: 1.5px solid rgba(20,20,15,.14);
  border-bottom: 1.5px solid rgba(20,20,15,.14);
  font-size: .9rem;
}
.detail-meta div { display: flex; gap: .45rem; }
.detail-meta dt { color: var(--ink-soft); margin: 0; }
.detail-meta dd { margin: 0; }

.prose h2 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.15; letter-spacing: -.02em;
  margin: 2.5rem 0 .85rem;
}
.prose ul { padding-left: 1.2rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: .5rem; }
.prose figure { margin: 2.25rem 0; }
.prose figure .frame {
  background: #FFFDF7; padding: 12px; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(20,20,15,.13);
}
.prose figure img { width: 100%; border-radius: 6px; }
.prose figcaption {
  margin-top: .7rem; text-align: center; font-size: .88rem; color: var(--ink-soft);
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
}

/* ============ 404 ============ */

.oops { min-height: 72svh; display: grid; place-items: center; text-align: center; padding: 7rem var(--pad) 3rem; }
.oops .big {
  font-family: "Gluten", cursive; font-weight: 900;
  font-size: clamp(5rem, 20vw, 12rem); line-height: .95; color: var(--orange);
  margin: 0 0 .5rem;
}
