/* Bia's mom's journal: one narrow column of lined diary paper with a blush margin line.
   Products are photos held on with washi tape, dates are rubber stamps, and mom's own
   notes are in handwriting. */
:root {
  --paper: #fbf6ee;
  --rule: #eadfcf;
  --margin: #efc7c2;
  --ink: #3a2f2a;
  --ink-soft: #6b5d55;
  --sage: #7e9c84;
  --sage-deep: #4f6b57;
  --blush: #efc7c2;
  --rose: #a8505f;
  --tape: rgba(239, 199, 194, 0.72);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Nunito', system-ui, sans-serif;
  --hand: 'Patrick Hand', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
body.bia {
  margin: 0;
  color: var(--ink);
  background: #efe6d8;
  font: 400 1.05rem/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--sage); text-underline-offset: 4px; }
:focus-visible { outline: 2px dashed var(--rose); outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }

/* The page itself: ruled lines every 1.75rem and a margin line on the left. */
.paper {
  width: min(760px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 54px, var(--margin) 54px, var(--margin) 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 calc(1.75rem - 1px), var(--rule) calc(1.75rem - 1px) 1.75rem);
  box-shadow: 0 0 0 1px #e4d8c6, 0 30px 60px -30px rgba(58, 47, 42, 0.35);
  padding: 0 28px 0 76px;
}

/* ---------- cover ---------- */
.cover { padding: 44px 0 28px; display: grid; grid-template-columns: 1fr 230px; gap: 24px; align-items: center; }
.cover .portrait {
  grid-column: 2; grid-row: 1;
  width: 230px;
  border-radius: 50% 50% 46% 54% / 55% 52% 48% 45%;
  border: 6px solid #fff;
  box-shadow: 0 6px 18px -8px rgba(58, 47, 42, 0.45);
  transform: rotate(2deg);
}
.cover-text { grid-column: 1; grid-row: 1; }
.eyebrow { margin: 0; font: 400 1.25rem/1.4 var(--hand); color: var(--rose); }
.cover h1 {
  margin: 4px 0 8px;
  font: 600 clamp(2.4rem, 6.5vw, 3.6rem)/1.02 var(--display);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  letter-spacing: -0.015em;
}
.tagline {
  display: inline-block;
  margin: 0 0 12px;
  font: 500 1.2rem/1.4 var(--display);
  padding-bottom: 8px;
  background: url(/_t/bia/squiggle.svg) left bottom / 100% 10px no-repeat;
}
.letter { margin: 0 0 12px; max-width: 46ch; color: var(--ink-soft); }
.follow { margin: 0; font-weight: 700; font-size: 0.95rem; }
.follow a { color: var(--sage-deep); }

/* ---------- headings ---------- */
main h2, .journal h1, .lost h1 {
  font: 600 1.75rem/1.2 var(--display);
  font-variation-settings: 'SOFT' 100;
  margin: 0 0 0.9rem;
  padding-left: 40px;
  background: url(/_t/bia/sprig.svg) left center / 30px no-repeat;
}
section { margin: 2.2rem 0 3rem; }

/* ---------- diary entries (posts) ---------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entry a { display: grid; grid-template-columns: 96px 1fr; column-gap: 18px; padding: 14px 0; text-decoration: none; border-bottom: 1px dashed #d8c9b4; }
.entry time {
  grid-row: span 2;
  align-self: start;
  justify-self: start;
  font: 700 0.68rem/1.25 var(--body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rose);
  border: 2px solid var(--rose);
  outline: 1px solid var(--rose);
  outline-offset: 2px;
  border-radius: 4px;
  padding: 6px 7px;
  text-align: center;
  transform: rotate(-4deg);
  opacity: 0.85;
}
.entry-title { font: 600 1.3rem/1.3 var(--display); }
.entry a:hover .entry-title { text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 2px; }
.entry-sum { color: var(--ink-soft); }
.more { font: 400 1.25rem/1.4 var(--hand); }
.more a { color: var(--rose); }

/* ---------- notebooks (products): taped photos ---------- */
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.note a { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: start; text-decoration: none; }
.note img, .note .noimg {
  position: relative;
  width: 150px; aspect-ratio: 1; object-fit: cover;
  background: #fff url(/_t/bia/sprig.svg) center / 40% no-repeat;
  border: 7px solid #fff;
  box-shadow: 0 5px 12px -6px rgba(58, 47, 42, 0.5);
  transform: rotate(-2.5deg);
}
.note:nth-child(even) img, .note:nth-child(even) .noimg { transform: rotate(2deg); }
/* The washi tape sits on the photo's top edge. */
.note a { position: relative; }
.note a::before {
  content: '';
  position: absolute; top: -8px; left: 44px; z-index: 1;
  width: 64px; height: 20px;
  background: var(--tape);
  transform: rotate(-6deg);
  box-shadow: 0 1px 2px rgba(58, 47, 42, 0.12);
}
.note:nth-child(even) a::before { background: rgba(126, 156, 132, 0.55); transform: rotate(5deg); left: 52px; }
.note-body { display: grid; gap: 4px; padding-top: 6px; }
.note-title { font: 600 1.18rem/1.35 var(--display); }
.why { font: 400 1.22rem/1.4 var(--hand); color: var(--sage-deep); }
.why em { font-style: normal; color: var(--rose); }
.note-go { justify-self: start; font-weight: 700; font-size: 0.9rem; color: var(--sage-deep); text-decoration: underline; text-decoration-color: var(--blush); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.note a:hover .note-go { text-decoration-color: var(--sage); }

/* ---------- the notebook's sections: tabs down the page edge ---------- */
.tab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tab-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  text-decoration: none; padding: 12px 18px; background: #fff;
  border-left: 8px solid var(--blush); border-radius: 0 10px 10px 0;
  box-shadow: 0 4px 10px -8px rgba(58, 47, 42, 0.5);
}
.tab-list li:nth-child(2n) a { border-left-color: var(--sage); }
.tab-list a:hover .tab-label { text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tab-label { font: 600 1.25rem/1.3 var(--display); }
.tab-count { font: 400 1.15rem/1 var(--hand); color: var(--rose); white-space: nowrap; }
.badge { justify-self: start; font: 400 1.05rem/1 var(--hand); color: #fff; background: var(--sage); border-radius: 3px; padding: 3px 8px 2px; transform: rotate(-2deg); }

/* ---------- sổ đồ: filters as notebook index tabs ---------- */
.catalog h1 { font: 600 2.2rem/1.15 var(--display); font-variation-settings: 'SOFT' 100; margin: 1.6rem 0 1rem; padding: 0; background: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; }
.chips a { font: 400 1.18rem/1.4 var(--hand); color: var(--ink-soft); text-decoration: none; padding: 0 2px; }
.chips a span { color: var(--rose); font-size: 0.95rem; }
.chips a:hover { color: var(--ink); }
.chips a[aria-current="page"] { color: var(--ink); background: url(/_t/bia/squiggle.svg) left bottom / 100% 7px no-repeat; }
.chips + .chips { padding-bottom: 14px; border-bottom: 1px dashed #d8c9b4; }
.catalog .notes { margin-top: 26px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 2rem 0 1rem; font: 400 1.25rem/1 var(--hand); }
.pager a { color: var(--rose); }
.masthead nav { display: flex; gap: 16px; }

/* ---------- inner pages ---------- */
.masthead { display: flex; justify-content: space-between; align-items: baseline; padding: 26px 0 8px; border-bottom: 1px solid #d8c9b4; }
.masthead > a { font: 600 1.4rem/1.2 var(--display); text-decoration: none; }
.masthead nav a { font: 400 1.25rem/1 var(--hand); color: var(--rose); }
.page h1 { margin-top: 1.6rem; font-size: 2.2rem; }
.empty { font: 400 1.3rem/1.5 var(--hand); color: var(--ink-soft); }

.diary { padding-top: 1.75rem; }
.diary header time { font: 400 1.2rem/1.4 var(--hand); color: var(--rose); }
.diary h1 { font: 600 clamp(2rem, 5.5vw, 2.9rem)/1.1 var(--display); font-variation-settings: 'SOFT' 100; margin: 4px 0 10px; }
.diary .lede { font: 500 1.2rem/1.6 var(--display); color: var(--ink-soft); margin: 0 0 1.75rem; }
.prose { font-size: 1.08rem; }
.prose p { margin: 0 0 1.75rem; }
.prose h2, .prose h3 { font: 600 1.45rem/1.2 var(--display); margin: 2.2rem 0 0.6rem; padding: 0; background: none; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.75rem; }
.prose li::marker { color: var(--sage); }
.prose strong { background: linear-gradient(transparent 62%, rgba(239, 199, 194, 0.8) 62%); }
.weigh { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 2rem 0 0; }
.weigh section { margin: 0; padding: 16px 18px; background: #fff; border-radius: 3px; box-shadow: 0 4px 12px -8px rgba(58, 47, 42, 0.45); }
.weigh .liked { transform: rotate(-0.8deg); border-top: 5px solid var(--sage); }
.weigh .consider { transform: rotate(0.8deg); border-top: 5px solid var(--blush); }
.weigh h2 { font: 400 1.35rem/1.2 var(--hand); padding: 0; background: none; margin: 0 0 6px; }
.weigh .liked h2 { color: var(--sage-deep); }
.weigh .consider h2 { color: var(--rose); }
.weigh ul { margin: 0; padding-left: 1.1em; }

.lost { padding: 3rem 0; }
.lost p { font: 400 1.3rem/1.4 var(--hand); }

/* ---------- colophon ---------- */
.colophon { border-top: 1px solid #d8c9b4; padding: 20px 0 44px; margin-top: 2rem; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.6; }
.colophon p { margin: 0 0 6px; }
.colophon a { color: var(--ink); font-weight: 700; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .paper {
    padding: 0 18px 0 40px;
    background-image:
      linear-gradient(90deg, transparent 26px, var(--margin) 26px, var(--margin) 28px, transparent 28px),
      repeating-linear-gradient(transparent 0 calc(1.75rem - 1px), var(--rule) calc(1.75rem - 1px) 1.75rem);
  }
  .cover { grid-template-columns: 1fr; padding-top: 28px; }
  .cover .portrait { grid-column: 1; grid-row: 1; width: 190px; justify-self: center; }
  .cover-text { grid-row: 2; }
  .note a { grid-template-columns: 108px 1fr; gap: 16px; }
  .note img, .note .noimg { width: 108px; }
  .note a::before { left: 26px; width: 54px; }
  .entry a { grid-template-columns: 1fr; }
  .entry time { grid-row: auto; margin-bottom: 6px; }
  .weigh { grid-template-columns: 1fr; }
}
