/* SBS — Shakey Bridge Software
   Typography-first, no JavaScript, no tracking. */

:root {
  --bg: #FAFAF8;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent: #9B4B3A;
  --accent-hover: #7D3C2E;
  --border: #E5E5E0;
  --code-bg: #F0F0EC;
  --content-width: 640px;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header / Nav */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.33rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.11rem;
  font-weight: normal;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.wordmark:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.83rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Main content */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4.5rem 1.33rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.33rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-location {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Typography */

h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.33rem;
  font-weight: normal;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.11rem;
  font-weight: normal;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.33rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* Home page */

.home-tagline {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.home-description {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.home-work-note {
  color: var(--text-secondary);
  font-size: 0.89rem;
  margin-bottom: 1.75rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.33rem;
  color: var(--accent);
  font-size: 0.89rem;
}

.home-link:hover {
  color: var(--accent-hover);
}

/* About page */

.about-section {
  margin-bottom: 2.67rem;
}

.about-section h2 {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: normal;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.about-section p {
  color: var(--text-secondary);
}

.about-section a {
  color: var(--accent);
}

/* Writing / Blog index */

.writing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.writing-header h1 {
  margin-bottom: 0;
}

.writing-header .rss-link {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.writing-header .rss-link:hover {
  color: var(--accent);
}

.post-list {
  list-style: none;
}

.post-item {
  padding: 1.11rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: normal;
  margin-bottom: 0.33rem;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--accent);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.89rem;
  line-height: 1.5;
}

/* Single post */

.post-meta {
  margin-bottom: 2rem;
}

.post-meta .post-date {
  margin-bottom: 0.67rem;
}

.post-meta h1 {
  margin-bottom: 0;
}

.post-body p {
  margin-bottom: 1.33rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--text-secondary);
  margin: 1.33rem 0;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.33rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.33rem;
}

/* Code blocks */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background-color: var(--code-bg);
  padding: 1.11rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.33rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Post navigation */

.post-nav {
  border-top: 1px solid var(--border);
  padding-top: 1.33rem;
  margin-top: 2.5rem;
}

.post-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.33rem;
  color: var(--accent);
  font-size: 0.89rem;
}

.post-nav a:hover {
  color: var(--accent-hover);
}

/* Tags */

.tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.tag a {
  color: var(--text-secondary);
}

.tag a:hover {
  color: var(--accent);
}

/* 404 */

.not-found {
  text-align: center;
  padding: 4rem 0;
}

.not-found h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Mobile */

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .site-header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.67rem;
    padding: 1.11rem 1.33rem;
  }

  main {
    padding: 2.67rem 1.33rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1.11rem 1.33rem;
  }

  .home-tagline {
    font-size: 1.56rem;
  }

  h1 {
    font-size: 1.56rem;
  }

  h2 {
    font-size: 1.22rem;
  }
}
