/* Direction 1 — "The Card Catalog"
   Cream paper, serif body, typewriter accents. Table of contents = catalog cards. */

.dir-cardcatalog {
  --paper: #ede6f8;
  --paper-2: #e0d4f0;
  --ink: #1d1a22;
  --ink-soft: #625a6e;
  --rule: #c4bad0;
  --accent: oklch(0.52 0.14 45); /* warm terracotta */
  --accent-soft: oklch(0.62 0.09 45);
  --stamp: oklch(0.48 0.16 25);

  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(90,70,120,0.07) 0, transparent 40%),
    radial-gradient(circle at 78% 82%, rgba(60,40,90,0.09) 0, transparent 45%);
}
.dir-cardcatalog .mono { font-family: "JetBrains Mono","IBM Plex Mono",ui-monospace,Menlo,monospace; }

.dir-cardcatalog .page {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 40px 140px;
}

/* masthead */
.cc-mast {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 44px;
}
.cc-mast-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cc-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 2px solid var(--rule);
}
.cc-mast h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 52px;
  font-weight: 500;
  font-style: italic;
  margin: 0;
  letter-spacing: -0.01em;
}
.cc-mast .cc-logo {
  display: block;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.cc-mast .cc-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cc-mast .cc-logo:hover { transform: rotate(-4deg) scale(1.05); }
.cc-mast .cc-stamp {
  border: 1.5px solid var(--stamp);
  color: var(--stamp);
  padding: 6px 12px 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  text-align: center;
  line-height: 1.25;
  opacity: 0.85;
}

/* intro block */
.cc-intro {
  font-size: 26px;
  line-height: 1.35;
  max-width: 640px;
  margin: 0 0 52px;
  font-weight: 400;
}
.cc-intro em { font-style: italic; color: var(--accent); }
.cc-intro a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cc-intro a:hover { color: var(--stamp); }
.cc-intro a em { color: inherit; }

/* texture break images between sections */
.cc-texture-break {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin: -24px 0 72px;
  background-color: var(--paper-2);
  border-radius: 2px;
}
.cc-texture-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* full-size image at bottom — shows the whole image, no cropping */
.cc-texture-full {
  width: 100%;
  margin: 64px 0 0;
  border-radius: 2px;
  overflow: hidden;
}
.cc-texture-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* Table of contents — styled as catalog cards */
.cc-toc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 64px;
}
.cc-card {
  background: #f6f0fa;
  border: 1px solid var(--rule);
  padding: 10px 18px 16px;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 28px, rgba(90,70,120,0.08) 28px 29px);
  background-position: 0 30px;
}
.cc-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.06);
}
.cc-card:hover .cc-num { color: var(--accent); }
.cc-card .cc-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}
.cc-card .cc-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.cc-card .cc-gloss {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  font-style: italic;
}
.cc-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule);
}

/* Sections */
.cc-section { margin-bottom: 72px; scroll-margin-top: 80px; }
.cc-section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 26px;
}
.cc-section-header .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.cc-section-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  font-weight: 500;
  font-style: italic;
  margin: 0;
  letter-spacing: -0.01em;
}
.cc-section p { margin: 0 0 1em; }
.cc-section a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.cc-section a:hover { color: var(--stamp); }

/* project / win / journey entries */
.cc-entry {
  margin: 0 0 32px;
  padding: 0 0 0 0;
  position: relative;
}
.cc-entry h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
}
.cc-entry .cc-kind {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
  display: block;
}
.cc-entry ul { margin: 8px 0 0; padding: 0; list-style: none; }
.cc-entry ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.cc-entry ul li::before {
  content: "§";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-soft);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
}
.cc-entry .cc-linkrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  margin-top: 8px;
  color: var(--ink-soft);
}
.cc-entry .cc-linkrow a { margin-right: 14px; }

/* bookshelf */
.cc-books { display: grid; gap: 22px; }
.cc-book {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px dotted var(--rule);
}
.cc-book:last-child { border-bottom: 0; }
.cc-book .cc-btitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.25;
}
.cc-book .cc-bauthor {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}
.cc-book .cc-bnote { font-size: 16px; line-height: 1.5; }

/* elsewhere */
.cc-elsewhere { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.cc-elsewhere a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.cc-elsewhere a:hover { color: var(--accent); }
.cc-elsewhere a .kind {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* now list */
.cc-now {
  list-style: none; padding: 0; margin: 0;
  counter-reset: now;
}
.cc-now li {
  counter-increment: now;
  padding: 12px 0 12px 48px;
  border-bottom: 1px dotted var(--rule);
  position: relative;
  font-size: 18px;
}
.cc-now li::before {
  content: counter(now, decimal-leading-zero);
  position: absolute; left: 0; top: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
}

/* footer */
.cc-foot {
  margin-top: 96px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

/* fern easter egg */
.cc-fern {
  position: fixed;
  right: 24px; bottom: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ink-soft);
  opacity: 0.35;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  transition: opacity 0.3s;
}
.cc-fern:hover { opacity: 1; color: var(--accent); }

@media (max-width: 680px) {
  .dir-cardcatalog .page { padding: 48px 22px 100px; }
  .cc-mast h1 { font-size: 40px; }
  .cc-intro { font-size: 20px; }
  .cc-toc { grid-template-columns: 1fr; }
  .cc-elsewhere { grid-template-columns: 1fr; }
  .cc-book { grid-template-columns: 1fr; gap: 6px; }
  .cc-section-header h2 { font-size: 32px; }
  .cc-headshot { width: 60px; height: 60px; }
  .cc-texture-break { height: 140px; }
}

/* ---------- Card Catalog Fermentation ---------- */
.cc-ferment {
  margin: 0 0 36px;
  padding: 14px 16px 14px;
  border: 1px solid var(--rule);
  background: #f6f0fa;
  box-sizing: border-box;
}
.cc-ferment-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px; gap: 12px; flex-wrap: wrap;
}
.cc-ferment-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
}
.cc-ferment-title em { color: var(--accent); font-style: italic; }
.cc-ferment-tick {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cc-ferment-canvas {
  display: block !important;
  width: 100% !important;
  height: 215px !important;
  min-height: 215px !important;
  image-rendering: pixelated;
  border: 1px dotted var(--rule);
  background: #f6f0fa;
  cursor: crosshair;
}
.cc-ferment-ctrl {
  display: flex; gap: 10px; align-items: center; margin-top: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.cc-ferment-ctrl button {
  font: inherit;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cc-ferment-ctrl button:hover { background: var(--accent); color: var(--paper); }
.cc-ferment-ctrl span { font-style: italic; }
