/* 学习记录 - 黑灰科技风静态主页 */

:root {
  --bg: #05070a;
  --bg-soft: #0a0d12;
  --card: rgba(18, 22, 29, 0.72);
  --card-strong: rgba(24, 29, 38, 0.88);
  --line: rgba(194, 210, 232, 0.18);
  --line-strong: rgba(210, 226, 255, 0.34);
  --text: #f2f6ff;
  --text-soft: #b8c2d3;
  --muted: #7e8899;
  --accent: #4f8cff;
  --accent-2: #7a5cff;
  --green: #21c98a;
  --purple: #8e63ff;
  --violet: #5661ff;
  --shadow: rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

[data-theme="dim"] {
  --bg: #0a0a0b;
  --bg-soft: #101113;
  --card: rgba(26, 27, 30, 0.74);
  --card-strong: rgba(32, 34, 38, 0.92);
  --line: rgba(235, 235, 235, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --text: #f1f1f1;
  --text-soft: #c3c3c3;
  --muted: #8b8b8b;
  --accent: #c6ccd8;
  --accent-2: #8b929e;
  --green: #aeb6c2;
  --purple: #b4b7c0;
  --violet: #9da3ad;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 72% 12%, rgba(45, 93, 176, 0.18), transparent 33%),
    radial-gradient(circle at 12% 26%, rgba(110, 110, 120, 0.12), transparent 26%),
    linear-gradient(180deg, #06080d 0%, var(--bg) 46%, #020304 100%);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 72%);
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(4, 6, 10, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 18px rgba(170, 198, 255, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  color: var(--text-soft);
  font-size: 15px;
}

.nav a {
  position: relative;
  padding: 26px 0;
  transition: color .22s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent);
}

.theme-toggle {
  justify-self: end;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  cursor: pointer;
  transition: all .22s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.page {
  width: min(1440px, calc(100% - 64px));
  margin: 28px auto 0;
}

.glass-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018)),
    var(--card);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.07);
  backdrop-filter: blur(18px);
}

.hero {
  position: relative;
  min-height: 410px;
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  overflow: hidden;
  padding: clamp(38px, 5vw, 72px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 35%, rgba(77, 139, 255, 0.28), transparent 33%),
    linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(4,8,16,0.45) 42%, rgba(1,4,10,0.75) 100%);
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(255,255,255,0.08) 43%, transparent 44%),
    radial-gradient(circle at 10% 18%, rgba(255,255,255,0.08) 1px, transparent 1.8px);
  background-size: auto, 14px 14px;
  opacity: .7;
  z-index: -1;
}

.hero-content {
  align-self: center;
  max-width: 570px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--text-soft);
  letter-spacing: .08em;
  font-size: 17px;
}

h1 {
  margin: 0;
  font-size: clamp(64px, 7vw, 96px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .04em;
  text-shadow: 0 0 28px rgba(190, 214, 255, 0.28);
}

.welcome {
  margin: 42px 0 14px;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
}

.hero-desc {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.9;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.95), rgba(122, 92, 255, 0.86));
  border: 0;
  box-shadow: 0 14px 32px rgba(79, 140, 255, 0.24);
}

.btn.ghost {
  background: rgba(255,255,255,0.04);
}

.hero-visual {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.orbital {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1.45;
  transform: perspective(900px) rotateX(56deg) rotateZ(-8deg);
}

.ring,
.ai-cube,
.sphere,
.mini-cube {
  position: absolute;
}

.ring {
  inset: 24% 10%;
  border: 2px solid rgba(126, 168, 255, .42);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(66, 132, 255, .28), inset 0 0 20px rgba(255,255,255,.08);
}

.ring-two {
  inset: 17% 0%;
  opacity: .44;
}

.ai-cube {
  left: 47%;
  top: 4%;
  width: 150px;
  height: 150px;
  transform: translateX(-50%) rotateX(-56deg) rotateZ(8deg);
  display: grid;
  place-items: center;
  border: 1px solid rgba(218, 232, 255, .68);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(77, 139, 255,.18) 42%, rgba(0,0,0,.18)),
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(255,255,255,.08) 15px),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.08) 15px);
  box-shadow: 0 0 42px rgba(82, 145, 255, .55), inset 0 0 34px rgba(255,255,255,.16);
  border-radius: 4px;
}

.ai-cube span {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: .05em;
  color: #f6fbff;
  text-shadow: 0 0 24px rgba(154, 195, 255, .8);
}

.sphere {
  left: 26%;
  top: 44%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  transform: rotateX(-56deg) rotateZ(8deg);
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.88), rgba(98,120,158,.28) 36%, rgba(0,0,0,.46) 72%);
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
}

.mini-cube {
  right: 12%;
  top: 32%;
  width: 42px;
  height: 42px;
  transform: rotateX(-56deg) rotateZ(8deg);
  border: 1px solid rgba(180, 211, 255, .42);
  background: rgba(84, 135, 220, .12);
}

.quick-grid,
.recent-grid,
.knowledge-grid,
.tool-columns {
  display: grid;
  gap: 18px;
}

.quick-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 28px;
}

.quick-card {
  padding: 26px;
  min-height: 138px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.quick-card:hover,
.recent-card:hover,
.link-panel:hover,
.note-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.025)),
    var(--card);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-head h2 {
  margin: 0;
  font-size: 20px;
}

.arrow {
  margin-left: auto;
  font-size: 30px;
  color: var(--text-soft);
}

.icon,
.record-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}

.icon.blue, .record-icon.blue { background: linear-gradient(145deg, #1c66ff, #0b2a73); }
.icon.green, .record-icon.green { background: linear-gradient(145deg, #20d69a, #0b6247); }
.icon.purple, .record-icon.purple { background: linear-gradient(145deg, #925cff, #35147b); }
.icon.violet { background: linear-gradient(145deg, #6570ff, #22227a); }

.quick-card p {
  margin: 14px 0 16px;
  color: var(--text-soft);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row a,
.link-list small,
.recent-card p,
.section-title p,
.note-card p,
.quote p {
  color: var(--text-soft);
}

.tag-row a {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  font-size: 13px;
  transition: all .2s ease;
}

.tag-row a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.07);
}

.tools-section,
.recent,
.knowledge-grid,
.quote {
  margin-top: 34px;
}

.section-title {
  margin: 0 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.section-title h2::before {
  content: "";
  width: 4px;
  height: 23px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
}

.section-title p {
  margin: 8px 0 0;
  font-size: 14px;
}

.section-title.row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.view-all {
  color: var(--text-soft);
}

.search-box {
  padding: 14px;
  margin-bottom: 18px;
}

.search-box input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  font-size: 15px;
}

.search-box input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(79,140,255,.12);
}

.tool-columns {
  grid-template-columns: repeat(4, 1fr);
}

.link-panel {
  padding: 24px;
}

.link-panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.link-list a {
  display: block;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.026);
  transition: all .2s ease;
}

.link-list a:hover {
  border-color: var(--line-strong);
  background: rgba(255,255,255,.07);
  transform: translateX(3px);
}

.link-list span {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.link-list small {
  display: block;
  font-size: 12px;
}

.recent-grid {
  grid-template-columns: repeat(3, 1fr);
}

.recent-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 18px;
}

.recent-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.recent-card p {
  margin: 0;
  font-size: 13px;
}

.recent-card > span {
  margin-left: auto;
  color: var(--text-soft);
  font-size: 24px;
}

.knowledge-grid {
  grid-template-columns: repeat(3, 1fr);
}

.note-card {
  padding: 24px;
}

.note-card .label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .12em;
}

.note-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.note-card p {
  margin: 0;
  line-height: 1.8;
}

.quote {
  min-height: 142px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 30px clamp(28px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}

.quote::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 70%, rgba(80, 140, 255, .18) 1px, transparent 2px);
  background-size: 13px 13px;
  mask-image: linear-gradient(to right, transparent, black);
  opacity: .8;
}

.quote-mark {
  font-size: 96px;
  line-height: .7;
  color: rgba(145, 178, 232, .68);
}

.quote h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.quote .heart {
  color: var(--accent);
  font-size: 24px;
  z-index: 1;
}

.footer {
  width: min(1440px, calc(100% - 64px));
  margin: 20px auto 26px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .page {
    width: min(100% - 36px, 980px);
  }

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

  .hero-visual {
    min-height: 220px;
  }

  .quick-grid,
  .tool-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-grid,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 20px;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 14px 18px;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    padding-top: 12px;
    justify-content: flex-start;
    gap: 22px;
  }

  .nav a {
    white-space: nowrap;
    padding: 10px 0;
  }

  .page,
  .footer {
    width: calc(100% - 24px);
  }

  .hero {
    padding: 28px 22px;
    min-height: auto;
  }

  h1 {
    font-size: 54px;
  }

  .eyebrow {
    font-size: 14px;
  }

  .quick-grid,
  .tool-columns {
    grid-template-columns: 1fr;
  }

  .quote {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .quote-mark {
    font-size: 70px;
  }
}
