/* ============================================
   小陈的学习与技术空间 — 全站样式
   淡蓝底 + 白色卡片 · 简约 · 大字号阅读
   ============================================ */

:root {
  --bg:          #E9F2FA;
  --bg-deep:     #DCEBF7;
  --surface:     #FFFFFF;
  --surface-alt: #F5F9FD;
  --text:        #1F2D3A;
  --text-soft:   #3C5063;
  --muted:       #6B8096;
  --line:        #DEE9F3;
  --accent:      #3A7BD5;
  --accent-dark: #2C64B4;
  --accent-soft: #EAF2FE;
  --tech:        #3A7BD5;
  --repost:      #8A6FD1;
  --life:        #4FA88B;
  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 2px 14px rgba(58, 123, 213, .07);
  --shadow-lg:   0 10px 34px rgba(45, 96, 160, .13);
  --maxw:        1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, #F4FAFF 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #E2EFFB 0%, transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

::selection { background: #CFE3FB; color: var(--text); }

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   进站动画
   ============================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, #F6FBFF 0%, #E3F0FB 42%, #CFE4F5 100%);
  transition: opacity .9s ease, visibility .9s ease;
}
.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 600px at 20% 80%, rgba(147, 197, 240, .35), transparent 65%),
    radial-gradient(500px 500px at 85% 20%, rgba(178, 214, 245, .45), transparent 65%);
  pointer-events: none;
}
.intro.is-hidden { opacity: 0; visibility: hidden; }

.intro__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.intro__eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  animation: introUp .9s cubic-bezier(.2,.7,.3,1) .1s forwards;
}

.intro__title {
  margin: 0;
  font-size: clamp(27px, 4.4vw, 46px);
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.4;
  color: #1B3448;
  opacity: 0;
  animation: introUp 1.1s cubic-bezier(.2,.7,.3,1) .3s forwards;
}

.intro__line {
  width: 0;
  height: 2px;
  margin: 30px auto 26px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: introLine 1.2s ease .9s forwards;
}

.intro__sub {
  margin: 0 0 40px;
  font-size: 15.5px;
  color: var(--muted);
  letter-spacing: .04em;
  opacity: 0;
  animation: introUp .9s ease 1s forwards;
}

.intro__btn {
  appearance: none;
  border: 1.5px solid rgba(58, 123, 213, .45);
  background: rgba(255, 255, 255, .7);
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: .16em;
  text-indent: .16em;
  padding: 14px 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s, transform .3s, box-shadow .3s, color .3s;
  opacity: 0;
  animation: introUp .9s ease 1.35s forwards;
}
.intro__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(58, 123, 213, .28);
}

.intro__hint {
  margin: 26px 0 0;
  font-size: 12.5px;
  color: #93A9BC;
  letter-spacing: .1em;
  opacity: 0;
  animation: introUp .9s ease 1.7s forwards;
}

@keyframes introUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes introLine {
  from { width: 0; }
  to   { width: 120px; }
}

/* ============================================
   顶部导航
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 242, 250, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(222, 233, 243, .9);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  gap: 16px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
  white-space: nowrap;
}
.nav__brand:hover { color: var(--text); }
.nav__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(58, 123, 213, .15);
  flex: none;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-soft);
  transition: background .25s, color .25s;
}
.nav__links a:hover { background: rgba(255,255,255,.75); color: var(--accent-dark); }
.nav__links a.is-active {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
  font-weight: 500;
}
.nav__toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  border-radius: 10px;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.6px;
  background: var(--text-soft); margin: 4px auto;
  transition: transform .3s, opacity .3s;
}

/* ============================================
   首页 Hero
   ============================================ */
.hero { padding: 84px 0 56px; }
.hero__eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--accent);
  font-weight: 600;
}
.hero__title {
  margin: 0 0 22px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: .02em;
  color: #17303F;
}
.hero__desc {
  margin: 0;
  max-width: 660px;
  font-size: 17.5px;
  color: var(--text-soft);
  line-height: 1.95;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-soft);
}
.tag-pill b { color: var(--accent-dark); font-weight: 600; }

/* ============================================
   栏目区块
   ============================================ */
.section { padding: 26px 0 54px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section__title-wrap { display: flex; align-items: center; gap: 14px; }
.section__mark {
  width: 4px; height: 26px; border-radius: 4px;
  background: var(--accent);
  flex: none;
}
.section__title {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .03em;
}
.section__desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.section__more {
  font-size: 14.5px;
  color: var(--accent);
  white-space: nowrap;
  padding-bottom: 2px;
}
.section__more::after { content: " →"; transition: margin .2s; }
.section__more:hover::after { margin-left: 4px; }

/* 栏目配色 */
.section--tech .section__mark { background: var(--tech); }
.section--tech .section__more { color: var(--tech); }
.section--repost .section__mark { background: var(--repost); }
.section--repost .section__more { color: var(--repost); }
.section--life .section__mark { background: var(--life); }
.section--life .section__more { color: var(--life); }

/* ---------- 卡片网格 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(316px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(222, 233, 243, .8);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, border-color .35s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tech);
  opacity: 0;
  transition: opacity .35s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(58, 123, 213, .22);
}
.card:hover::before { opacity: 1; }

a.card { color: inherit; }
a.card:hover { color: inherit; }

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.card__cat {
  padding: 2.5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--tech);
}
.card__cat--repost { background: #F0EBFB; color: var(--repost); }
.card__cat--life   { background: #E7F5F0; color: var(--life); }

.card__title {
  margin: 0 0 12px;
  font-size: 19.5px;
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: .01em;
}
.card__excerpt {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #8FA3B5;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.card__read::after { content: " →"; }

/* ---------- 空状态 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 28px;
  background: rgba(255,255,255,.5);
  border: 1.5px dashed #C9DCEC;
  border-radius: var(--radius);
  color: var(--muted);
}
.empty__icon {
  width: 46px; height: 46px;
  margin-bottom: 16px;
  opacity: .55;
}
.empty__title { margin: 0 0 6px; font-size: 16px; color: var(--text-soft); font-weight: 500; }
.empty__text  { margin: 0; font-size: 14px; }

/* ============================================
   列表页
   ============================================ */
.page-head { padding: 64px 0 30px; }
.page-head__label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.page-head__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: .02em;
}
.page-head__desc { margin: 0; color: var(--muted); font-size: 16px; max-width: 640px; }

.list { display: flex; flex-direction: column; gap: 16px; }

.list-item {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(222, 233, 243, .8);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  color: inherit;
}
.list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(58,123,213,.2);
  color: inherit;
}
.list-item__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.list-item__title { margin: 0 0 8px; font-size: 19px; font-weight: 600; line-height: 1.55; }
.list-item__excerpt { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.8; }

/* ============================================
   文章页
   ============================================ */
.article-wrap { padding: 48px 0 80px; }

.article {
  max-width: 748px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(222, 233, 243, .8);
  border-radius: 22px;
  padding: 56px 60px 64px;
  box-shadow: var(--shadow);
}

.article__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 20px; font-size: 13.5px; color: var(--muted);
}
.article__title {
  margin: 0 0 26px;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .01em;
  color: #17303F;
}
.article__lede {
  margin: 0 0 34px;
  padding: 18px 22px;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.85;
}
.article__body { font-size: 17px; line-height: 1.95; color: var(--text-soft); }
.article__body p { margin: 0 0 22px; }
.article__body h2 {
  margin: 44px 0 18px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}
.article__body h3 {
  margin: 32px 0 14px;
  font-size: 18.5px;
  font-weight: 600;
  color: var(--text);
}
.article__body ul, .article__body ol { margin: 0 0 22px; padding-left: 24px; }
.article__body li { margin-bottom: 8px; }
.article__body strong { color: var(--text); font-weight: 600; }
.article__body blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 16px;
}
.article__body blockquote p:last-child { margin-bottom: 0; }
.article__body code {
  font-family: var(--mono);
  font-size: .88em;
  background: #EEF4FA;
  padding: 2px 6px;
  border-radius: 5px;
  color: #A9553F;
}
.article__body pre {
  margin: 24px 0;
  padding: 20px 22px;
  background: #F7FAFD;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.75;
}
.article__body pre code { background: none; padding: 0; color: #2C3E50; }
.article__body hr {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 40px 0;
}
.article__body img { border-radius: var(--radius-sm); margin: 26px 0; }

/* 转载出处卡片 */
.source-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 0 0 34px;
  padding: 18px 20px;
  background: #FAF8FE;
  border: 1px solid #E8E0F8;
  border-radius: var(--radius-sm);
}
.source-box__badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--repost);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .05em;
}
.source-box__text { font-size: 14.5px; color: var(--text-soft); line-height: 1.8; }
.source-box__text a { color: var(--repost); word-break: break-all; }

/* 文章页脚 */
.article__foot {
  max-width: 748px;
  margin: 26px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.article__foot a {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-soft);
  transition: background .25s, color .25s;
}
.article__foot a:hover { background: var(--surface); color: var(--accent-dark); }

/* ============================================
   页脚
   ============================================ */
.footer {
  margin-top: 40px;
  padding: 44px 0 54px;
  border-top: 1px solid rgba(222,233,243,.9);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__name { font-weight: 600; margin-bottom: 6px; }
.footer__desc { font-size: 14px; color: var(--muted); margin: 0; }
.footer__meta { font-size: 13.5px; color: #93A9BC; text-align: right; }
.footer__meta a { color: #7F94A8; }

/* ============================================
   音乐唱片（导航右上角）
   ============================================ */
.disc {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  margin-left: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.disc:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 唱片主体 */
.disc__platter {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #35495e 0 1.4px, #22323f 1.4px 3.4px);
  box-shadow: 0 3px 12px rgba(35, 60, 90, .24),
              inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: filter .35s ease, opacity .35s ease;
  will-change: transform;
}
/* 旋转时才看得见的高光弧 */
.disc__platter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 20deg,
      rgba(255,255,255,0) 0deg,
      rgba(255,255,255,.26) 34deg,
      rgba(255,255,255,0) 78deg,
      rgba(255,255,255,0) 200deg,
      rgba(255,255,255,.14) 232deg,
      rgba(255,255,255,0) 268deg,
      rgba(255,255,255,0) 360deg);
}
/* 中心标签 */
.disc__platter::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #F4FAFF 0 2.4px, #8CC0EC 2.6px 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.disc.is-playing .disc__platter { animation: discSpin 6s linear infinite; }

@keyframes discSpin {
  to { transform: rotate(360deg); }
}

/* 关闭状态的斜杠 */
.disc__slash {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(.72);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.3,1.2);
  pointer-events: none;
}
.disc__slash svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px rgba(20,40,60,.55));
}
.disc.is-muted .disc__slash { opacity: 1; transform: scale(1); }
.disc.is-muted .disc__platter { filter: saturate(.35) brightness(.86); opacity: .9; }

/* 悬停提示 */
.disc__tip {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  padding: 7px 13px;
  border-radius: 9px;
  background: rgba(28, 44, 58, .93);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(20, 40, 70, .22);
}
.disc__tip::before {
  content: "";
  position: absolute;
  top: -4px; right: 18px;
  width: 8px; height: 8px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 1px;
}
.disc:hover .disc__tip,
.disc:focus-visible .disc__tip { opacity: 1; transform: translateY(0); }

/* ============================================
   滚动入场
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .article { padding: 42px 34px 48px; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .container { padding: 0 18px; }
  .nav__toggle { display: block; margin-left: auto; }
  .nav__links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: #F4FAFE;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(45,96,160,.08);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav__links.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__links a { padding: 12px 14px; }

  .hero { padding: 54px 0 34px; }
  .hero__title { font-size: 30px; }
  .section { padding: 18px 0 40px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section__title { font-size: 20px; }
  .section__more { margin-top: 2px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 24px 22px 20px; }

  .page-head { padding: 46px 0 22px; }
  .list-item { padding: 22px 20px; }

  .article-wrap { padding: 26px 0 56px; }
  .article { padding: 32px 22px 38px; border-radius: 18px; }
  .article__title { font-size: 24px; }
  .article__body { font-size: 16.5px; }

  .disc { width: 40px; height: 40px; margin-left: 10px; }
  .disc__platter::after { width: 14px; height: 14px; margin: -7px 0 0 -7px; }

  .footer__inner { flex-direction: column; }
  .footer__meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
