@font-face {
  font-family: 'Scrawl';
  src: url('AckiPreschool-JW5B.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --max-width: 760px;
  --border: 1px solid #000;
}

/* madlibs */
.madlibs p {
  line-height: 2.2;
}

.blank {
  border-bottom: 1px solid #000;
  padding: 0 0.3rem;
  min-width: 6rem;
  display: inline-block;
  position: relative;
  overflow: visible;
}

.scrawl {
  font-family: 'Scrawl', cursive;
  font-size: 1.4rem;
  transform: rotate(-2deg);
  position: absolute;
  left: 0.3rem;
  bottom: -1.05em;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  line-height: 1.6;
}

.wrapper {
  position: relative;
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* masthead */
header {
  position: relative;
  border: var(--border);
  padding: 1.5rem;
  min-height: 8rem;
  margin-bottom: 0;
  background: url('atlantic-wreckfish.jpg') center / cover no-repeat;
}

/* white wash — tune opacity here */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
}

/* grain — tune baseFrequency (size) and opacity (intensity) */
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.15' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

header h1 {
  position: relative;
  margin: 0;
  font-weight: normal;
  font-size: 2rem;
  color: #000;
  -webkit-text-stroke: 2px white;
  paint-order: stroke fill;
}

/* nav */
nav {
  border: var(--border);
  padding: 0.4rem 1.5rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
}

nav .nav-links {
  display: flex;
  align-items: center;
}

nav .nav-links a {
  text-decoration: none;
  color: #000;
  padding: 0 0.75rem;
}

nav .nav-links a:not(:last-child) {
  border-right: 1px solid #000;
}

nav a:hover {
  text-decoration: underline;
}

nav .nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

nav .nav-right .fish-deco {
  padding: 0 0.75rem;
}

nav .nav-right .nav-separator {
  border-left: 1px solid #000;
  height: 1em;
}

nav .nav-right .clock {
  padding: 0 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* main container */
main {
  border: var(--border);
  padding: 1.5rem;
  margin-top: 1rem;
}

/* two-column mode */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* typography */
h2 {
  font-weight: normal;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.75rem 0;
}

h3 {
  font-weight: normal;
  font-size: 1.1rem;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem 0;
}

/* curio cabinet images */
.curio-img {
  float: right;
  margin: 0 0 0.75rem 1rem;
  border: var(--border);
  background: #fff;
  padding: 0.5rem;
  max-width: 280px;
}

.curio-img.full {
  float: none;
  max-width: 100%;
  margin: 0.75rem 0;
}

.curio-img img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.curio-img.full img {
  image-rendering: auto;
}

.curio-img.smooth img {
  image-rendering: auto;
}

/* featured curio with overlay */
.curio-hero {
  position: relative;
  border: var(--border);
  margin: 0.5rem 0;
}

.curio-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.curio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
}

.curio-overlay p {
  margin: 0 0 0.75rem 0;
  background: rgba(253, 246, 227, 0.95);
  padding: 0.25rem 0.5rem;
  display: inline;
  line-height: 1.8;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.curio-buttons {
  display: flex;
  gap: 0.5rem;
}

.curio-overlay .curio-buttons {
  margin-top: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: var(--border);
  background: #fff;
  color: #000;
  text-decoration: none;
  font-size: 0.85rem;
}

.btn:hover {
  background: #000;
  color: #fff;
}

/* clear float after each curio section */
main section::after {
  content: '';
  display: table;
  clear: both;
}

/* sections */
main section + section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: var(--border);
}

/* definition list (credits) */
dl {
  margin: 0;
}

dt {
  font-weight: bold;
}

dd {
  margin: 0 0 0.5rem 1rem;
}

dd:last-child {
  margin-bottom: 0;
}

/* contact list */
main ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

main ul li {
  margin-bottom: 0.3rem;
}

main ul li::before {
  content: '— ';
}

main a {
  color: #000;
}

/* blockquote */
blockquote {
  margin: 1rem 0 0 0;
  padding-left: 1rem;
  border-left: 2px solid #000;
  font-style: italic;
}

blockquote footer {
  display: inline;
  font-style: normal;
  font-size: 0.85rem;
  border: none;
  margin: 0;
  padding: 0;
}

/* status */
.status {
  font-family: monospace;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* factsheet */
.factsheet {
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  border: 1px solid #000;
  padding: 1.25rem;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  background: #fafafa;
}

/* bookshelf */
.control-bar {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.control-label {
  font-style: italic;
  margin-right: 0.25rem;
}

.control-button {
  font-family: "Times New Roman", Times, serif;
  font-size: 0.85rem;
  background: none;
  border: var(--border);
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  margin-right: 0.25rem;
}

.control-button:hover {
  background: #000;
  color: #fff;
}

.control-button.active {
  background: #000;
  color: #fff;
}

.book-section {
  margin-top: 1.25rem;
}

.book-section h3 {
  font-weight: normal;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem 0;
  border-bottom: var(--border);
  padding-bottom: 0.25rem;
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-list li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.book-list li::before {
  content: '— ';
}

.book-title {
  font-style: italic;
}

.book-author {
  font-size: 0.9rem;
}

.stats {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: var(--border);
  font-size: 0.85rem;
}

/* footer */
footer {
  margin-top: 2rem;
  border-top: var(--border);
  padding-top: 1rem;
  font-size: 0.9rem;
}

/* blog — post list */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  margin-bottom: 0.5rem;
}

.post-list li::before {
  content: '— ';
}

.post-date {
  font-size: 0.8rem;
  color: #555;
  font-style: italic;
}

/* blog — rendered post content */
.post-content h1 {
  font-weight: normal;
  font-size: 1.6rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.post-content h1 + p {
  font-size: 0.85rem;
  font-style: italic;
  color: #555;
  margin-top: 0;
}

.post-content h2 {
  font-weight: normal;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 2rem 0 0.75rem 0;
  border-bottom: var(--border);
  padding-bottom: 0.25rem;
}

.post-content h3 {
  font-weight: normal;
  font-size: 1rem;
  font-style: italic;
  margin: 1.5rem 0 0.5rem 0;
}

.post-content p {
  margin: 0.75rem 0;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border: var(--border);
}

.post-content a {
  color: #000;
}

.post-content ul,
.post-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.post-content ul {
  list-style: none;
  padding: 0;
}

.post-content ul li::before {
  content: '— ';
}

/* task list styling for checklist-style posts */
.post-content ul li:has(input[type="checkbox"])::before {
  content: '';
}

.post-content input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0 0.5rem 0 0;
  border: 1px solid #000;
  background: #fff;
  vertical-align: -0.1rem;
  cursor: pointer;
}

.post-content input[type="checkbox"]:checked {
  background: #000;
  box-shadow: inset 0 0 0 2px #fff;
}

.post-content input[type="checkbox"]:focus-visible {
  outline: 1px solid #000;
  outline-offset: 1px;
}

.post-content ul li {
  margin-bottom: 0.3rem;
}

.post-content ol {
  list-style: decimal;
}

.post-content ol li {
  margin-bottom: 0.3rem;
}

.post-content hr {
  border: none;
  border-top: var(--border);
  margin: 2rem 0;
}

.post-content pre {
  border: var(--border);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #fafafa;
}

.post-content code {
  font-family: monospace;
  font-size: 0.9em;
}

.post-content p code,
.post-content li code {
  border: 1px solid #ddd;
  padding: 0.1rem 0.3rem;
  background: #fafafa;
}

.post-content blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 2px solid #000;
  font-style: italic;
}

.post-content strong {
  font-weight: bold;
}

.post-content em {
  font-style: italic;
}

/* responsive */
@media (max-width: 700px) {
  .wrapper {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
  }

  nav .nav-links {
    flex-wrap: wrap;
  }

  nav .nav-right {
    display: none;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .curio-img {
    float: none;
    max-width: 100%;
    margin: 0.75rem 0;
  }

  .post-content pre {
    font-size: 0.75rem;
    padding: 0.75rem;
  }
}

/* print */
@media print {
  nav, footer, .clock, .fish-deco, .nav-separator {
    display: none;
  }

  .wrapper {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  header {
    background-image: none;
    border: none;
    padding: 0 0 1rem 0;
    min-height: auto;
  }

  header::before,
  header::after {
    display: none;
  }

  main {
    border: none;
    padding: 0;
    margin-top: 1rem;
  }

  main section + section {
    border-top: 1px solid #ccc;
  }

  a {
    text-decoration: none;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8rem;
    color: #555;
  }
}
