/* ============================================================
   CRABINET OF CURIOSITIES — standalone stylesheet
   ============================================================ */

/*I know I said steal everything but this style sheet is, frankly, a complete and utter mess and I encourage you to look elsewhere, otherwise you're gonna infest your own site with the same rats I keep finding in here.*/

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  --bg:           #0a0800;
  --bg2:          #0f0d08;
  --bg3:          #141008;
  --text:         #e8dfc0;
  --text-dim:     rgba(232, 223, 192, 0.45);
  --text-faint:   rgba(232, 223, 192, 0.2);
  --red:          #b51200;
  --red-dim:      rgba(181, 18, 0, 0.3);
  --red-glow:     rgba(181, 18, 0, 0.07);
  --border:       rgba(181, 18, 0, 0.18);
  --border-mid:   rgba(181, 18, 0, 0.35);
  --border-bright:rgba(181, 18, 0, 0.6);
  --mono:         'Share Tech Mono', monospace;
  --serif:        'IM Fell English', serif;
}

/* -- RESET & BASE -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.018),
      rgba(255,255,255,0.018) 1px,
      transparent 1px,
      transparent 9px
    );
  color: var(--text);
  min-height: 100vh;
  padding: 0 1rem 5rem;
  line-height: 1.6;
}

a {
  color: var(--red);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.12s;
}
a:hover { color: var(--text); text-decoration: underline; }

/* -- LAYOUT -- */
.container {
  max-width: 860px;
  margin: 0 auto;
}

/* -- SITE NAV -- */
.site-nav {
  border-bottom: 1px solid var(--border-bright);
  padding: 1rem 0 0.75rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav .nav-title {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
}
.site-nav .nav-title:hover { color: var(--text); text-decoration: none; }

.site-nav .nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
}

.site-nav .nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: normal;
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active { color: var(--red); text-decoration: none; }

.site-nav .nav-back {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-left: auto;
  letter-spacing: 0.03em;
}
.site-nav .nav-back:hover { color: var(--text-dim); text-decoration: none; }

/* -- PAGE HEADER -- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--mono);
  color: var(--red);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.page-header .subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* -- TYPOGRAPHY -- */
h2 {
  font-family: var(--mono);
  color: var(--red);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.5rem;
}

p {
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;

}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* -- BUTTONS -- */
.btn {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.04em;
  display: inline-block;
  text-decoration: none;
}
.btn:hover { color: var(--text); border-color: var(--text); text-decoration: none; }
.btn.red { border-color: var(--red-dim); color: var(--red); }
.btn.red:hover { border-color: var(--red); background: var(--red-glow); color: var(--red); }

/* -- TAGS -- */
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-block;
}
.tag:hover, .tag.active { color: var(--red); border-color: var(--red-dim); }

/* -- STAT BLOCKS (landing) -- */
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-value {
  font-family: var(--mono);
  color: var(--red);
  font-size: 1.5rem;
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -- FEATURED ENTRIES (landing) -- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  margin: 1rem 0 2rem;
  border: 1px solid var(--border);
}

.featured-card {
  background: var(--bg2);
  padding: 1rem 1.1rem;
  border: none;
  transition: background 0.12s;
  text-decoration: none;
  display: block;
}
.featured-card:hover { background: var(--bg3); text-decoration: none; }

.featured-card .card-blog {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.2rem;
}

.featured-card .card-author {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.featured-card .card-note {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- CHANGELOG (changelog) -- */
.changelog-entry {
  padding: 1rem 0 1rem 1.25rem;
  border-left: 2px solid var(--border);
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.changelog-entry:first-child { border-top: 1px solid var(--border); }
.changelog-entry:hover { border-left-color: var(--red-dim); }

.changelog-date {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.changelog-note {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

.changelog-items {
  list-style: none;
  margin-top: 0.4rem;
}
.changelog-items li {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.15rem 0;
}
.changelog-items li::before {
  content: '+ ';
  color: var(--red);
}

/* -- ARCHIVE CONTROLS -- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

#search {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  outline: none;
  flex: 0 0 230px;
}
#search::placeholder { color: var(--text-dim); }
#search:focus { border-color: var(--text); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
}

.tag-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.18rem 0.5rem;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.03em;
}
.tag-btn:hover { border-color: var(--red-dim); color: var(--text); }
.tag-btn.active { border-color: var(--red); color: var(--red); background: var(--red-glow); }

.status-bar {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* -- RANDOM DRAWER -- */
#randomDrawer {
  display: none;
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
#randomDrawer.open { display: block; }

.drawer-header {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.random-post {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.random-post:last-child { border-bottom: none; }

.random-post-link {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text);
}
.random-post-link:hover { color: var(--red); }

.random-post-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.random-post-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* -- ARCHIVE ENTRIES -- */
.entry {
  padding: 1.1rem 0 1.1rem 1.25rem;
  border-left: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: border-left-color 0.12s;
}
.entry:first-child { border-top: 1px solid var(--border); }
.entry:hover { border-left-color: var(--red-dim); }
.entry.highlighted { border-left-color: var(--red); }

.entry-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.entry-blog {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  font-weight: bold;
}

.entry-author {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.entry-note {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.6rem;

}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.6rem;
}

.posts-toggle {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.12s;
  letter-spacing: 0.03em;
}
.posts-toggle:hover { color: var(--text); }

.posts-list {
  display: none;
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}
.posts-list.open { display: block; }

.post-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(181,18,0,0.07);
}
.post-item:last-child { border-bottom: none; }

.post-item-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.post-link {
  font-family: var(--serif);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: normal;
}
.post-link:hover { color: var(--red); }

.post-tags { display: flex; gap: 0.22rem; flex-wrap: wrap; }

.post-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.05rem 0.3rem;
  cursor: pointer;
  transition: all 0.12s;
}
.post-tag:hover { color: var(--red); border-color: var(--red-dim); }

.post-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.no-results {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 3rem 0;
  text-align: center;
}

/* -- SUBMIT FORM -- */
.submit-fields {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 2;
}

.submit-fields .field-line {
  color: var(--text);
}

.submit-fields .field-label {
  color: var(--red);
}

.small-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

/* -- FOOTER -- */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* -- RESPONSIVE -- */
@media (max-width: 600px) {
  #search { flex: 1 1 100%; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .stats { gap: 1.25rem; }
  .site-nav .nav-back { margin-left: 0; }
}
