@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Kalam:wght@400;700&family=Special+Elite&family=Patrick+Hand&family=Indie+Flower&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #d4c9a8;
  font-family: 'Special Elite', cursive;
  min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
  background: #8B6914;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid #6b4f0e;
  flex-wrap: wrap;
  gap: 12px;
}

.site-title {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  font-weight: 700;
  color: #fff8e7;
  text-decoration: none;
  letter-spacing: 1px;
}

.site-tagline {
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  color: #fff3cc;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.site-nav a {
  background: #fff8e7;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: #5a3e00;
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
  display: inline-block;
}

.site-nav a:hover {
  background: #ffe082;
}

/* ── LAYOUT ── */
.main-layout {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 700px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── PAPER ── */
.paper-wrap {
  position: relative;
}

.tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 22px;
  background: rgba(255,230,100,0.55);
  border-radius: 2px;
  border: 1px solid rgba(200,180,80,0.4);
  z-index: 10;
}

.paper-page {
  background: #fdf8ed;
  border-radius: 2px;
  padding: 48px 52px 48px 80px;
  position: relative;
  border: 1px solid #c9b99a;
  min-height: 400px;
  overflow: hidden;
}

.paper-lines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(
    transparent, transparent 31px,
    #c5b8a0 31px, #c5b8a0 32px
  );
  background-position: 0 48px;
  pointer-events: none;
  opacity: 0.35;
}

.margin-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 68px;
  width: 1.5px;
  background: #e8a0a0;
  opacity: 0.6;
  pointer-events: none;
}

.paper-content { position: relative; z-index: 2; }

.day-badge {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  font-weight: 700;
  color: #8B6914;
  background: #fdf8ed;
  border: 1.5px solid #c9b99a;
  border-radius: 20px;
  padding: 3px 12px;
  display: inline-block;
  margin-bottom: 8px;
}

.paper-title {
  font-family: 'Kalam', cursive;
  font-size: 28px;
  font-weight: 700;
  color: #2c1a00;
  margin-bottom: 6px;
  line-height: 1.2;
}

.paper-meta {
  font-family: 'Patrick Hand', cursive;
  font-size: 15px;
  color: #7a5a20;
  margin-bottom: 20px;
  border-bottom: 1px dashed #c9b99a;
  padding-bottom: 10px;
}

.paper-content h2 {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  font-weight: 700;
  color: #5a3e00;
  margin: 24px 0 8px;
}

.paper-content h3 {
  font-family: 'Caveat', cursive;
  font-size: 17px;
  color: #7a5a00;
  margin: 16px 0 6px;
}

.paper-content p {
  font-family: 'Kalam', cursive;
  font-size: 15px;
  color: #2c1a00;
  line-height: 2.07;
  margin-bottom: 12px;
}

.paper-content ul, .paper-content ol {
  font-family: 'Kalam', cursive;
  font-size: 15px;
  color: #2c1a00;
  line-height: 2.0;
  margin: 10px 0 12px 20px;
}

.paper-content pre {
  background: #f0e8d0;
  border-left: 3px solid #8B6914;
  border-radius: 0 4px 4px 0;
  padding: 14px 16px;
  margin: 14px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.paper-content code {
  font-family: 'Courier New', monospace;
  background: #f0e8d0;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
  color: #3a2000;
}

.paper-content pre code {
  background: none;
  padding: 0;
  color: #1a3a1a;
}

.paper-content blockquote {
  border-left: 3px solid #8B6914;
  margin: 16px 0;
  padding: 8px 16px;
  font-family: 'Indie Flower', cursive;
  font-size: 17px;
  color: #5a3e00;
  background: #fdf0d0;
}

.tag-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed #c9b99a;
}

.tag {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px dashed;
  text-decoration: none;
}

.paper-footer {
  font-family: 'Indie Flower', cursive;
  font-size: 14px;
  color: #6b5030;
  text-align: center;
  padding: 8px 0 16px;
  letter-spacing: 0.5px;
}

/* ── SIDEBAR ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.sticky {
  position: relative;
  padding: 16px 14px 20px;
  border-radius: 2px;
  font-family: 'Caveat', cursive;
  font-size: 15px;
  line-height: 1.6;
}

.sticky::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e05050;
  border: 2px solid #c03030;
}

.sticky strong {
  font-weight: 700;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.sticky-yellow { background: #fff176; border: 1px solid #e6d800; color: #3a2e00; transform: rotate(-2deg); }
.sticky-green  { background: #c8e6c9; border: 1px solid #81c784; color: #1a3e1a; transform: rotate(1.5deg); }
.sticky-pink   { background: #f8bbd0; border: 1px solid #f06292; color: #3e001a; transform: rotate(-1deg); }
.sticky-blue   { background: #bbdefb; border: 1px solid #64b5f6; color: #0a2a4a; transform: rotate(2deg); }

.progress-card {
  background: #fdf8ed;
  border: 1px solid #c9b99a;
  border-radius: 4px;
  padding: 14px;
  transform: rotate(-1deg);
}

.progress-label {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #5a3e00;
  margin-bottom: 8px;
}

.progress-bar {
  background: #e0d5bc;
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
  border: 1px solid #c9b99a;
}

.progress-fill {
  height: 100%;
  background: #8B6914;
  border-radius: 20px;
  transition: width 0.5s ease;
}

.progress-count {
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  color: #6b4f00;
  margin-top: 4px;
  text-align: right;
  font-weight: 400;
}

/* ── HOME PAGE — POST CARDS ── */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background: #fdf8ed;
  border: 1px solid #c9b99a;
  border-radius: 2px;
  padding: 24px 28px 24px 60px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.15s ease;
}

.post-card:hover { transform: translateY(-2px); }

.post-card-lines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(
    transparent, transparent 27px,
    #c5b8a0 27px, #c5b8a0 28px
  );
  opacity: 0.25;
  pointer-events: none;
}

.post-card-margin {
  position: absolute;
  top: 0; bottom: 0;
  left: 48px;
  width: 1.5px;
  background: #e8a0a0;
  opacity: 0.5;
}

.post-card-content { position: relative; z-index: 2; }

.post-card-day {
  font-family: 'Caveat', cursive;
  font-size: 12px;
  font-weight: 700;
  color: #8B6914;
  border: 1.5px solid #c9b99a;
  border-radius: 20px;
  padding: 2px 10px;
  display: inline-block;
  margin-bottom: 6px;
}

.post-card-title {
  font-family: 'Kalam', cursive;
  font-size: 20px;
  font-weight: 700;
  color: #2c1a00;
  margin-bottom: 4px;
}

.post-card-meta {
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  color: #7a5a20;
  margin-bottom: 8px;
}

.post-card-excerpt {
  font-family: 'Kalam', cursive;
  font-size: 14px;
  color: #4a3a1a;
  line-height: 1.7;
}

/* ── ABOUT PAGE ── */
.about-intro {
  font-family: 'Kalam', cursive;
  font-size: 16px;
  color: #2c1a00;
  line-height: 2.0;
}

/* ── SYNTAX HIGHLIGHT ── */
.highlight .k  { color: #8B6914; font-weight: bold; }
.highlight .s  { color: #3a7a3a; }
.highlight .s2 { color: #3a7a3a; }
.highlight .c1 { color: #7a8a6a; font-style: italic; }
.highlight .mi { color: #2a5a9a; }
.highlight .n  { color: #2c1a00; }