/* ============================================================
   小黄源码 · pudn.cn — 区块样式
   Part 2: nav / hero / notes / about / footer / responsive
   ============================================================ */

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(15, 17, 19, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background-color .3s ease, border-color .3s ease;
}
.nav--solid {
  background: rgba(15, 17, 19, .96);
  border-bottom-color: rgba(255,255,255,.11);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--amber-500), var(--amber-700));
  color: #1a1206;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.04em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: .06em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-300);
  transition: color .18s ease, background-color .18s ease;
}
.nav__links a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.nav__cta { margin-left: 10px; padding: 10px 20px; font-size: 14.5px; }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ink-700);
  place-items: center;
  flex-shrink: 0;
}
.nav__burger span {
  position: relative;
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink-200);
  transition: transform .22s ease, opacity .18s ease;
}
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: var(--ink-200);
  transition: transform .22s ease;
}
.nav__burger span::before { top: -5px; }
.nav__burger span::after  { top: 5px; }
.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   HERO (dark)
   ============================================================ */
.hero {
  position: relative;
  background: var(--ink-950);
  padding: 148px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

/* atmosphere: soft radial glow + fine grid */
.hero::before {
  content: "";
  position: absolute;
  top: -280px; left: 50%;
  width: 1100px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side,
              rgba(201,138,46,.20), rgba(201,138,46,.06) 55%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 900px 520px at 50% 22%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 900px 520px at 50% 22%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 64px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 10px;
  margin-bottom: 26px;
  border: 1px solid rgba(201,138,46,.34);
  border-radius: 999px;
  background: rgba(201,138,46,.09);
  font-size: 13px;
  color: var(--amber-300);
  letter-spacing: .015em;
}
.hero__badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(201,138,46,.22);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,138,46,.22); }
  50%      { box-shadow: 0 0 0 6px rgba(201,138,46,.05); }
}

.hero__title {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #fff;
}
.hero__title em {
  font-style: normal;
  color: var(--amber-500);
  /* hand-drawn underline instead of a gradient fill */
  background-image: linear-gradient(transparent 62%, rgba(201,138,46,.24) 62%);
}

.hero__desc {
  margin-top: 22px;
  max-width: 40ch;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink-300);
}
.hero__desc code {
  font-family: var(--font-mono);
  font-size: 14.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,.065);
  color: var(--amber-300);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hero__meta li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-400);
}
.hero__meta svg { color: var(--amber-600); flex-shrink: 0; }
.hero__meta b {
  font-weight: 500;
  color: var(--ink-200);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- terminal window ---------- */
.term {
  border-radius: var(--r-lg);
  background: var(--ink-900);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 40px 80px -32px rgba(0,0,0,.9),
    0 0 0 1px rgba(0,0,0,.4);
  overflow: hidden;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--ink-850);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.term__bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink-700);
}
.term__bar i:first-child { background: #6e4a35; }
.term__bar i:nth-child(2) { background: #6b5f35; }
.term__bar i:nth-child(3) { background: #3e5b46; }
.term__title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-400);
  letter-spacing: .03em;
}
.term__body {
  padding: 22px 22px 26px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 2;
}
.term__body p { color: var(--ink-200); white-space: pre-wrap; word-break: break-all; }
.term__body .c-prompt { color: var(--amber-500); }
.term__body .c-path   { color: #7fb2d8; }
.term__body .c-key    { color: var(--ink-300); }
.term__body .c-str    { color: #94c08a; }
.term__body .c-dim    { color: var(--ink-400); }
.term__body .c-ok     { color: var(--amber-300); }
.caret {
  display: inline-block;
  width: 8px; height: 16px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--amber-500);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ============================================================
   MARQUEE STRIP  (dark → light transition device)
   ============================================================ */
.strip {
  background: var(--ink-900);
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
  padding: 15px 0;
}
.strip__track {
  display: flex;
  width: max-content;
  animation: slide 38s linear infinite;
}
.strip__track span {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-400);
  white-space: nowrap;
}
.strip__track span::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-700);
}
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   SECTION SHELL (light)
   ============================================================ */
.section { padding: 104px 0; }
.section--paper { background: var(--paper); }
.section--white { background: var(--paper-2); }
.section--line  { border-top: 1px solid var(--line); }

.head { margin-bottom: 52px; }
.head--split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber-700);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--amber-600);
}
.head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.022em;
  color: var(--t-900);
}
.head p {
  margin-top: 14px;
  max-width: 56ch;
  font-size: 16.5px;
  color: var(--t-500);
}

/* ============================================================
   BLOG CONTROLS
   ============================================================ */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--t-500);
  transition: all .18s ease;
}
.tag:hover { border-color: var(--amber-600); color: var(--amber-700); }
.tag[aria-pressed="true"] {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}
.search svg {
  position: absolute;
  left: 13px;
  color: var(--t-400);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--t-900);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search input::placeholder { color: var(--t-400); }
.search input:focus {
  outline: none;
  border-color: var(--amber-600);
  box-shadow: 0 0 0 3px rgba(201,138,46,.14);
}

/* ============================================================
   POSTS
   ============================================================ */
.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.post:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px -22px rgba(26,28,31,.28);
}

/* featured post — asymmetric: spans two columns */
.post--featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 34px 34px;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--amber-050) 0%, transparent 62%),
    var(--paper-2);
  border-color: var(--amber-050);
}
.post--featured .post__main { flex: 1 1 auto; min-width: 0; }
.post--featured .post__title { font-size: 25px; line-height: 1.3; }
.post--featured .post__excerpt { font-size: 15.5px; }
.post__aside {
  flex: 0 0 168px;
  display: grid;
  gap: 12px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.post__metric { display: grid; gap: 2px; }
.post__metric b {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--t-900);
  letter-spacing: -.02em;
}
.post__metric span {
  font-size: 12.5px;
  color: var(--t-400);
  letter-spacing: .02em;
}

.post__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.chip {
  padding: 4px 11px;
  border-radius: 5px;
  background: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--t-500);
}
.chip--accent {
  background: var(--amber-050);
  color: var(--amber-700);
}
.post__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--t-400);
  margin-left: auto;
}

.post__title {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: -.012em;
  color: var(--t-900);
}
.post:hover .post__title { color: var(--amber-700); }

.post__excerpt {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--t-500);
  flex: 1 1 auto;
}

.post__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--t-400);
}
.post__foot span { display: inline-flex; align-items: center; gap: 6px; }
.post__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-700);
  transition: gap .18s ease, color .18s ease;
}
.post:hover .post__more { gap: 10px; color: var(--amber-700); }

.posts__empty {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  color: var(--t-400);
  font-size: 15px;
}

.posts__more { display: flex; justify-content: center; margin-top: 44px; }

/* ============================================================
   ABOUT / CONTACT
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: start;
}
.about__body p {
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--t-700);
}
.about__body p + p { margin-top: 18px; }
.about__body strong { color: var(--t-900); font-weight: 600; }

.facts {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.facts li { padding: 22px 20px; background: var(--paper-2); }
.facts b {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--amber-700);
}
.facts span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: var(--t-500);
}

/* code panel — dark block inside light section (rhythm) */
.panel {
  border-radius: var(--r-lg);
  background: var(--ink-950);
  border: 1px solid var(--ink-800);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(15,17,19,.55);
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ink-900);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.panel__bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-700);
}
.panel__bar span {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-400);
}
.panel__body {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-200);
  overflow-x: auto;
}
.panel__body .k { color: var(--amber-500); }
.panel__body .s { color: #94c08a; }
.panel__body .n { color: #7fb2d8; }
.panel__body .cm { color: var(--ink-400); }

.contact {
  margin-top: 30px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.contact li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  background: var(--paper-2);
  font-size: 14.5px;
}
.contact svg { color: var(--amber-600); flex-shrink: 0; }
.contact b,
.contact a {
  font-weight: 600;
  color: var(--t-900);
  font-family: var(--font-mono);
  font-size: 13.5px;
  transition: color .18s ease;
  word-break: break-all;
}
.contact a:hover { color: var(--amber-700); }
.contact em {
  margin-left: auto;
  font-style: normal;
  font-size: 13px;
  color: var(--t-400);
}

/* ============================================================
   FOOTER (dark)
   ============================================================ */
.footer {
  position: relative;
  background: var(--ink-950);
  color: var(--ink-300);
  padding: 76px 0 34px;
  overflow: hidden;
  isolation: isolate;
}
.footer::before {
  content: "";
  position: absolute;
  bottom: -420px; left: 50%;
  width: 1000px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(201,138,46,.16), transparent 76%);
  pointer-events: none;
  z-index: -1;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer__brand p {
  margin-top: 18px;
  max-width: 32ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-400);
}
.footer h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-200);
  margin-bottom: 18px;
}
.footer__list { display: grid; gap: 11px; }
.footer__list a, .footer__list span {
  font-size: 14.5px;
  color: var(--ink-400);
  transition: color .18s ease;
}
.footer__list a:hover { color: var(--amber-500); }
.footer__list code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-300);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 13px;
  color: var(--ink-400);
}
.footer__bottom a { color: var(--ink-300); }
.footer__bottom a:hover { color: var(--amber-500); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.footer__legal code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-400);
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1040px) {
  .hero__inner { grid-template-columns: 1fr; gap: 52px; }
  .hero__desc { max-width: 52ch; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .post--featured { grid-column: span 2; }
  .about { grid-template-columns: 1fr; gap: 44px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }

  .nav__links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 20px 22px;
    background: rgba(15,17,19,.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.09);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav__links.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links a { padding: 13px 12px; font-size: 16px; }
  .nav__cta { margin: 12px 0 0; justify-content: center; }
  .nav__burger { display: grid; }

  .hero { padding: 116px 0 72px; }
  .hero__title { letter-spacing: -.02em; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero__meta { gap: 10px 18px; }

  .section { padding: 72px 0; }
  .head { margin-bottom: 36px; }
  .head--split { grid-template-columns: 1fr; align-items: start; gap: 22px; }

  .controls { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; }

  .posts { grid-template-columns: 1fr; gap: 16px; }
  .post { padding: 24px 22px 20px; }
  .post--featured {
    grid-column: span 1;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 26px 22px 22px;
  }
  .post--featured .post__title { font-size: 21px; }
  .post__aside {
    flex: 1 1 auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .facts { grid-template-columns: 1fr; }

  .footer { padding: 56px 0 30px; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .footer__brand { grid-column: span 1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .term__body { font-size: 12.5px; padding: 18px 16px 20px; }
  .post__foot { flex-wrap: wrap; gap: 10px 14px; }
}
