/* =========================================
   不误正业 — VI Style Sheet
   ========================================= */

/* 字体 */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* 变量 */
:root {
  --bg: #070A0F;
  --bg-card: rgba(255,255,255,0.02);
  --border: rgba(255,255,255,0.06);
  --text: #F4EFE6;
  --text-dim: #8899AA;
  --text-muted: #445566;
  --prompt: #C9A227;
  --blue: #82AAFF;
  --cyan: #4FC3F7;
  --green: #7BD389;
  --yellow: #FFD166;
  --accent: #82AAFF;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* 背景：深色纯色 + 极淡噪点 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #070A0F;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* iPhone 安全区 */
body {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* 容器 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* =========================================
   导航
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 10, 15, 0.95);
  backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  height: 20px;
  width: auto;
  opacity: 0.92;
}

.nav-logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  transition: all 0.3s;
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(7, 10, 15, 0.98);
  padding: 24px 40px;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.nav-links.open a {
  font-size: 15px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  transition: color 0.3s;
}

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

.nav-links .active::after {
  content: '_';
  color: var(--blue);
  animation: blink 1s step-end infinite;
}

/* =========================================
   Hero
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 80px 0;
}

.hero-logo {
  flex: 0 0 45%;
}

.hero-logo img {
  width: 437px;
  display: block;
}

.hero-code {
  flex: 0 0 38ch;
  width: 38ch;
  max-width: 100%;
  min-height: 18em;
  margin-left: 20px;
  padding-left: 10px;
  font-size: 14px;
  line-height: 1.9;
}

.tw-line {
  display: flex;
  align-items: flex-start;
}

.tw-prompt {
  flex: 0 0 1.35ch;
}

.tw-content {
  flex: 1;
  white-space: pre-wrap;
}

.draft-switch {
  position: sticky;
  top: 105px;
  z-index: 20;
}

.draft-switch .container {
  display: flex;
  justify-content: flex-end;
}

.draft-switch-inner {
  display: inline-flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 999px;
}

.draft-chip {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s;
}

.draft-chip:hover,
.draft-chip.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.hero-meta {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.hero-meta strong {
  color: var(--text-dim);
  font-weight: 500;
}

/* 代码颜色 */
.prompt { color: var(--prompt); }
.value { color: var(--text); font-weight: 500; }
.cyan { color: var(--cyan); }
.green { color: var(--green); }
.blue { color: var(--blue); }
.yellow { color: var(--yellow); }
.gray { color: var(--text-dim); }

.line-ai { color: var(--text-muted); }
.line-me { color: var(--text); font-weight: 400; }
.me-text {
  color: var(--text);
  text-shadow: 0 0 12px rgba(244,239,230,0.08);
}

/* AI 行内的彩色关键词 */
.diving  { color: var(--cyan); }
.ai-text { color: var(--green); }
.photo-text { color: var(--blue); }
.zhengye { color: #A06A6A; }

body.home .line-ai { color: #7c899c; }
body.home .diving { color: #91b8c8; }
body.home .ai-text { color: #9bb7a4; }
body.home .photo-text { color: #9aaee0; }
body.home .zhengye { color: #a06a6a; }
body.home .hero-logo img {
  mask-image: none;
  -webkit-mask-image: none;
}

/* 光标 */
.cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background: var(--blue);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* =========================================
   分隔线
   ========================================= */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 100px 0;
}

/* =========================================
   领域模块
   ========================================= */
.section-title {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.domains {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 100px;
}

.domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 24px;
  transition: all 0.3s;
  cursor: default;
}

.domain-link {
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.domain-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.domain-card .domain-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.domain-card .domain-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.domain-card .domain-name.lawyer { color: var(--text); }
.domain-card .domain-name.diving { color: var(--cyan); }
.domain-card .domain-name.ai { color: var(--green); }
.domain-card .domain-name.photo { color: var(--blue); }

.domain-card .domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.domain-card .tag {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}

/* =========================================
   文章列表
   ========================================= */
.notes-list {
  margin-bottom: 100px;
}

.note-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.3s;
  text-decoration: none;
}

.note-item:hover {
  opacity: 0.6;
}

.note-item .note-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.note-item .note-title {
  font-size: 15px;
  color: var(--text);
}

.note-item .note-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
}

.note-item-titleonly {
  align-items: center;
}

.note-item-titleonly .note-title {
  font-size: 20px;
  line-height: 1.5;
}

.note-item-titleonly .note-arrow {
  font-size: 16px;
}

/* =========================================
   关于页
   ========================================= */
.page {
  padding-top: 140px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 60px;
}

.page-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.about-content {
  max-width: 600px;
}

.about-content p {
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 28px;
  font-size: 15px;
}

.about-content strong {
  color: var(--text);
}

/* =========================================
   文章页
   ========================================= */
.essay-shell {
  max-width: 780px;
}

.essay-kicker {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.essay-title {
  font-size: 42px;
  line-height: 1.28;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.essay-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 40px;
}

.essay-intro {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 2;
  margin-bottom: 42px;
}

.essay-content {
  max-width: 680px;
}

.essay-content h2 {
  font-size: 22px;
  margin: 56px 0 18px;
  letter-spacing: 1px;
}

.essay-content p {
  font-size: 17px;
  line-height: 2.05;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.essay-content blockquote {
  margin: 36px 0;
  padding: 18px 24px;
  border-left: 2px solid var(--prompt);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  line-height: 1.95;
}

.essay-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 42px 0;
}

.essay-media {
  margin: 28px auto 22px;
  max-width: 520px;
}

.essay-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 320px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  cursor: zoom-in;
}

.essay-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.essay-media figcaption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.essay-backlink {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 34px;
}

.essay-backlink:hover {
  color: var(--text);
}

/* =========================================
   联系页
   ========================================= */
.contact-lines {
  margin-bottom: 40px;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.contact-line .contact-prompt {
  color: var(--prompt);
  flex-shrink: 0;
}

.contact-line .contact-label {
  color: var(--text-muted);
  width: 80px;
  font-size: 13px;
}

.contact-line .contact-value {
  color: var(--text);
}

.contact-line .contact-value a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.2s;
}

.contact-line .contact-value a:hover {
  opacity: 0.7;
}

/* =========================================
   项目页
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  transition: all 0.3s;
}

.project-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.project-card .project-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.project-card .project-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card .tag {
  font-size: 10px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
}

/* =========================================
   Footer
   ========================================= */
.footer {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  margin-top: 100px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer .slogan {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 2px;
}

.footer .slogan span {
  color: var(--text);
}

.footer .copy {
  color: var(--text-muted);
  font-size: 12px;
}

.filing-line {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.filing-sep {
  opacity: 0.55;
}

/* =========================================
   响应式
   ========================================= */
@media (min-width: 901px) {
  .hero-logo img {
    width: 460px;
    max-width: none;
    transform: translate(70px, 18px);
  }

  .hero-code {
    transform: translate(-100px, 96px);
  }
}

@media (max-width: 900px) {
  .draft-switch {
    top: 96px;
  }

  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero-inner {
    flex-direction: column;
    gap: 48px;
    text-align: left;
  }
  
  .hero-logo img {
    width: 280px;
  }
  
  .hero-code {
    margin-left: 0;
    width: 36ch;
    flex-basis: 36ch;
    padding-left: 10px;
  }

  .note-item-titleonly .note-title {
    font-size: 18px;
  }

  .essay-title {
    font-size: 34px;
  }
  
  .domains {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }
  
  .nav-inner {
    padding: 0 20px;
  }
  
  .hero-inner {
    justify-content: center;
    text-align: center;
  }
  
  .hero-logo {
    flex: none;
    display: flex;
    justify-content: center;
  }
  
  .hero-logo img {
    width: 200px;
  }
  
  .hero-code {
    width: 100%;
    max-width: 31ch;
    min-height: 16.5em;
    margin: 0 auto;
    padding-left: 14px;
    text-align: left;
    transform: translateX(24px);
  }

  .draft-switch .container {
    justify-content: flex-start;
  }

  .draft-switch-inner {
    width: 100%;
    justify-content: space-between;
  }

  .draft-chip {
    flex: 1;
    text-align: center;
  }
  
  .domains {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .filing-line {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .filing-sep {
    display: none;
  }
  
  .hero-code {
    font-size: 13px;
  }
  
  .page {
    padding-top: 120px;
  }
  
  .note-item {
    flex-direction: column;
    gap: 6px;
  }
  
  .note-item .note-arrow {
    display: none;
  }

  .note-item-titleonly {
    flex-direction: row;
    align-items: center;
  }

  .note-item-titleonly .note-title {
    font-size: 16px;
  }
  
  .contact-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .contact-line .contact-label {
    width: auto;
  }

  .essay-title {
    font-size: 28px;
  }

  .essay-intro,
  .essay-content p {
    font-size: 16px;
  }

  .essay-media {
    max-width: 100%;
    margin: 24px auto 18px;
  }

  .essay-media-link {
    height: 220px;
    padding: 10px;
  }

  .essay-media figcaption {
    font-size: 11px;
  }
}

/* =========================================
   滚动条
   ========================================= */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
