/* ===========================
   Fonts - Paperlogy (9 weights)
   =========================== */
@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-1Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-2ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-3Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-4Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-5Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-6SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-7Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-8ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('../fonts/Paperlogy-9Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Paperlogy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
}

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

a:hover {
  color: #000000;
}

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid #e5e5e5;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #000;
  text-decoration: underline;
}

/* ===========================
   Container
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ===========================
   Footer
   =========================== */
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.footer a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.8;
}

/* ===========================
   Page Layout (page.html)
   =========================== */
.page-header {
  background: #333;
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  margin-top: 60px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.8;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-content h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: #333;
}

.page-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
  color: #333;
}

.page-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  margin: 1rem 0 1rem 2rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: #333;
  text-decoration: underline;
}

.page-content code {
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.page-content pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.page-content pre code {
  background: none;
  padding: 0;
}

.page-content blockquote {
  border-left: 4px solid #333;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
}

.page-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.page-content th, .page-content td {
  border: 1px solid #ddd;
  padding: 0.8rem;
  text-align: left;
}

.page-content th {
  background: #f5f5f5;
}

/* ===========================
   Post Layout (post.html)
   =========================== */
.post-header {
  background: #333;
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  margin-top: 60px;
}

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.post-meta {
  opacity: 0.8;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.post-content h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: #333;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
  color: #333;
}

.post-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.post-content ul, .post-content ol {
  margin: 1rem 0 1rem 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: #333;
  text-decoration: underline;
}

.post-content code {
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 4px solid #333;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.post-content th, .post-content td {
  border: 1px solid #ddd;
  padding: 0.8rem;
  text-align: left;
}

.post-content th {
  background: #f5f5f5;
}

.post-tags {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.post-tags span {
  background: #f5f5f5;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.post-navigation {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
}

.post-navigation a {
  color: #333;
  text-decoration: underline;
}

/* ===========================
   Related Posts
   =========================== */
.related-posts {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.related-posts h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.related-posts ul {
  list-style: none;
}

.related-posts li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.related-posts li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.related-posts a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.related-posts a:hover {
  opacity: 0.7;
}

.related-post-date {
  font-size: 0.85rem;
  color: #888;
}

.related-post-title {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .container {
    padding: 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-content {
    padding: 2rem 1rem;
  }

  .post-header h1 {
    font-size: 2rem;
  }

  .post-content {
    padding: 2rem 1rem;
  }

  .post-tags, .post-navigation {
    padding: 0 1rem;
  }

  .related-posts {
    padding: 1.5rem;
  }
}
