/* --- Global Reset & Background --- */
html { scroll-behavior: smooth; }
body {
  background-color: #f9f7f2; 
  background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
  margin: 0;
  padding: 0;
  color: #1a1a1a;
}

/* --- Sticky Header --- */
header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f9f7f2;
  background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Header Link Reset */
.header-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.header-link:hover h1 {
  opacity: 0.8;
}

h1 {
  font-family: "Kufam", sans-serif;
  text-align: center;
  padding: 10px 10px 5px 10px;
  font-size: clamp(24px, 8vw, 60px);
  margin: 0;
}

.header-subtitle {
  text-align: center;
  font-family: "Kufam", sans-serif;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* --- Layout Grid (ADAPTIVE 2-COLUMN) --- */
.page-wrapper {
  display: grid;
  grid-template-columns: 100px 1fr; 
  max-width: 1200px;
  margin: auto;
  gap: 10px;
  padding: 20px 5px;
  align-items: flex-start;
}

@media only screen and (min-width: 600px) {
  .page-wrapper {
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding: 20px;
  }
}

/* --- Sticky Sidebar Container --- */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: -webkit-sticky;
  position: sticky;
  /* top: header height + small gap */
  top: 130px; 
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-container::-webkit-scrollbar {
  display: none;
}

/* --- Sidebar Box Styling --- */
.sidebar-box {
  background-color: #b5b3a1; 
  background-image: url("https://www.transparenttextures.com/patterns/notebook.png");
  padding: 30px 10px 15px 10px;
  font-family: 'Special Elite', cursive;
  box-shadow: 3px 5px 15px rgba(0,0,0,0.08);
  position: relative;
  clip-path: polygon(
    0% -5%, 100% -5%, 100% 97%, 
    95% 98.5%, 88% 96.5%, 80% 99%, 72% 97.2%, 64% 98.8%, 55% 96.8%, 
    48% 99.2%, 40% 97.5%, 32% 98.6%, 25% 96.5%, 15% 99%, 8% 97.2%, 0% 98.5%
  );
}

@media only screen and (min-width: 600px) {
  .sidebar-box { padding: 45px 20px 30px 20px; }
}

.sidebar-box:nth-child(odd) { transform: rotate(-1.5deg); }
.sidebar-box:nth-child(even) { transform: rotate(1.2deg); margin-left: 5px; }

/* --- Main Content Container --- */
.content-container {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* --- Story Post Styling --- */
.story-a, .story-b {
  background-color: #b5b3a1; 
  background-image: url("https://www.transparenttextures.com/patterns/notebook.png");
  padding: 35px 15px 25px 15px;
  margin-bottom: 30px;
  box-shadow: 5px 10px 25px rgba(0,0,0,0.1);
  position: relative; 
  border: none;
  clip-path: polygon(
    0% -2%, 100% -2%, 100% 99.4%, 
    94% 99.7%, 85% 99.2%, 78% 99.8%, 68% 99.3%, 60% 99.6%, 52% 99.2%, 
    45% 99.8%, 38% 99.4%, 30% 99.7%, 22% 99.2%, 15% 99.6%, 8% 99.3%, 0% 99.6%
  );
}

@media only screen and (min-width: 600px) {
  .story-a, .story-b { padding: 60px 45px 45px 45px; margin-bottom: 60px; }
}

.story-a { transform: rotate(0.2deg); }
.story-b { transform: rotate(-0.3deg); }

/* --- Shared Spiral Punch Holes --- */
.sidebar-box::before, .story-a::before, .story-b::before {
  content: "";
  position: absolute;
  top: 10px; 
  left: 0; 
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle, #f9f7f2 4px, transparent 5px);
  background-size: 25px 25px;
  background-position: center;
  background-repeat: repeat-x;
  pointer-events: none;
  z-index: 10;
}

/* --- Typography --- */
.sidebar-box h4 {
  font-family: "Kufam", sans-serif;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  margin: 0 0 10px 0;
  padding-bottom: 5px;
  font-size: 11px;
}

@media only screen and (min-width: 600px) {
  .sidebar-box h4 { font-size: 13px; }
}

.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box li { margin-bottom: 8px; font-size: 10px; line-height: 1.2; }
@media only screen and (min-width: 600px) { .sidebar-box li { font-size: 12px; } }

.sidebar-box a { color: #000; text-decoration: none; }

.story-headline h3 {
  font-family: "Kufam", sans-serif;
  font-size: clamp(18px, 6vw, 40px);
  margin: 0 0 10px 0;
  text-transform: uppercase;
  line-height: 1.1;
}

.story-metadata {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(0,0,0,0.2);
  margin-bottom: 15px;
  padding-bottom: 8px;
  display: flex; 
  flex-wrap: wrap;
  gap: 8px;
}

.story-copy p {
  font-family: 'Special Elite', cursive;
  line-height: 1.5;
  margin: 0 0 15px 0;
  text-align: left;
  font-size: 14px;
}

@media only screen and (min-width: 600px) {
  .story-copy p { font-size: 18px; text-align: justify; }
}

.story-copy h2 {
  font-family: "Kufam", sans-serif;
  font-size: 18px;
  margin: 20px 0 10px 0;
  text-transform: uppercase;
}

.story-bullets {
  margin: 0 0 20px 20px;
  padding: 0;
  font-family: 'Special Elite', cursive;
}

.story-bullets li {
  margin-bottom: 5px;
  list-style-type: square;
  font-size: 14px;
}

.story-image {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  mix-blend-mode: multiply;
  filter: sepia(0.2) contrast(1.1);
}

footer {
  text-align: center;
  padding: 30px 0;
  font-family: 'Special Elite', cursive;
  font-size: 11px;
  opacity: 0.6;
}