/* ============================================================
   Ramblings Of A Web Guy — blog template
   Component styles. Design tokens + fonts come from
   colors_and_type.css (link it BEFORE this file).
   Light is default; add <html data-theme="dark"> for dark.
   ============================================================ */

.page {
  background: var(--surface);
  min-height: 100vh;
  font-family: var(--font-display);
  border-top: 3px solid var(--series-f1);
}

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

a { color: inherit; }
::placeholder { color: var(--text-4); }

/* ---- Header ---- */
.site-header { background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.site-header .wrap {
  padding-top: 18px; padding-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 15px; }
.brand-img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hair-strong); display: block; }
.brand-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1; letter-spacing: 0.01em; color: var(--ink); }
.brand-title .accent { color: var(--series-f1-text); }
.brand-name { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3); margin-top: 7px; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tagline { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-4); text-align: right; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--hair-strong); border-radius: 1px;
  padding: 7px 11px; cursor: pointer;
}
.theme-toggle .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--series-f1); display: inline-block; }

/* ---- Body grid ---- */
.layout {
  max-width: 1180px; margin: 0 auto; padding: 40px 28px 56px;
  display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start;
}

/* ---- Feed: stripe cards ---- */
.feed { display: flex; flex-direction: column; gap: 24px; }
.post {
  position: relative; background: var(--surface-2);
  border: 1px solid var(--hair); border-left: 4px solid var(--series-f1);
  border-radius: 2px; box-shadow: var(--shadow-card); padding: 26px 28px;
  transition: border-color .13s, box-shadow .13s;
}
.post:hover { border-color: var(--hair-bright); border-left-color: var(--series-f1); }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.post-date { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--series-f1-text); }
.post-meta .rule { flex: 1; height: 1px; background: var(--hair); }
.post-comments { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.post-title {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.17;
  letter-spacing: 0.005em; margin: 0 0 13px;
}
.post-title a { display: block; color: var(--ink); text-decoration: none; }
.post-title a:hover { color: var(--series-f1-text); }
.post-excerpt { font-family: var(--font-display); font-size: 16px; line-height: 1.65; color: var(--text-2); margin: 0 0 18px; }
.post-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.post-foot .spacer { flex: 1; }
.tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--series-f1-text); border: 1px solid var(--series-f1); border-radius: 1px; padding: 4px 8px; text-decoration: none;
}
.read { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--series-f1-text); text-decoration: none; }
.older {
  align-self: flex-start; margin-top: 4px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: var(--series-f1); border-radius: 1px; padding: 11px 18px; text-decoration: none;
}

/* ---- Sidebar ---- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.module-head { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.module-head .tick { width: 14px; height: 2px; background: var(--series-f1); display: inline-block; }
.module-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.about-text { font-family: var(--font-display); font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0; }
.about-text a { color: var(--series-f1-text); font-style: italic; }

.search { display: flex; gap: 6px; }
.search-input {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 11px; padding: 8px 9px;
  background: var(--surface-2); border: 1px solid var(--hair-strong); border-radius: 1px; color: var(--ink);
}
.search-input:focus { outline: none; border-color: var(--ink); }
.search-go {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 13px;
  background: var(--ink); color: var(--surface-2); border: none; border-radius: 1px; cursor: pointer;
}

.inspire-list { display: flex; flex-direction: column; gap: 12px; }
.inspire .name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--series-f1-text); text-decoration: none; }
.inspire .role { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); margin-top: 3px; }

.pages { display: flex; flex-direction: column; }
.page-link { font-family: var(--font-display); font-size: 13px; color: var(--text-2); text-decoration: none; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.page-link:hover { color: var(--ink); }

.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--hair); border-radius: 1px; padding: 4px 8px; text-decoration: none;
}
.cat:hover { border-color: var(--hair-bright); }
.cat .cat-count { color: var(--series-f1-text); font-weight: 700; }

/* ---- Accessibility utilities ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100%; left: 8px; z-index: 999;
  background: var(--series-f1); color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 9px 16px; border-radius: 1px;
}
.skip-link:focus { top: 8px; }

/* ---- Single post / page ---- */
.post-title-h1 { font-size: 32px; }
.post-title-sm  { font-size: 20px; }
.post-body { font-family: var(--font-display); font-size: 16px; line-height: 1.7; color: var(--text-2); margin-bottom: 20px; }
.post-body p  { margin: 0 0 1em; }
.post-body h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 1.5em 0 0.5em; }
.post-body h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 1.25em 0 0.4em; }
.post-body pre, .post-body code { font-family: var(--font-mono); font-size: 13px; background: var(--surface-3); border-radius: 2px; }
.post-body pre  { padding: 16px 18px; overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--hair); }
.post-body code { padding: 2px 5px; }
.post-body pre code { padding: 0; background: none; }
.post-body a { color: var(--series-f1-text); }
.post-body blockquote { border-left: 3px solid var(--series-f1); margin: 0 0 1em; padding: 8px 16px; color: var(--text-3); font-style: italic; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1em; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5em; }
.post-body table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--hair);
}
.post-body thead { background: var(--surface-3); border-bottom: 2px solid var(--series-f1); }
.post-body th {
  padding: 9px 12px; text-align: left;
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap;
}
.post-body td {
  padding: 8px 12px; color: var(--ink);
  border-bottom: 1px solid var(--hair); vertical-align: top;
}
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:nth-child(even) td { background: var(--surface-3); }
.post-body tbody tr:hover td { background: var(--bg-2); }
.post-body table a { color: var(--series-f1-text); }
.post-body table a:hover { text-decoration: underline; }

/* ---- Comments ---- */
.comments-heading { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin: 28px 0 16px; }
.comment { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.comment .gravatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hair-strong); }
.comment-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); margin: 0; }
.comment-name a { color: var(--series-f1-text); text-decoration: none; }
.comment p { font-family: var(--font-display); font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }
.comment-textarea { width: 100%; font-family: var(--font-mono); font-size: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--hair-strong); border-radius: 1px; color: var(--ink); resize: vertical; }
.comment-textarea:focus { outline: none; border-color: var(--ink); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--hair); background: var(--surface-2); }
.site-footer .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.copyright { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.disclaimer { font-family: var(--font-display); font-size: 11px; color: var(--text-4); font-style: italic; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-right { align-items: flex-start; }
}

@media (max-width: 560px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .layout { padding: 28px 18px 44px; gap: 28px; }
  .post { padding: 20px 18px; }
  .post-title { font-size: 23px; }
  .post-excerpt { font-size: 15px; }
  .brand-title { font-size: 20px; }
  .tagline { text-align: left; }
  .post-meta { flex-wrap: wrap; gap: 8px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
}

