/* === Ars Concreta — shared styles === */

:root {
  --bg-outer: #bcbab4;
  --bg-panel: #dad6cc;
  --bg-input: #f4f1ea;
  --bg-soft:  #cfcabd;
  --bg-cream: #f8f3dd;
  --border:   #5a564e;
  --border-soft: #9a958a;
  --border-light: #c8c3b6;
  --text:     #2a2a2a;
  --text-mute:#5a564e;
  --link:     #6a4f7a;
  --link-deep:#3a2a4a;
  --accent:   #6a4f7a;   /* overridden per-post via inline style */
  --cream-accent: #c2a14a;

  /* 3D / shadow palette (Win9x flavor) */
  --hi:           #ffffff;        /* top-left highlight */
  --lo:           #6a665d;        /* bottom-right shade */
  --lo-deep:      #3f3c36;        /* harder bottom-right */
  --shadow:       rgba(0,0,0,0.3);
  --shadow-soft:  rgba(0,0,0,0.18);
  --inset-shadow: inset 1px 1px 2px rgba(0,0,0,0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-outer);
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--link); }
a:hover { color: var(--link-deep); }

/* === Layout === */

.site {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-header {
  background: var(--bg-panel);
  border: 2px solid var(--lo);
  border-top-color: var(--hi);
  border-left-color: var(--hi);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 18px 22px;
  border-bottom: 2px inset var(--lo);
}

.site-header h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 var(--hi);
}

.site-header .tagline {
  margin: 0;
  font-size: 13px;
  color: var(--text-mute);
}

.layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  align-items: start;
}

/* === Sidebar nav === */

.sidebar {
  background: var(--bg-panel);
  border: 2px solid var(--lo);
  border-top-color: var(--hi);
  border-left-color: var(--hi);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar a {
  display: block;
  padding: 9px 13px;
  text-decoration: none;
  background: var(--bg-soft);
  border: 2px solid;
  border-color: var(--hi) var(--lo-deep) var(--lo-deep) var(--hi);
  box-shadow: 1px 1px 0 var(--shadow);
  color: var(--link);
  font-weight: bold;
  font-size: 13px;
}
.sidebar a:hover { background: var(--bg-input); }
.sidebar a:active,
.sidebar a.is-active {
  background: var(--bg-input);
  border-color: var(--lo-deep) var(--hi) var(--hi) var(--lo-deep);
  box-shadow: var(--inset-shadow);
}

.sidebar-section {
  margin-top: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mute);
  padding: 4px 4px 0;
}

/* === Main content panel === */

.main {
  background: var(--bg-panel);
  border: 2px solid var(--lo);
  border-top-color: var(--hi);
  border-left-color: var(--hi);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 22px 26px;
  min-height: 400px;
}

.main h2 {
  font-size: 22px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-soft);
}
.main h3 { font-size: 17px; margin: 22px 0 8px; }
.main p { margin: 0 0 12px; }
.main ul, .main ol { margin: 0 0 12px 20px; padding: 0; }
.main li { margin: 0 0 4px; }
.main hr { border: 0; border-top: 1px solid var(--border-light); margin: 18px 0; }
.main img { max-width: 100%; height: auto; }
.main code {
  background: var(--bg-input);
  padding: 1px 5px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-light);
}
.main pre {
  background: var(--bg-input);
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
.main blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 14px;
  margin: 12px 0;
  color: var(--text-mute);
  background: var(--bg-soft);
}

/* Cream callout */
.callout {
  background: var(--bg-cream);
  border: 2px solid var(--lo);
  border-left: 4px solid var(--cream-accent);
  box-shadow: var(--inset-shadow);
  padding: 10px 14px;
  margin: 14px 0;
}

/* === Posts list === */

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

.posts-list li {
  background: var(--bg-soft);
  border: 2px solid;
  border-color: var(--hi) var(--lo) var(--lo) var(--hi);
  border-left: 4px solid var(--accent);
  box-shadow: 2px 2px 0 var(--shadow-soft);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.posts-list li.no-accent { border-left-color: var(--border-soft); }

.posts-list a.post-link {
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  color: var(--link);
}
.posts-list a.post-link:hover { text-decoration: underline; }

.posts-list .untitled {
  font-weight: normal;
  font-style: italic;
  font-size: 14px;
  color: var(--text-mute);
}

.post-article.is-untitled header { padding-bottom: 8px; }

/* === Short post (rendered inline in lists) === */

.posts-list li.post-short {
  position: relative;
  padding-bottom: 14px;
}
.posts-list li.post-short .post-row-meta { margin-bottom: 6px; }
.posts-list li.post-short .post-link {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.post-row-date {
  text-decoration: none;
  color: var(--text-mute);
}
.post-row-date:hover { text-decoration: underline; }
.post-row-body {
  font-size: 14px;
  line-height: 1.55;
}
.post-row-body p { margin: 0 0 8px; }
.post-row-body p:last-child { margin-bottom: 0; }
.post-row-body img { max-width: 100%; height: auto; }
.post-row-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 8px 0;
  padding: 2px 12px;
  color: var(--text-mute);
}
.post-row-body code {
  background: var(--bg-input);
  padding: 1px 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}
.post-row-body hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 8px 0;
}
.post-row-permalink {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 12px;
  color: var(--text-mute);
  text-decoration: none;
  font-weight: bold;
}
.post-row-permalink:hover { color: var(--accent); }

/* === Tumblr-style tags (under post body) === */

.tumblr-tags {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.6;
}
.tumblr-tag {
  color: var(--text-mute);
  text-decoration: none;
  margin-right: 4px;
  word-break: break-word;
}
.tumblr-tag:hover { color: var(--accent); text-decoration: underline; }

.post-tumblr-tags {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

/* === Tag filter bar extras === */

.filter-tags {
  align-items: flex-start;
}
.filter-tags .label {
  flex-shrink: 0;
  margin-top: 5px;
}
.tag-search {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 8px;
  width: 140px;
  border: 2px solid;
  border-color: var(--lo) var(--hi) var(--hi) var(--lo);
  box-shadow: var(--inset-shadow);
  background: var(--bg-input);
  border-radius: 0;
  margin-right: 4px;
}
.tag-search:focus { outline: 1px dotted var(--accent); outline-offset: 1px; }
.tag-chips {
  display: contents;
}
.chip-count {
  font-size: 10px;
  color: var(--text-mute);
  font-weight: normal;
  margin-left: 2px;
}
.filter-chip.is-active .chip-count { color: rgba(255,255,255,0.8); }
.filter-chip.toggle-all {
  font-style: italic;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
.filter-chip.toggle-all:hover {
  background: var(--bg-cream);
  border-color: var(--hi) var(--lo-deep) var(--lo-deep) var(--hi);
  box-shadow: 1px 1px 0 var(--shadow-soft);
}

.post-row-meta {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: bold;
  background: var(--border-soft);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill.tag {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border-light);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}

/* === Filter bar === */

.filter-bar {
  background: var(--bg-soft);
  border: 2px solid;
  border-color: var(--lo) var(--hi) var(--hi) var(--lo);
  box-shadow: var(--inset-shadow);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-bar .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mute);
  margin-right: 4px;
}
.filter-chip {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-input);
  border: 2px solid;
  border-color: var(--hi) var(--lo-deep) var(--lo-deep) var(--hi);
  box-shadow: 1px 1px 0 var(--shadow-soft);
  font-size: 12px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.filter-chip:hover { background: var(--bg-cream); }
.filter-chip.is-active,
.filter-chip:active {
  background: var(--accent);
  color: #fff;
  border-color: var(--lo-deep) var(--hi) var(--hi) var(--lo-deep);
  box-shadow: var(--inset-shadow);
}
.filter-clear {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-mute);
}

/* === Single post === */

.post-article header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.post-article h2 { border: 0; padding: 0; margin: 0 0 6px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-mute);
}

.post-fronter {
  background: var(--accent);
  color: #fff;
  padding: 1px 8px;
  font-weight: bold;
}

.post-emotion {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-tags {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-body { font-size: 14.5px; line-height: 1.6; }
.post-body a { color: var(--accent); }

.post-footer-nav {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

/* === Footer === */

.site-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  padding: 6px 0 4px;
}

.site-footer a { color: var(--text-mute); }

/* === Empty / error states === */

.empty-state {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-mute);
  font-style: italic;
  background: var(--bg-soft);
  border: 1px dashed var(--border-light);
}

.error-box {
  padding: 14px;
  background: #f4dada;
  border: 1px solid #a33;
  color: #6a1a1a;
  font-family: Consolas, monospace;
  font-size: 12px;
}

/* === Responsive === */
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar a { flex: 1 1 auto; text-align: center; }
}
