/* CSS变量系统 - 极简黑白主题 */
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --text-secondary: #666666;
  --text-muted: #999999;
  --link-color: #000000;
  --link-hover: #333333;
  --border-color: #000000;
  --border-light: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --code-bg: #f8f8f8;
  --code-border: #e0e0e0;
  --blockquote-border: #000000;
  --blockquote-text: #333333;
  --table-header-bg: #f8f8f8;
  --table-border: #e0e0e0;
  --table-hover: #f5f5f5;
  --hr-color: #e0e0e0;
  --title-color: #000000;
  --title-hover: #333333;
  --footer-color: #666666;
  --github-corner: #000000;
  --transition: all 0.2s ease;
}

/* 深色主题 - 极简黑白 */
[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --link-color: #ffffff;
  --link-hover: #cccccc;
  --border-color: #ffffff;
  --border-light: #333333;
  --shadow-light: rgba(255, 255, 255, 0.05);
  --shadow-medium: rgba(255, 255, 255, 0.1);
  --card-bg: #000000;
  --code-bg: #111111;
  --code-border: #333333;
  --blockquote-border: #ffffff;
  --blockquote-text: #cccccc;
  --table-header-bg: #111111;
  --table-border: #333333;
  --table-hover: #1a1a1a;
  --hr-color: #333333;
  --title-color: #ffffff;
  --title-hover: #cccccc;
  --footer-color: #999999;
  --github-corner: #ffffff;
}

* {
    box-sizing: border-box;
}

html, body{
  margin: 0px auto;
  padding:0px 10px;
  font-size: 16px;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: var(--transition);
}

.container {
  margin: 0px auto;
  max-width: 80%;
  padding: 100px 0 150px 0;
  min-height: calc(100vh - 250px);
}

.content {
  margin: 0px auto;
  max-width: 80%;
  padding: 100px 0 150px 0;
  min-height: calc(100vh - 250px);
}

/* 保留正文中的换行与空白，允许长行换行 */
.article-body {
  white-space: pre-wrap;      /* 保留换行与空格 */
  word-wrap: break-word;      /* 兼容旧浏览器 */
  overflow-wrap: anywhere;    /* 长单词/URL也能换行 */
}

a {
  color: var(--link-color); 
  text-decoration: none;
  transition: var(--transition);
}
a:hover{
  text-decoration: underline; 
  color: var(--link-hover);
}
strong{
  font-weight: 800; 
  color: var(--title-color);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  line-height: 1.3;
  color: var(--title-color);
  cursor: text;
  position: relative;
  margin: 20px 0 15px;
  padding: 0;
  transition: var(--transition);
  letter-spacing: -0.01em;
}

h1 {font-size: 2.2em;padding-bottom: 0.2em; font-weight: 200;}
h2 {font-size: 1.6em;padding-bottom: 0.2em;margin: 20px 0px; font-weight: 300;}
h3 {font-size: 1.3em;font-weight: 400; margin: 18px 0px;}
h4 {font-size: 1.1em;font-weight: 400;margin: 16px 0px;}
h5 {font-size: 1em;margin: 16px 0px; font-weight: 400;}
h6 {font-size: 0.9em;margin: 16px 0px; font-weight: 400;}

h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
  color: var(--title-hover);
}

p, blockquote, table, pre {margin: 15px 0; }
ul {padding-left: 30px; }
ol {padding-left: 30px; }ol li ul:first-of-type {margin-top: 0px; }

hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: var(--hr-color);
    border: 0; 
    overflow: hidden;
    transition: var(--transition);
}

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
  margin-top: 0;
  padding-top: 0; }

h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p, ul li > :first-child, ol li > :first-child {
  margin-top: 0; }
dl {
  padding: 0; }
dl dt {
  font-size: 14px;
  font-weight: bold;
  font-style: italic;
  padding: 0;
  margin: 15px 0 5px; }
dl dt:first-child {
 padding: 0; }
dl dt > :first-child {
  margin-top: 0; }
dl dt > :last-child {
  margin-bottom: 0; }
dl dd {
  margin: 0 0 15px;
  padding: 0 15px; }
dl dd > :first-child {
  margin-top: 0; }
dl dd > :last-child {
  margin-bottom: 0; }
blockquote {
  border-left: 0.25em solid var(--blockquote-border);
  padding: 0 1em;
  color: var(--blockquote-text);
  transition: var(--transition);
}
blockquote > :first-child {
  margin-top: 0; }
blockquote > :last-child {
  margin-bottom: 0; }
table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 100%;
  font: inherit; }
table {
  border: 2px solid var(--border-color);
  transition: var(--transition);
}
table th {
  font-weight: 800;
  border: 1px solid var(--table-border);
  background: var(--table-header-bg);
  padding: 12px 16px;
  transition: var(--transition);
}
table td {
  border: 1px solid var(--table-border);
  padding: 12px 16px;
  transition: var(--transition);
}
table tr {
  border-top: 1px solid var(--table-border);
  background-color: var(--card-bg);
  transition: var(--transition);
}
table tr:nth-child(2n) {
  background-color: var(--table-hover);
}
tbody tr:hover {
  background-color: var(--table-hover);
}
img {
  max-width: 80%;
  border: 2px solid var(--border-color);
  margin: 0px auto; 
  display: block;
  transition: var(--transition);
}
img:hover {
  opacity: 0.8;
}
code, tt {
  padding: 0.2em 0.4em;
  margin: 0px 3px;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  background-color: var(--code-bg);
  font-size: 0.9em;
  transition: var(--transition);
}
pre > code {
  margin: 0;
  padding: 0;
  white-space: pre;
  border: none;
  background: transparent;
  font-family: 'Courier New', "Noto Serif",Georgia,Cambria,"Times New Roman",Times,serif;
}
pre {
  background-color: var(--code-bg);
  padding: 20px;
  overflow: auto;
  margin-top: 0;
  word-wrap: normal;
  line-height: 1.4em;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

pre code, pre tt {
    padding: 0;
    margin: 0;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    font-size: 100%;
    word-break: normal;
    white-space: pre;
    border: 0;
}

pre:hover{
  background-color: var(--border-light);
}

sup, sub, a.footnote {font-size: 1.4ex;height: 0;line-height: 1;vertical-align: super;position: relative;}
sub {vertical-align: sub;top: -1px; }
img, pre, blockquote, table { page-break-inside: avoid; }
pre code {overflow: visible; }
li::selection, ol::selection { background-color: rgba(133, 201, 232, 0.3); }
pre::selection, code::selection {background-color: rgba(0, 0, 0, 0.7);color: #eeeeee; }
code span::selection {background-color: rgba(0, 0, 0, 0.7) !important;color: #eeeeee !important; }
/* 文章列表卡片样式 */
#left-sider, #right-sider{
  float: left;
  width:50%;
  min-width: 256px;
}

#left-sider ul, #right-sider ul {
  padding: 0;
  margin: 0;
}

#left-sider li, #right-sider li {
  list-style: none;
  margin-bottom: 1px;
  padding: 20px 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

#left-sider li:hover, #right-sider li:hover {
  background: var(--border-light);
}

#left-sider li a, #right-sider li a {
  display: block;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

#left-sider li a:hover, #right-sider li a:hover {
  color: var(--link-color);
  text-decoration: none;
}

.post-date {
  color: var(--text-secondary);
  font-size: 0.9em;
  margin-right: 8px;
  font-weight: 500;
  transition: var(--transition);
}

/* 顶部导航栏 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: var(--transition);
}

.header .logo {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--title-color);
  text-decoration: none;
  transition: var(--transition);
}

.header .logo:hover {
  color: var(--link-color);
  text-decoration: none;
}

.header .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header .nav-links a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 0;
  margin-left: 30px;
  transition: var(--transition);
  font-weight: 300;
  border-bottom: 1px solid transparent;
}

.header .nav-links a:hover {
  color: var(--link-color);
  text-decoration: none;
  border-bottom-color: var(--border-color);
}

/* 主题切换按钮 */
.theme-toggle {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 1001;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--border-light);
}

.theme-toggle .sun-icon {
  display: block;
  color: var(--text-color);
}

.theme-toggle .moon-icon {
  display: none;
  color: var(--text-color);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

/* 极简背景 */
body {
  background: var(--bg-color);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* 选择文本样式 */
::selection {
  background: var(--link-color);
  color: white;
}

::-moz-selection {
  background: var(--link-color);
  color: white;
}

/* 时间轴样式 */
.timeline-nav {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.timeline-title {
  font-size: 1.8em;
  font-weight: 200;
  color: var(--title-color);
  margin: 0;
  letter-spacing: -0.01em;
}

.year-filter {
  display: flex;
  align-items: center;
}

.year-select {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
}

.year-select:hover {
  background: var(--border-light);
}

.year-select:focus {
  outline: none;
  border-color: var(--text-color);
}

.timeline-container {
  position: relative;
  padding-left: 30px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  padding-left: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  z-index: 1;
}

.timeline-year {
  font-size: 1.4em;
  font-weight: 300;
  color: var(--title-color);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.timeline-posts {
  margin-left: 20px;
}

.timeline-post {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.timeline-post:hover {
  background: var(--border-light);
  margin: 0 -20px 15px -20px;
  padding: 12px 20px;
}

.timeline-date {
  color: var(--text-secondary);
  font-size: 0.9em;
  font-weight: 400;
  margin-right: 20px;
  min-width: 50px;
  text-align: right;
}

.timeline-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 300;
  transition: var(--transition);
  flex: 1;
}

.timeline-link:hover {
  color: var(--link-color);
  text-decoration: none;
}

/* 关于页面样式 */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.8;
}

.about-content h2 {
  color: var(--title-color);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
}

.about-content ul {
  padding-left: 20px;
  margin: 15px 0;
}

.about-content li {
  margin: 8px 0;
  color: var(--text-color);
}

.about-content strong {
  color: var(--title-color);
  font-weight: 600;
}

.about-content a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.about-content a:hover {
  border-bottom-color: var(--link-color);
  text-decoration: none;
}

#footer{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 0;
  margin: 0;
  color: var(--footer-color);
  border: 0; 
  font-size: 12px;
  width: 100%;
  line-height: 20px;
  text-align: center;
  background: var(--bg-color);
  border-top: 2px solid var(--border-color);
  transition: var(--transition);
  z-index: 100;
}
#footer ul{
  padding: 0px;
  margin: 0;
}
#footer li{
  list-style: none;
  margin: 8px 0;
}
#top{
  display: none;
}

@media (min-width: 1200px) {
  #top{
    position: fixed;
    display: block;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
  }
  #top a {
    display: block;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #top a:hover {
    background: var(--border-light);
  }
  #top img {
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 0;
  }
}
nav {display: none;}
@media (min-width: 1200px) {
  nav{
    width:280px;
    display: block;
    position: fixed;
    left: 0px;
    z-index: 1000;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    top:80px;
    bottom: 50px;
    overflow: auto;
  }
}

.title{
  font-weight: 300;
  font-size: 3em;
  width: 100%;
  margin-bottom: 0px;
  border: 0px;
  padding-left: 10px;
  color: var(--title-color);
  transition: var(--transition);
  letter-spacing: -0.02em;
}
.content > .title{
  margin-left: -24px; 
  text-align: center;
}
.title:hover {
  color: var(--title-hover);
  transform: scale(1.02);
}
.eof{
  padding: 0 10px;
  float: left;
  margin-bottom: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}
.eof_arrow{
  float: right;
}
.eof_tag{
  padding: 0 10px;
  text-align: right;
  float: right;
  color: var(--text-secondary);
  transition: var(--transition);
}
.title_arrow_back{
  width: 25px;
  height: 25px;
  float: right;
  margin-top: -30px;
  margin-right: 2px;
  transition: var(--transition);
}

.github-corner {
  transition: var(--transition);
}
.github-corner:hover .octo-arm{
  animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave{
  0%,100%{transform:rotate(0)}
  20%,60%{transform:rotate(-25deg)}
  40%,80%{transform:rotate(10deg)}
}
@media (max-width:500px){
  .github-corner:hover .octo-arm{animation:none}
  .github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}
}

@media (max-width: 960px) {
  html, body{font-size: 16px;}
  h1{font-size: 1.5em;}
  h2{font-size: 1.25em}
  h3{font-size: 1em;}
  .title{font-size:2em;}
  #footer{font-size: 0.85em;}
  .container {
    margin: 0px auto;
    max-width: 100%;
  }
  .content {
    margin: 0px auto;
    max-width: 100%;
  }
  #right-sider {
    clear:both;
    float: left;
    width: 100%;
  }
  #left-sider {
    width: 100%;
  }
  .header {
    height: 50px;
    padding: 0 15px;
  }
  .header .logo {
    font-size: 1.2em;
  }
  .header .nav-links {
    gap: 10px;
  }
  .header .nav-links a {
    padding: 6px 12px;
    font-size: 0.9em;
  }
  .theme-toggle {
    top: 65px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  #footer {
    font-size: 12px;
    padding: 10px 0;
  }
  .container, .content {
    padding-top: 80px;
    padding-bottom: 130px;
  }
  .timeline-nav {
    margin: 30px auto;
    padding: 0 15px;
  }
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .timeline-title {
    font-size: 1.5em;
  }
  .year-select {
    font-size: 13px;
    padding: 6px 12px;
    min-width: 100px;
  }
  .timeline-container {
    padding-left: 25px;
  }
  .timeline-container::before {
    left: 12px;
  }
  .timeline-item {
    padding-left: 30px;
    margin-bottom: 40px;
  }
  .timeline-item::before {
    left: -5px;
    width: 12px;
    height: 12px;
  }
  .timeline-year {
    font-size: 1.2em;
    margin-bottom: 15px;
  }
  .timeline-posts {
    margin-left: 15px;
  }
  .timeline-post {
    margin-bottom: 12px;
    padding: 10px 0;
  }
  .timeline-date {
    font-size: 0.8em;
    margin-right: 15px;
    min-width: 45px;
  }
}