/* robberends.com · Moss
   All design tokens live here. Change colors in this one block. */

:root {
  --bg:           #1D231D;
  --bg-soft:      #252C24;
  --text:         #E9EDE2;
  --muted:        #9AA591;
  --accent:       #A3C284;
  --accent-dim:   #5C7050;
  --accent-light: #C8DBA6;
  --line:         #2E362C;
  --pill:         #283027;
  --pill-text:    #C7D2BA;
  --code-bg:      #232B22;
  --input-border: #364033;
  --placeholder:  #7B8674;
  --list-link:    #DEE4D2;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.7 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- site header ---------- */

.site-header {
  max-width: 960px; margin: 0 auto;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.tagline {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.tagline em { font-style: italic; color: var(--text); }

.header-right {
  display: flex; align-items: center; gap: 12px;
}

/* ---------- layout ---------- */

.layout { max-width: 960px; margin: 0 auto; }

.main { padding: 34px 44px 60px; }

/* ---------- social icons ---------- */

.header-social {
  display: flex; gap: 12px; align-items: center;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.social-icon {
  color: var(--muted); text-decoration: none;
  display: flex; align-items: center; line-height: 1;
}
.social-icon:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }
a:focus-visible, input:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
a, input[type="search"] {
  transition: color .12s ease, border-color .12s ease,
              text-decoration-color .12s ease, background-color .12s ease;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.brand {
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 20px; letter-spacing: -0.015em;
}

/* ---------- nav ---------- */

.nav { display: flex; flex-direction: row; align-items: center; gap: 2px; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-size: 14px; padding: 6px 10px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }

.nav-icon-link {
  color: var(--muted); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  padding: 6px 7px;
  border-bottom: 2px solid transparent;
}
.nav-icon-link:hover { color: var(--text); }
.nav-icon-link.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- read-more clamp ---------- */

.post-body-wrap {
  position: relative;
  max-height: 380px;
  overflow: hidden;
}
.post-body-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.post-body-wrap.expanded {
  max-height: none;
  overflow: visible;
}
.post-body-wrap.expanded::after { display: none; }

.read-more-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
}
.read-more-btn:hover { color: var(--accent); }

/* ---------- post listings ---------- */

.post-full { padding: 34px 0 38px; border-bottom: 1px solid var(--line); }
.post-full.post-link { padding: 22px 0 24px; }

h1.post-title {
  font-size: 26px; line-height: 1.25; font-weight: 700;
  letter-spacing: -0.015em; margin: 34px 0 0;
  color: var(--accent);
}
h2.post-title {
  font-size: 21px; line-height: 1.3; font-weight: 650;
  letter-spacing: -0.01em; margin: 0;
  color: var(--accent);
}
.post-title a { color: var(--accent); text-decoration: none; }
.post-title a:hover { color: var(--accent-light); }
.post-link .post-title a:first-child::after { content: " ↗"; color: var(--muted); font-size: .75em; }
.link-target {
  margin: 18px 0 0; font-size: 14px;
}
.link-target a { color: var(--muted); text-decoration: none; }
.link-target a:hover { color: var(--accent); }

.meta {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin: 10px 0 0; font-size: 13px;
}
.meta .date { color: var(--muted); }
.meta .readtime { color: var(--muted); }
.post-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 22px;
}
.post-full .post-tags { display: none; }
.post-tags a {
  color: var(--pill-text); background: var(--pill);
  padding: 3px 11px; border-radius: 999px;
  font-size: 12px; text-decoration: none;
}
.post-tags a:hover { color: var(--accent); }
.meta .source { color: var(--muted); text-decoration: none; }
.meta .source:hover { color: var(--accent); }

.excerpt { color: var(--muted); margin: 14px 0 0; }

/* ---------- article body ---------- */

.prose { margin-top: 18px; }
.prose p { margin: 0 0 1em; }
.prose h1, .prose h2 {
  font-size: 19px; font-weight: 650; letter-spacing: -0.01em;
  margin: 1.7em 0 0.55em; color: var(--accent);
}
.prose h1:hover, .prose h2:hover { color: var(--accent-light); }
.prose h3 { font-size: 17px; font-weight: 650; margin: 1.5em 0 0.5em; color: var(--accent); }
.prose h3:hover { color: var(--accent-light); }
.prose a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: var(--accent-dim);
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose a.hashtag { color: var(--accent); text-decoration: none; }
.prose a.hashtag:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.2em 0; padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent-dim); color: var(--muted);
}
.prose code {
  background: var(--code-bg); padding: 2px 6px; border-radius: 6px;
  font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.prose pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; margin: 1.2em 0;
}
.prose pre code { background: none; padding: 0; font-size: 13.5px; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.35em; }
.prose li { margin: 0.3em 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.8em 0; }

/* slightly larger first paragraph on single post pages */
.single .prose > p:first-of-type { font-size: 18px; }

/* ---------- archive ---------- */

.page-title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.015em;
  margin: 34px 0 18px; color: var(--accent);
}
form.search { margin: 0 0 6px; }
input[type="search"] {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--input-border); border-radius: 10px;
  font-family: inherit; appearance: none;
}
input[type="search"]::placeholder { color: var(--placeholder); }

.filter { color: var(--muted); font-size: 13.5px; margin: 14px 0 4px; }
.filter a { color: var(--muted); }
.filter a:hover { color: var(--accent); }

.month { margin-top: 28px; }
.month-head {
  font-size: 12px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 4px;
}
ul.month-list { list-style: none; margin: 6px 0 0; padding: 0; }
.month-list li {
  padding: 7px 0; display: flex; justify-content: space-between;
  gap: 14px; align-items: baseline;
}
.month-list a { color: var(--list-link); text-decoration: none; font-size: 15.5px; }
.month-list a:hover { color: var(--accent); }
.month-list .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- pagination ---------- */

.pagination {
  display: flex; align-items: center; gap: 2px;
  margin: 36px 0 8px;
  font-size: 13.5px;
}
.pag-num, .pag-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: 6px; text-decoration: none;
  color: var(--muted);
}
a.pag-num:hover, a.pag-arrow:hover { color: var(--text); background: var(--bg-soft); }
.pag-current { color: var(--text); background: var(--bg-soft); font-weight: 600; }
.pag-disabled { opacity: 0.3; cursor: default; }
.pag-ellipsis { color: var(--muted); padding: 0 4px; }
.pag-arrow { font-size: 15px; }

/* ---------- misc ---------- */

.more { margin: 30px 0 0; font-size: 14.5px; }
.more a { color: var(--muted); text-decoration: none; }
.more a:hover { color: var(--accent); }

.empty { color: var(--muted); }
.empty a, .empty code { color: var(--pill-text); }

.ai-notice {
  margin: 14px 0 0; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted); font-size: 13px; line-height: 1.6;
}
.ai-notice-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; margin-right: 6px;
}
.ai-notice a {
  color: var(--muted); text-decoration: underline;
  text-underline-offset: 3px; white-space: nowrap;
}
.ai-notice a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .site-header {
    display: flex; padding: 14px 20px;
    align-items: center; justify-content: space-between;
  }
  .tagline { display: none; }
  .header-right { gap: 4px; }
  .header-social { padding-left: 8px; gap: 8px; }
  .nav a { padding: 4px 8px; font-size: 13.5px; }
  .nav-icon-link { padding: 4px 5px; }
  .post-body-wrap { max-height: 760px; }
  .main { padding: 24px 20px 48px; }
  body { font-size: 16px; }
  h1.post-title { font-size: 23px; }
  h2.post-title { font-size: 20px; }
}

@media print {
  body { background: #fff; color: #000; font: 11.5pt/1.6 Georgia, serif; }
  .site-header, .more, .post-tags, form.search { display: none; }
  .main { padding: 0; }
  .post-title a, .prose a { color: #000; }
  .prose a { text-decoration: underline; }
  .prose code, .prose pre { background: #f2f2f2; }
  .meta { color: #444; }
  .ai-notice { color: #444; background: #f8f8f8; border-color: #ddd; }
}
