/* ------------------------------------
 * Typecho Default Theme
 *
 * @author  Typecho Team
 * @link  http: //typecho.org/
 * @update  2013-10-28
 * --------------------------------- */

/* ------------------
 * Color System
 * --------------- */
:root {
  /* Primary Colors */
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #60A5FA;
  
  /* Secondary Colors */
  --secondary: #8B5CF6;
  --secondary-dark: #7C3AED;
  --secondary-light: #A78BFA;
  
  /* Accent Colors */
  --accent: #EC4899;
  --accent-dark: #DB2777;
  --accent-light: #F472B6;
  
  /* Neutral Colors */
  --background: #F9FAFB;
  --surface: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --border-dark: #D1D5DB;
  
  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* Typography */
  --font-family-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans CN', 'WenQuanYi Micro Hei', 'Microsoft Yahei', sans-serif;
  --font-family-mono: 'Menlo', 'Monaco', 'Consolas', 'Lucida Console', 'Courier New', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 0.875rem;  /* 14px */
  --text-base: 1rem;    /* 16px */
  --text-lg: 1.125rem;  /* 18px */
  --text-xl: 1.25rem;   /* 20px */
  --text-2xl: 1.5rem;   /* 24px */
  --text-3xl: 1.875rem; /* 30px */
  --text-4xl: 2.25rem;  /* 36px */
  --text-5xl: 3rem;     /* 48px */
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
}

/* ------------------
 * Global style
 * --------------- */
body {
  background-color: var(--background);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  font-weight: 400;
}

/* Responsive Font Size */
@media (max-width: 768px) {
  body {
    font-size: var(--text-sm);
  }
}

@media (min-width: 1200px) {
  body {
    font-size: var(--text-lg);
  }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:active {
  color: var(--primary-dark);
}
pre, code { 
  background: var(--border-light);
  font-family: var(--font-family-mono);
  font-size: var(--text-sm);
}
code { padding: 2px 4px; color: var(--error); }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
}
pre code {
  padding: 3px;
  color: var(--text-secondary);
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid var(--primary-light);
  color: var(--text-secondary);
  background-color: var(--border-light);
  padding: 1em 1.5em;
  border-radius: 0 0.375rem 0.375rem 0;
}

table {
  border: 1px solid var(--border);
  width: 100%;
  border-collapse: collapse;
  border-radius: 0.375rem;
  overflow: hidden;
}
table th,
table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}
table th {
  background: var(--border-light);
  font-weight: 600;
  color: var(--text-primary);
}

/* ------------------
 * Typography - Headings
 * --------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

h5 {
  font-size: var(--text-lg);
  font-weight: 600;
}

h6 {
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Responsive Headings */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-3xl);
  }
  h2 {
    font-size: var(--text-2xl);
  }
  h3 {
    font-size: var(--text-xl);
  }
  h4 {
    font-size: var(--text-lg);
  }
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  width: 100%;
  border-radius: 0.375rem;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background-color: var(--surface);
  color: var(--text-primary);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
textarea {
  resize: vertical;
  min-height: 120px;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

/* ------------------
 * Header
 * --------------- */

#header {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
}

#logo {
  color: var(--text-primary);
  font-size: 2.5em;
  font-weight: 700;
  transition: color 0.3s ease;
}
#logo:hover {
  color: var(--primary);
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 1.1em;
}

/* Navigation menu */
#nav-menu {
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
}
#nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--text-secondary);
  float: left;
  transition: all 0.3s ease;
  font-weight: 500;
  background-color: var(--surface);
}
#nav-menu a:hover,
#nav-menu .current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Search */
#search {
  position: relative;
  margin-top: 1rem;
}
#search input {
  padding-right: 2.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}
#search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
#search button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  padding: 0.25rem;
  width: 24px;
  height: 24px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  direction: ltr; /* fix RTL language */
  text-indent: -9999em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
}
#search button:hover {
  background-color: var(--border-light);
}

@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    -webkit-background-size: 24px 24px;
    -moz-background-size: 24px 24px;
    -o-background-size: 24px 24px;
    background-size: 24px 24px;
  }
}


/* ------------------
 * Main
 * --------------- */

.post {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
  border-radius: 0.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.post:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.post-title {
  margin: 0 0 1.5rem;
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

@media (max-width: 768px) {
  .post-title {
    font-size: var(--text-2xl);
  }
}
.post-title a {
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.post-title a:hover {
  color: var(--primary);
}
.post-meta {
  margin: 0 0 1.5rem;
  padding: 0;
  color: var(--text-tertiary);
  font-size: 0.875em;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.post-meta li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding-left: 0;
  border-left: none;
  gap: 0.5rem;
}
.post-meta li::before {
  content: "•";
  color: var(--text-tertiary);
  margin-right: 0.5rem;
}
.post-meta li:first-child::before {
  display: none;
}
.post-content {
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.post-content p {
  margin-bottom: 1.5rem;
  font-size: var(--text-base);
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}
.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
  line-height: var(--leading-relaxed);
}
.post-content img {
  margin: 1.5rem 0;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.post-content hr {
  margin: 3rem auto;
  width: 100px;
  border: 2px solid var(--border);
  border-radius: 2px;
}
.post .tags {
  clear: both;
  margin-top: 1.5rem;
}
.post .tags a {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--border-light);
  border-radius: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: none;
  transition: all 0.3s ease;
}
.post .tags a:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.post-near {
  list-style: none;
  margin: 2rem 0;
  padding: 1.5rem;
  color: var(--text-secondary);
  background-color: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.post-near li {
  margin: 0;
  flex: 1;
}
.post-near a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  font-weight: 500;
}
.post-near a:hover {
  color: var(--primary);
}

.archive-title {
  margin: 2rem 0 1rem;
  padding-top: 2rem;
  color: var(--text-secondary);
  font-size: 1.25em;
  font-weight: 600;
  border-top: 1px solid var(--border);
}
.more {
  text-align: center;
  margin: 2rem 0;
}
.more a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
}
.more a:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.page-navigator li {
  display: inline-block;
  margin: 0;
}
.page-navigator a {
  display: inline-block;
  padding: 0.5rem 1rem;
  height: auto;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background-color: var(--surface);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  font-weight: 500;
}
.page-navigator a:hover {
  background: var(--border-light);
  color: var(--primary);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.page-navigator .current a {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}
.page-navigator .prev a,
.page-navigator .next a {
  font-weight: 600;
}
.page-navigator .prev a:hover,
.page-navigator .next a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 2rem;
  background-color: var(--surface);
  border-radius: 0.5rem;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--surface);
  transition: all 0.3s ease;
}
.comment-list li:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}
.comment-list li.comment-level-odd {
  background: var(--border-light);
}
.comment-list li.comment-level-even {
  background: var(--surface);
}
.comment-list li.comment-by-author {
  background: #FFF9E8;
  border-left: 4px solid var(--accent);
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
  margin-top: 1rem;
}
.comment-reply a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--border-light);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: none;
}
.comment-reply a:hover {
  background-color: var(--primary);
  color: white;
}
.comment-meta {
  margin-bottom: 0.75rem;
}
.comment-meta a {
  color: var(--text-tertiary);
  font-size: 0.875em;
  transition: color 0.3s ease;
}
.comment-meta a:hover {
  color: var(--primary);
}
.comment-author {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  gap: 1rem;
}
.comment-author .avatar {
  float: none;
  margin-right: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}
.comment-author:hover .avatar {
  border-color: var(--primary);
  transform: scale(1.05);
}
.comment-author cite {
  font-weight: 600;
  font-style: normal;
  font-size: 1.1em;
}
.comment-content {
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 1rem;
}
.comment-content p {
  margin-bottom: 1rem;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 1rem;
  font-size: .92857em;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.respond .cancel-comment-reply:hover {
  color: var(--error);
}
#comment-form {
  margin-top: 1.5rem;
}
#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: 600;
  color: var(--text-primary);
}
#comment-form .required:after {
  content: " *";
  color: var(--error);
}
#comment-form button[type="submit"] {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#comment-form button[type="submit"]:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Comment Form Styles */
.comment-logged-in {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--border-light);
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
  margin-bottom: 1rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form-comment textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  min-height: 150px;
  resize: vertical;
}

.comment-form-comment textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 1rem;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 2rem;
  background-color: var(--surface);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.widget:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
.widget-title {
  margin: 0 0 1.5rem;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary);
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 0.75rem 0;
  line-height: 1.6;
  transition: all 0.3s ease;
  padding-left: 1rem;
}
.widget-list li:hover {
  transform: translateX(4px);
}
.widget-list li a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  border: none;
  font-weight: 500;
}
.widget-list li a:hover {
  color: var(--primary);
}

.widget-list li ul {
  margin-left: 1rem;
  margin-top: 0.5rem;
}
.widget-list li ul li {
  margin: 0.5rem 0;
}
.widget-list li ul li a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.widget-list li ul li a:hover {
  color: var(--primary);
}

/* ------------------
 * Sidebar Widgets - Enhanced
 * --------------- */

/* Author Info Widget */
.author-info {
  text-align: center;
}

.author-avatar {
  margin-bottom: 1rem;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.author-avatar img:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.author-bio h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-bio p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.author-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--border-light);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border: none;
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Tag Cloud Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--border-light);
  border-radius: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border: none;
  font-weight: 500;
}

.tag-cloud a:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Widget Title Icons */
.widget-title i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* Popular Posts Widget */
.widget-list li {
  position: relative;
}

.widget-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  transition: transform 0.3s ease;
}

.widget-list li:hover::before {
  transform: translateX(4px);
  color: var(--primary);
}


/* ------------------
 * Article Table of Contents
 * --------------- */

.post-toc {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.post-toc:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-toc h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.toc-content {
  font-size: 0.875rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin: 0.5rem 0;
  transition: all 0.3s ease;
}

.toc-list li:hover {
  transform: translateX(4px);
}

.toc-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 0.25rem 0;
  border: none;
  font-weight: 500;
}

.toc-link:hover {
  color: var(--primary);
}

/* ------------------
 * Performance and Experience Enhancements
 * --------------- */

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  z-index: 1000;
  display: none;
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.scroll-to-top i {
  font-size: 1.25rem;
}

/* Image Lazy Loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

img.lazy.loaded {
  opacity: 1;
}

/* Page Transition Animation */
body {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.page-loaded {
  opacity: 1;
}

/* Smooth Scrolling Behavior */
html {
  scroll-behavior: smooth;
}

/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 3rem 0;
  line-height: 1.5;
  text-align: center;
  color: var(--text-tertiary);
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
#footer a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  border: none;
}
#footer a:hover {
  color: var(--primary);
}

/* ------------------
 * Visual Elements
 * --------------- */

/* ------------------
 * Icons
 * --------------- */

/* Font Awesome Icon Styles */
.fa {
  display: inline-block;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Icon Colors */
.icon-primary {
  color: var(--primary);
}

.icon-secondary {
  color: var(--secondary);
}

.icon-accent {
  color: var(--accent);
}

.icon-success {
  color: var(--success);
}

.icon-warning {
  color: var(--warning);
}

.icon-error {
  color: var(--error);
}

/* ------------------
 * Decorative Elements
 * --------------- */

/* Feature Divider */
.feature-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 3rem 0;
}

.feature-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-divider::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: bold;
  z-index: 1;
}

/* Card Component */
.card {
  background-color: var(--surface);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: var(--text-base);
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ------------------
 * Micro Animations
 * --------------- */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hover Lift Animation */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Scale Animation */
@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

/* ------------------
 * Layout - Responsive
 * --------------- */

/* Container and Grid Optimization */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

.row {
  margin-left: -1rem;
  margin-right: -1rem;
}

.row > [class*="col-"] {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Main Content Layout */
#main {
  padding-top: 2rem;
}

/* Sidebar Layout */
#secondary {
  padding-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #header {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }
  
  #logo {
    font-size: 2rem;
  }
  
  #nav-menu {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  #nav-menu a {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
  }
  
  .post {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .post-title {
    font-size: var(--text-2xl);
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .post-meta li::before {
    display: none;
  }
  
  .post-near {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #comments {
    padding: 1.5rem;
  }
  
  .widget {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .page-navigator {
    flex-wrap: wrap;
  }
  
  .page-navigator a {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .container {
    max-width: 95%;
  }
  
  #main {
    padding-right: 1.5rem;
  }
  
  #secondary {
    padding-left: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
  
  #main {
    padding-right: 2rem;
  }
  
  #secondary {
    padding-left: 2rem;
  }
  
  .post {
    padding: 2.5rem;
  }
  
  .widget {
    padding: 2rem;
  }
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;  /* hidden img parent link border  */
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid #E9E9E9;
  border-width: 2px 0 0 0;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

@media (min-width: 992px) {

}

@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden; }

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden; }
