/* ============================================================
   Poem About — Paper Skeuomorphic Theme
   ============================================================ */

/* --- Fonts --- */
@font-face {
  font-family: 'Cardo';
  src: url('/assets/fonts/cardo/cardo_normal_400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cardo';
  src: url('/assets/fonts/cardo/cardo_italic_400.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Cardo';
  src: url('/assets/fonts/cardo/cardo_normal_700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

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

/* --- Body & Desk --- */
body {
  font-family: 'Cardo', 'Georgia', serif;
  background: #d4c5a9;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139,119,86,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,119,86,0.1) 0%, transparent 50%);
  color: #2c2416;
  min-height: 100vh;
  line-height: 1.6;
}
.desk {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* ============================================================
   LETTERHEAD HEADER
   ============================================================ */
.letterhead {
  background: linear-gradient(175deg, #faf6ee 0%, #f5edd8 40%, #f0e6cc 100%);
  border: 1px solid #c9b896;
  border-radius: 2px;
  padding: 40px 50px 35px;
  margin-bottom: 24px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    0 8px 24px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
  position: relative;
  text-align: center;
}
.letterhead::before {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px solid rgba(180,160,120,0.25);
  border-radius: 1px;
  pointer-events: none;
}
.letterhead-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.site-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2c2416;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.tagline {
  display: block;
  font-style: italic;
  color: #7a6b52;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.flourish {
  display: block;
  margin: 16px auto 0;
  color: #b8a47a;
  font-size: 1.2rem;
  letter-spacing: 0.4em;
}

/* ============================================================
   NAV TABS
   ============================================================ */
.nav-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: -1px;
  padding: 0 10px;
  position: relative;
  z-index: 2;
  overflow-x: auto;
}
.nav-tab {
  background: linear-gradient(180deg, #f5edd8 0%, #efe4c8 100%);
  border: 1px solid #c9b896;
  border-bottom: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  padding: 10px 22px;
  font-family: 'Cardo', serif;
  font-size: 0.92rem;
  color: #5c4e38;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-tab:hover, .nav-tab.active {
  background: linear-gradient(180deg, #faf6ee 0%, #f5edd8 100%);
  color: #2c2416;
}
.nav-tab.active {
  border-bottom-color: #faf6ee;
  font-weight: 700;
}

/* ============================================================
   PAPER SHEET
   ============================================================ */
.paper {
  background: linear-gradient(180deg, #faf6ee 0%, #f7f0de 60%, #f3ebd2 100%);
  border: 1px solid #c9b896;
  border-radius: 0 2px 2px 2px;
  padding: 0;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    0 12px 36px rgba(0,0,0,0.08),
    3px 3px 0 -1px #f0e6cc,
    3px 3px 0 0 #c4ab82,
    6px 6px 0 -1px #ede3c8,
    6px 6px 0 0 #c4ab82;
  position: relative;
}
.paper::before {
  content: '';
  position: absolute;
  top: 0; left: 60px; bottom: 0;
  width: 1px;
  background: rgba(190,120,120,0.18);
  z-index: 1;
}
.single-paper {
  border-radius: 2px;
}

/* --- Paper Content --- */
.paper-content {
  padding: 40px 50px 40px 80px;
  background-image: repeating-linear-gradient(
    180deg,
    transparent, transparent 31px,
    rgba(160,140,110,0.12) 31px,
    rgba(160,140,110,0.12) 32px
  );
  background-position: 0 8px;
}

/* ============================================================
   SEARCH STRIP
   ============================================================ */
.search-strip {
  padding: 20px 50px 20px 80px;
  border-bottom: 1px solid rgba(180,160,120,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-label {
  font-size: 0.85rem;
  color: #7a6b52;
  font-style: italic;
  white-space: nowrap;
}
.search-input {
  flex: 1;
  border: 1px solid rgba(180,160,120,0.35);
  background: rgba(255,252,240,0.6);
  padding: 8px 14px;
  font-family: 'Cardo', serif;
  font-size: 0.95rem;
  color: #3d3122;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: #b8a47a;
  background: rgba(255,252,240,0.9);
}
.search-input::placeholder {
  color: #b8a888;
  font-style: italic;
}

/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */
.paper-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
}

/* --- Intro --- */
.intro {
  font-size: 1.08rem;
  color: #4a3f2f;
  margin-bottom: 30px;
  font-style: italic;
  padding: 16px 20px;
  border-left: 3px solid rgba(180,160,120,0.4);
  background: rgba(255,252,240,0.4);
}

/* --- Category Groups --- */
.category-group { margin-bottom: 32px; }
.category-group:last-child { margin-bottom: 0; }

.ink-stamp {
  display: inline-block;
  border: 2px solid rgba(120,80,40,0.3);
  border-radius: 3px;
  padding: 2px 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(120,80,40,0.5);
  transform: rotate(-2deg);
  margin-bottom: 14px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #3d3122;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(180,160,120,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .icon {
  font-size: 1.1rem;
  opacity: 0.6;
}

/* --- Post List --- */
.post-list { list-style: none; margin-bottom: 36px; }
.post-item {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(160,140,110,0.2);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.post-item:last-child { border-bottom: none; }
.post-bullet {
  color: #b8a47a;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.post-link {
  color: #3d3122;
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.5;
  transition: color 0.2s;
}
.post-link:hover {
  color: #8b5e3c;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139,94,60,0.4);
}
.post-category {
  font-size: 0.75rem;
  color: #a0916e;
  font-style: italic;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================================
   SIDEBAR — STICKY NOTES
   ============================================================ */
.sidebar {
  padding: 40px 30px 40px 0;
}
.sticky-note {
  background: linear-gradient(135deg, #fdf8e8 0%, #f8efc0 100%);
  border: 1px solid #ddd09a;
  border-radius: 2px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.06),
    inset 0 -2px 4px rgba(0,0,0,0.02);
  transform: rotate(-0.5deg);
  position: relative;
}
.sticky-note:nth-child(2) {
  background: linear-gradient(135deg, #eef5e8 0%, #ddeac8 100%);
  border-color: #b8c9a0;
  transform: rotate(0.7deg);
}
.sticky-note:nth-child(3) {
  background: linear-gradient(135deg, #e8ecf5 0%, #d0d8ea 100%);
  border-color: #a0aac4;
  transform: rotate(-0.3deg);
}
.sticky-note::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 12px;
  background: rgba(200,180,140,0.35);
  border-radius: 0 0 2px 2px;
}
.sticky-note h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a3f2f;
  margin-bottom: 10px;
}
.sticky-note ul { list-style: none; font-size: 0.85rem; }
.sticky-note li { padding: 3px 0; color: #5c4e38; }
.sticky-note li a { color: #5c4e38; text-decoration: none; }
.sticky-note li a:hover { color: #8b5e3c; text-decoration: underline; }

/* ============================================================
   SINGLE POST / PAGE
   ============================================================ */

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.85rem;
  color: #7a6b52;
  margin-bottom: 24px;
}
.breadcrumb a {
  color: #5c4e38;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep {
  margin: 0 6px;
  color: #b8a47a;
}

/* --- Post Header --- */
.post-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(180,160,120,0.3);
}
.post-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2c2416;
  line-height: 1.3;
  margin-bottom: 12px;
}
.post-meta {
  font-size: 0.88rem;
  color: #7a6b52;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.meta-sep { color: #b8a47a; }
.post-cat-badge {
  display: inline-block;
  background: rgba(180,160,120,0.15);
  border: 1px solid rgba(180,160,120,0.3);
  border-radius: 3px;
  padding: 1px 8px;
  font-size: 0.78rem;
  color: #5c4e38;
}

/* --- Post Body --- */
.post-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3d3122;
}
.post-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c2416;
  margin: 2rem 0 1rem;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(180,160,120,0.2);
}
.post-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3d3122;
  margin: 1.5rem 0 0.75rem;
}
.post-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4a3f2f;
  margin: 1.2rem 0 0.5rem;
}
.post-body p {
  margin-bottom: 1rem;
}
.post-body ul, .post-body ol {
  margin: 0 0 1rem 1.5rem;
}
.post-body li {
  margin-bottom: 0.4rem;
}
.post-body blockquote {
  border-left: 3px solid #b8a47a;
  margin: 1.5rem 0;
  padding: 12px 20px;
  background: rgba(255,252,240,0.5);
  font-style: italic;
  color: #4a3f2f;
}
.post-body a {
  color: #7a5230;
  text-decoration: underline;
  text-decoration-color: rgba(122,82,48,0.3);
  text-underline-offset: 2px;
}
.post-body a:hover {
  color: #5c3a1e;
  text-decoration-color: rgba(92,58,30,0.6);
}
.post-body pre {
  background: rgba(44,36,22,0.05);
  border: 1px solid rgba(180,160,120,0.25);
  border-radius: 3px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.post-body code {
  background: rgba(44,36,22,0.06);
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 0.9em;
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 1rem 0;
}
.post-body figure {
  margin: 1.5rem 0;
}
.post-body figcaption {
  font-size: 0.85rem;
  color: #7a6b52;
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.post-body th, .post-body td {
  border: 1px solid rgba(180,160,120,0.3);
  padding: 8px 12px;
  text-align: left;
}
.post-body th {
  background: rgba(180,160,120,0.1);
  font-weight: 700;
}

/* --- Post Navigation --- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid rgba(180,160,120,0.3);
}
.post-nav-link {
  text-decoration: none;
  color: #5c4e38;
  max-width: 45%;
  transition: color 0.2s;
}
.post-nav-link:hover { color: #8b5e3c; }
.post-nav-link.next { text-align: right; margin-left: auto; }
.nav-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0916e;
  margin-bottom: 4px;
}
.nav-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

/* --- Related Posts --- */
.related-posts {
  margin-top: 36px;
  padding: 20px 24px;
  background: rgba(255,252,240,0.5);
  border: 1px dashed rgba(180,160,120,0.3);
  border-radius: 3px;
}
.related-title {
  font-size: 1rem;
  font-weight: 700;
  color: #3d3122;
  margin-bottom: 12px;
}
.related-list {
  list-style: none;
}
.related-list li {
  padding: 4px 0;
}
.related-list a {
  color: #5c4e38;
  text-decoration: none;
  font-size: 0.95rem;
}
.related-list a:hover {
  color: #8b5e3c;
  text-decoration: underline;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found {
  text-align: center;
  padding: 40px 0;
}
.not-found-title {
  font-size: 5rem;
  font-weight: 700;
  color: rgba(180,160,120,0.4);
  margin-bottom: 16px;
  line-height: 1;
}
.not-found-text {
  font-size: 1.1rem;
  color: #5c4e38;
  margin-bottom: 12px;
}
.not-found-links {
  list-style: none;
  margin-top: 24px;
}
.not-found-links li {
  padding: 6px 0;
}
.not-found-links a {
  color: #7a5230;
  text-decoration: underline;
  text-decoration-color: rgba(122,82,48,0.3);
  font-size: 1.05rem;
}
.not-found-links a:hover {
  color: #5c3a1e;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-strip {
  background: linear-gradient(175deg, #f5edd8 0%, #efe4c8 100%);
  border: 1px solid #c9b896;
  border-radius: 2px;
  padding: 24px 40px;
  margin-top: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-align: center;
  font-size: 0.85rem;
  color: #7a6b52;
}
.footer-nav { margin-bottom: 8px; }
.footer-nav a {
  color: #5c4e38;
  text-decoration: none;
  margin: 0 12px;
}
.footer-nav a:hover { text-decoration: underline; }
.footer-copy {
  font-style: italic;
  color: #a0916e;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 800px) {
  .paper-with-sidebar { grid-template-columns: 1fr; }
  .sidebar {
    padding: 0 30px 30px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
  }
  .sticky-note { min-width: 200px; flex-shrink: 0; }
  .paper-content { padding: 30px 24px 30px 50px; }
  .paper::before { left: 34px; }
  .search-strip { padding: 16px 24px 16px 50px; }
  .letterhead { padding: 30px 24px 25px; }
  .site-title { font-size: 1.6rem; }
  .nav-tab { padding: 8px 14px; font-size: 0.82rem; }
  .post-category { display: none; }
  .post-title { font-size: 1.6rem; }
  .post-nav { flex-direction: column; gap: 16px; }
  .post-nav-link { max-width: 100%; }
  .post-nav-link.next { text-align: left; }
}

@media (max-width: 500px) {
  .desk { padding: 16px 10px 40px; }
  .paper-content { padding: 24px 16px 24px 40px; }
  .paper::before { left: 26px; }
  .search-strip { padding: 12px 16px 12px 40px; }
  .site-title { font-size: 1.35rem; }
  .post-title { font-size: 1.35rem; }
  .post-body { font-size: 1rem; }
  .post-body h2 { font-size: 1.3rem; }
}
