/*
Theme Name: PDFNeo Light
Theme URI: https://pdfneo.net
Description: Clean light blog theme for PDFNeo
Version: 1.0
Author: PDFNeo
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pdfneo-light
*/

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #fff;
  color: #333;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2563eb;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Container
   ======================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ========================================
   Navigation
   ======================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #eee;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111;
  font-size: 18px;
  font-weight: 700;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-logo .logo-text {
  color: #111;
}

.nav-logo .blog-text {
  color: #aaa;
  font-weight: 400;
  margin-left: 2px;
  font-size: 16px;
}

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

.nav-links a {
  color: #888;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #111;
}

.nav-links a.active {
  color: #111;
}

.nav-links a.lang {
  color: #888;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.nav-links a.lang:hover {
  color: #111;
  border-color: #ccc;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #666;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========================================
   Main Content
   ======================================== */
.site-main {
  flex: 1;
  padding: 40px 0;
}

/* ========================================
   Content + Sidebar Layout
   ======================================== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.content-main {
  min-width: 0;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  align-self: start;
}

.sidebar-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #eee;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.sidebar-card-icon {
  width: 20px;
  height: 20px;
  color: #3b82f6;
  flex-shrink: 0;
}

.sidebar-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.sidebar-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-item:first-of-type {
  padding-top: 0;
}

.sidebar-item-left {
  flex: 1;
  min-width: 0;
}

.sidebar-item-title {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-item-title a {
  color: #333;
  text-decoration: none;
}

.sidebar-item-title a:hover {
  color: #3b82f6;
}

.sidebar-item-meta {
  font-size: 12px;
  color: #bbb;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-item-meta .views {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sidebar-item-meta .views svg {
  width: 12px;
  height: 12px;
  color: #ccc;
}

/* ========================================
   Blog List Page
   ======================================== */
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-card {
  background: #fff;
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 12px;
  border: 1px solid #eee;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  border-color: #ddd;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
}

.post-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.post-card-title a {
  color: #111;
  transition: color 0.15s ease;
}

.post-card-title a:hover {
  color: #3b82f6;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}

.post-card-meta time {
  color: #aaa;
}

.post-card-meta .sep {
  color: #ddd;
}

.post-card-meta a {
  color: #aaa;
}

.post-card-meta a:hover {
  color: #3b82f6;
}

.post-card-excerpt {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 20px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  color: #888;
  text-decoration: none;
  transition: all 0.15s ease;
  background: #fff;
}

.pagination a:hover {
  border-color: #ccc;
  color: #333;
}

.pagination .current {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.pagination .dots {
  border: none;
  background: none;
  color: #ccc;
}

.pagination .prev,
.pagination .next {
  font-size: 13px;
}

/* ========================================
   Single Post
   ======================================== */
.single-post-header {
  margin-bottom: 28px;
}

.single-post-title {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #aaa;
}

.single-post-meta time {
  color: #aaa;
}

.single-post-meta .sep {
  color: #ddd;
}

.single-post-meta a {
  color: #aaa;
}

.single-post-meta a:hover {
  color: #3b82f6;
}

.single-post-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 0 0 28px;
}

/* Featured image */
.single-post-featured {
  margin-bottom: 28px;
}

.single-post-featured img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* Post Content Typography */
.post-content {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
  background: #fff;
  border-radius: 10px;
  padding: 28px 30px;
  border: 1px solid #eee;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: #111;
  letter-spacing: -0.01em;
}

.post-content h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 36px 0 14px;
  line-height: 1.4;
}

.post-content h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 36px 0 14px;
  line-height: 1.4;
}

.post-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 10px;
  line-height: 1.4;
}

.post-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin: 22px 0 8px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content a {
  color: #3b82f6;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(59, 130, 246, 0.25);
}

.post-content a:hover {
  color: #2563eb;
  text-decoration-color: rgba(37, 99, 235, 0.4);
}

.post-content strong {
  color: #111;
  font-weight: 600;
}

.post-content ul,
.post-content ol {
  margin-bottom: 18px;
  padding-left: 22px;
}

.post-content li {
  margin-bottom: 5px;
  color: #444;
}

.post-content li strong {
  color: #222;
}

.post-content blockquote {
  border-left: 3px solid #e0e0e0;
  padding: 10px 18px;
  margin: 20px 0;
  background: #fafafa;
  border-radius: 0 6px 6px 0;
  color: #777;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content code {
  background: #f5f5f5;
  color: #444;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
  font-size: 0.88em;
}

.post-content pre {
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
}

.post-content img {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border: 1px solid #eee;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.post-content th,
.post-content td {
  border: 1px solid #eee;
  padding: 9px 13px;
  text-align: left;
}

.post-content th {
  background: #fafafa;
  font-weight: 600;
  color: #111;
}

.post-content td {
  color: #555;
}

.post-content hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 28px 0;
}

/* ========================================
   Tags
   ======================================== */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.post-tags-label {
  font-size: 13px;
  color: #aaa;
  margin-right: 4px;
  line-height: 24px;
}

.post-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  color: #888;
  text-decoration: none;
  transition: all 0.15s ease;
}

.post-tag:hover {
  border-color: #ccc;
  color: #555;
}

/* ========================================
   Post Navigation (Prev/Next)
   ======================================== */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-nav-item:hover {
  border-color: #ddd;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
}

.post-nav-item.next {
  text-align: right;
}

.post-nav-label {
  font-size: 11px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-nav-title {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  line-height: 1.4;
}

.post-nav-item:hover .post-nav-title {
  color: #333;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  border-top: 1px solid #eee;
  padding: 24px 0;
  margin-top: auto;
  background: #fff;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: #bbb;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #888;
}

.footer-copyright {
  font-size: 12px;
  color: #ccc;
}

/* ========================================
   404 Page
   ======================================== */
.error-404 {
  text-align: center;
  padding: 80px 0;
}

.error-404-code {
  font-size: 100px;
  font-weight: 800;
  color: #eee;
  line-height: 1;
  margin-bottom: 12px;
}

.error-404-title {
  font-size: 20px;
  font-weight: 600;
  color: #111;
  margin-bottom: 10px;
}

.error-404-desc {
  font-size: 15px;
  color: #999;
  margin-bottom: 28px;
}

.error-404 .btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #3b82f6;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.error-404 .btn-home:hover {
  background: #2563eb;
  color: #fff;
}

/* ========================================
   Screen Reader Text
   ======================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ========================================
   Category / Archive header
   ======================================== */
.archive-title {
  font-size: 18px;
  font-weight: 600;
  color: #999;
  margin-bottom: 24px;
}

.archive-title span {
  color: #111;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
  }

  .sidebar-card {
    min-width: 260px;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .nav-content {
    height: 52px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #eee;
    padding: 12px 24px;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a.lang {
    border: 1px solid #e0e0e0;
    text-align: center;
    margin-top: 8px;
    padding: 8px;
    border-radius: 6px;
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .post-card {
    padding: 16px 18px;
  }

  .post-card-title {
    font-size: 15px;
  }

  .single-post-title {
    font-size: 20px;
  }

  .post-content {
    padding: 20px;
    font-size: 14px;
  }

  .post-content h2 {
    font-size: 18px;
  }

  .post-content h3 {
    font-size: 15px;
  }

  .post-content pre {
    padding: 12px;
    font-size: 12px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item.next {
    text-align: left;
  }

  .error-404-code {
    font-size: 64px;
  }

  .sidebar {
    flex-direction: column;
  }

  .sidebar-card {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container,
  .content-with-sidebar {
    padding: 0 16px;
  }

  .site-main {
    padding: 20px 0;
  }

  .post-card {
    padding: 14px 16px;
  }
}
