/*
Theme Name: Workbench
Theme URI: https://putyourcomputertowork.com
Author: Put Your Computer To Work
Description: A custom theme built for the archival revival of Put Your Computer To Work, a make-money-online blog from 2008&#8211;2013. Styled as a workshop ledger &#8212; job tickets, brass hardware, warm paper.
Version: 1.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: workbench
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --paper: #f3ead9;
  --paper-alt: #ebe0c9;
  --paper-deep: #e3d5b8;
  --ink: #2a231c;
  --ink-soft: #5b4f42;
  --ink-faint: #8a7c69;
  --rust: #b1502e;
  --rust-dark: #8a3c22;
  --brass: #9c7d3f;
  --terminal: #3d5c52;
  --line: #d3c3a1;
  --line-strong: #b8a67e;
  --paper-shadow: rgba(42, 35, 28, 0.14);

  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  --radius: 3px;
  --measure: 42rem;
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 2.1rem;
  background-attachment: local;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rust-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--rust); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.3em; }

::selection { background: var(--brass); color: var(--paper); }

/* ==========================================================================
   Layout shell
   ========================================================================== */

.site {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-inner {
  background: var(--paper-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--paper-shadow), 0 12px 28px -18px var(--paper-shadow);
  margin: 2.2rem 0;
  overflow: hidden;
}

/* ==========================================================================
   Header / plaque
   ========================================================================== */

.site-header {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 2.4rem 2.2rem 1.9rem;
  text-align: center;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0 18px,
    var(--brass) 18px 36px
  );
}

.site-brand {
  display: inline-block;
  text-decoration: none;
}

.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--paper);
}

.site-title a { color: inherit; text-decoration: none; }

.site-tagline {
  margin: 0.55rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.site-plate {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(243, 234, 217, 0.35);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 234, 217, 0.7);
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line-strong);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.85rem 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--rust-dark);
  border-bottom-color: var(--rust);
}

/* ==========================================================================
   Content area
   ========================================================================== */

.site-content {
  padding: 2.2rem 2.2rem 2.6rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.content-layout.has-sidebar {
  grid-template-columns: minmax(0, 1fr) 15rem;
}

/* ==========================================================================
   Job ticket (post preview card)
   ========================================================================== */

.ticket {
  position: relative;
  padding: 1.6rem 1.7rem 1.7rem;
  margin-bottom: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--rust);
  border-radius: var(--radius);
}

.ticket:last-child { margin-bottom: 0; }

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}

.ticket-meta .ticket-id::before { content: "#"; color: var(--brass); }

.ticket-meta a { color: var(--terminal); text-decoration: none; }
.ticket-meta a:hover { text-decoration: underline; }

.ticket-title {
  font-size: 1.4rem;
  margin: 0 0 0.55rem;
}

.ticket-title a { color: var(--ink); text-decoration: none; }
.ticket-title a:hover { color: var(--rust-dark); }

.ticket-excerpt {
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.ticket-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust-dark);
  text-decoration: none;
}

.ticket-more:hover { color: var(--rust); }

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

.entry-header {
  padding-bottom: 1.3rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.entry-title {
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
}

.entry-content {
  max-width: var(--measure);
  font-size: 1.03rem;
}

.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content blockquote {
  margin: 1.4em 0;
  padding: 0.2em 1.1em;
  border-left: 3px solid var(--brass);
  color: var(--ink-soft);
  font-style: italic;
}
.entry-content pre, .entry-content code {
  font-family: var(--font-mono);
  background: var(--paper-deep);
  border-radius: var(--radius);
}
.entry-content code { padding: 0.15em 0.4em; font-size: 0.88em; }
.entry-content pre { padding: 1em; overflow-x: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.entry-footer {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* ==========================================================================
   Archive header
   ========================================================================== */

.archive-header,
.page-header {
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.archive-title, .page-title {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.archive-description {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

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

.site-sidebar { font-size: 0.92rem; }

.widget {
  margin-bottom: 1.9rem;
  padding-bottom: 1.9rem;
  border-bottom: 1px solid var(--line);
}

.widget:last-child { border-bottom: none; }

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.7rem;
}

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 0.5rem; }
.widget a { color: var(--ink-soft); text-decoration: none; }
.widget a:hover { color: var(--rust-dark); }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pagination a { color: var(--rust-dark); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.pagination .disabled { color: var(--ink-faint); }

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
  margin-top: 2.4rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--ink);
}

.comments-title { font-size: 1.15rem; }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.comment-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.comment-author { color: var(--ink); font-weight: 600; }

.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

.comment-form textarea { min-height: 8rem; resize: vertical; }

.comment-form .submit {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  background: var(--rust);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.comment-form .submit:hover { background: var(--rust-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--ink-faint);
  padding: 1.6rem 2.2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.site-footer p { margin: 0.25em 0; }
.site-footer a { color: var(--brass); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .site-content { padding: 1.5rem 1.2rem 2rem; }
  .content-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
  .site-header { padding: 1.9rem 1.2rem 1.5rem; }
}
