/*
Theme Name: Temporal Bits
Theme URI: https://temporalbits.com
Author: Temporal Bits
Description: A clean, minimal blog theme for Temporal Bits — built for reading.
Version: 1.4
License: GNU General Public License v2 or later
Tags: blog, minimal, clean
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #111110; --paper: #faf9f6; --muted: #8a8278;
  --rule: #e0dbd2; --sienna: #b5522a; --sienna-dark: #8f3e1e; --sienna-bg: #fdf3ee;
  --sidebar-width: 195px; --gap: 3.5rem;
  --serif: 'IM Fell English', Georgia, serif;
  --mono: 'DM Mono', 'Courier New', monospace;
}

html { font-size: 18px; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); min-height: 100vh; -webkit-font-smoothing: antialiased; }

.site-header { width: 100%; padding: 1rem 2rem; display: flex; align-items: center; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 100; }
.logo-link { text-decoration: none; display: flex; align-items: center; gap: 0.85rem; }
.logo-circle { width: 52px; height: 52px; background: var(--sienna); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.logo-link:hover .logo-circle { background: var(--sienna-dark); }
.logo-letters { font-family: var(--mono); font-size: 1rem; font-weight: 400; color: var(--paper); letter-spacing: 0.03em; }
.site-wordmark { font-family: var(--serif); font-size: 1.15rem; font-weight: normal; color: var(--ink); letter-spacing: -0.01em; display: inline !important; }



/* Force two-column layout — flush left like Seth's blog */
.site-body {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: 0;
  gap: 0;
}

/* Kill any inherited widths/floats that break flex */
.site-body > * { float: none !important; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  padding: 2.2rem 1.8rem 2.2rem 2rem;
  min-height: 100vh;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.sidebar-section { margin-bottom: 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule); }
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-label { font-family: var(--mono); font-size: 0.55rem; font-weight: 400; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; display: block; }

.sidebar-blurb p { font-family: var(--serif); font-size: 0.82rem; line-height: 1.6; color: #2e2e2a; font-style: normal; }

.sidebar-search input[type="search"] { font-family: var(--mono); font-size: 0.68rem; font-weight: 300; color: var(--ink); background: transparent; border: none; border-bottom: 1px solid var(--rule); padding: 0.22rem 0; width: 100%; outline: none; transition: border-color 0.15s; -webkit-appearance: none; }
.sidebar-search input[type="search"]:focus { border-color: var(--sienna); }
.sidebar-search input[type="search"]::placeholder { color: var(--muted); opacity: 0.6; }

.sub-form { display: flex; }
.sub-form input[type="email"] { font-family: var(--mono); font-size: 0.63rem; font-weight: 300; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-right: none; padding: 0.38rem 0.55rem; width: 100%; outline: none; transition: border-color 0.15s; -webkit-appearance: none; border-radius: 0; }
.sub-form input[type="email"]:focus { border-color: var(--sienna); }
.sub-form input[type="email"]::placeholder { color: var(--muted); opacity: 0.6; }
.sub-form button { font-family: var(--mono); font-size: 0.58rem; font-weight: 400; letter-spacing: 0.05em; background: var(--sienna); color: var(--paper); border: 1px solid var(--sienna); padding: 0.38rem 0.6rem; cursor: pointer; white-space: nowrap; transition: background 0.15s; border-radius: 0; }
.sub-form button:hover { background: var(--sienna-dark); border-color: var(--sienna-dark); }

/* No label on categories */
.sidebar-categories ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-categories ul li a { font-family: var(--mono); font-size: 0.66rem; font-weight: 300; color: var(--muted); text-decoration: none; letter-spacing: 0.05em; text-transform: lowercase; transition: color 0.15s; }
.sidebar-categories ul li a:hover { color: var(--sienna); }

.sidebar-reading .books { display: flex; flex-direction: column; gap: 0.7rem; }
.book-title { font-family: var(--serif); font-size: 0.78rem; font-style: normal; color: #2a2a26; line-height: 1.3; }
.book-author { font-family: var(--mono); font-size: 0.55rem; font-weight: 300; color: var(--muted); letter-spacing: 0.05em; margin-top: 0.08rem; }

.site-main { flex: 1; min-width: 0; padding: 2.2rem 3rem 2.2rem 3rem; }
.posts, .post-single { max-width: 640px; }

.posts { display: flex; flex-direction: column; }
.post { padding: 1.9rem 0; border-bottom: 1px solid var(--rule); opacity: 0; animation: fadeUp 0.5s ease both; }
.post:nth-child(1) { animation-delay: 0.05s; }
.post:nth-child(2) { animation-delay: 0.12s; }
.post:nth-child(3) { animation-delay: 0.19s; }
.post:nth-child(4) { animation-delay: 0.26s; }
.post:nth-child(5) { animation-delay: 0.33s; }

.post-meta { font-family: var(--mono); font-size: 0.6rem; font-weight: 300; color: var(--muted); letter-spacing: 0.07em; margin-bottom: 0.55rem; display: flex; gap: 1rem; align-items: center; }
.post-tag { color: var(--sienna); background: var(--sienna-bg); padding: 0.1rem 0.42rem; text-transform: lowercase; font-size: 0.55rem; letter-spacing: 0.08em; }
.post-title { font-size: 1.28rem; font-weight: normal; line-height: 1.4; margin-bottom: 0.65rem; }
.post-title a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.post-title a:hover { border-bottom-color: var(--sienna); }
.post-excerpt { font-size: 0.92rem; line-height: 1.82; color: #2a2a27; margin-bottom: 0.9rem; }
.post-excerpt p { margin: 0; }
.read-more { font-family: var(--mono); font-size: 0.6rem; font-weight: 300; letter-spacing: 0.08em; text-decoration: none; color: var(--muted); text-transform: lowercase; transition: color 0.15s; }
.read-more:hover { color: var(--sienna); }

.pagination { padding: 2rem 0; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6rem; font-weight: 300; letter-spacing: 0.07em; color: var(--muted); }
.pagination a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.pagination a:hover { color: var(--sienna); }

.post-single { padding: 2rem 0; }
.post-single .post-header { padding-bottom: 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.post-single h1.post-title { font-size: 1.9rem; font-weight: normal; line-height: 1.3; margin-bottom: 1rem; border-bottom: none; }
.post-single .post-content { font-size: 1.02rem; line-height: 1.9; color: #1e1e1b; }
.post-single .post-content p { margin-bottom: 1.5rem; }
.post-single .post-content h2 { font-size: 1.2rem; font-weight: normal; margin: 2.5rem 0 0.8rem; }
.post-single .post-content blockquote, blockquote { border-left: 3px solid var(--sienna); background: var(--sienna-bg); padding: 1rem 1.4rem; margin: 2rem 0; color: #2a2520; font-style: italic; font-size: 1rem; line-height: 1.8; }
blockquote p { margin: 0; }
.post-single .post-content a { color: var(--sienna); text-decoration: underline; text-underline-offset: 3px; }

.site-footer { padding: 1.6rem 3rem; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.6rem; font-weight: 300; color: var(--muted); letter-spacing: 0.06em; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: var(--ink); }

/* Fix symmetry — sidebar and first post start at same baseline */
.post:first-child { padding-top: 0; }
.sidebar-section:first-child { padding-top: 0; margin-top: 0; }

/* Hide plugin noise: reading time, like/heart button */
.jetpack-likes-widget-wrapper,
.sharedaddy,
.sd-like,
.wtr-time,
.wtr-container,
[class*="reading-time"],
[class*="read-time"] { display: none !important; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── HAMBURGER BUTTON — hidden on desktop ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Animate to X when open */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── OVERLAY ── */
.sidebar-overlay { display: none !important; }

/* ── MOBILE ── */
@media (max-width: 820px) {

  .hamburger { display: flex; }

  /* Fullscreen menu — starts exactly at header bottom border */
  .sidebar {
    position: fixed !important;
    top: var(--header-height, 74px) !important;
    left: 0 !important;
    height: calc(100vh - var(--header-height, 74px)) !important;
    width: 100% !important;
    min-height: unset !important;
    border-right: none !important;
    background: var(--paper) !important;
    padding: 2.5rem 2rem !important;
    overflow-y: auto;
    display: none !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    z-index: 300;
  }

  .sidebar.is-open {
    display: flex !important;
  }

  /* Restore sidebar section spacing inside drawer */
  .sidebar-section {
    flex: unset !important;
    min-width: unset !important;
    margin-bottom: 1.4rem !important;
    padding-bottom: 1.4rem !important;
    border-bottom: 1px solid var(--rule) !important;
    width: 100%;
  }
  .sidebar-section:last-child { border-bottom: none !important; margin-bottom: 0 !important; }

  /* Main content full width, no sidebar offset */
  .site-body { flex-direction: row; padding: 0; gap: 0; }
  .site-main { padding: 1.5rem 1.25rem; width: 100%; border-left: none !important; }
  .posts, .post-single { max-width: 100%; }

  /* Header */
  .site-header { padding: 0.85rem 1.25rem; }

  /* Posts */
  .post { padding: 1.5rem 0; }
  .post-title { font-size: 1.15rem; }
  .post-excerpt { font-size: 0.9rem; }
  .post-single h1.post-title { font-size: 1.5rem; }
  .post-single .post-content { font-size: 0.95rem; }

  /* Footer */
  .site-footer { padding: 1.2rem 1.25rem; }
}

@media (max-width: 400px) {
  .logo-circle { width: 42px; height: 42px; }
  .logo-letters { font-size: 0.85rem; }
}
