/* ========================================
   DESIGN TOKENS — Tiffany Williams Blog
   Dusty Rose / Terracotta accent
   ======================================== */
:root {
  /* Backgrounds */
  --bg: #faf8f5;
  --bg-paper: #f5f1e8;
  --bg-card: #fffef9;

  /* Text */
  --text: #2c2c2c;
  --text-secondary: #5c5347;
  --text-muted: #9b8f82;

  /* Accent — Dusty Rose / Terracotta */
  --accent: #c17c74;
  --accent-dark: #a85f56;
  --accent-light: #e8ccc8;
  --accent-subtle: #f9f0ee;
  --terracotta: #d4a59a;
  --rose-highlight: #fce8e5;

  /* Borders */
  --border: #e8e0d4;

  /* Typography */
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
}

/* ========================================
   BASE STYLES
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-serif);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

::selection {
  background: var(--rose-highlight);
  color: var(--text);
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  transition: all 0.2s ease;
}

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

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ========================================
   HEADER
   ======================================== */
.header {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-12);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  border: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.site-title:hover {
  color: var(--accent-dark);
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  border: none;
  padding: var(--space-1) 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

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

.nav a:hover::after {
  width: 100%;
}

.nav a.active {
  color: var(--accent-dark);
}

.nav a.active::after {
  width: 100%;
}

/* ========================================
   HOMEPAGE — INTRO
   ======================================== */
.intro {
  margin-bottom: var(--space-12);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.intro p {
  font-size: 17px;
  color: var(--text-secondary);
}

.intro strong {
  color: var(--text);
}

/* ========================================
   SECTION LABELS
   ======================================== */
.section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========================================
   POST LIST
   ======================================== */
.posts {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.post-item {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.post-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.post-title a {
  color: inherit;
  border: none;
}

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

.post-excerpt {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   TAGS
   ======================================== */
.post-tags {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--accent-dark);
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 4px;
  border: none;
  text-decoration: none;
}

.tag:hover {
  background: var(--accent-light);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.pagination a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--accent-dark);
  border: none;
}

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

/* ========================================
   SINGLE POST — HEADER
   ======================================== */
.post-full .post-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.post-category {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 3px;
}

.post-full .post-title {
  font-size: 36px;
  line-height: 1.25;
  margin-bottom: var(--space-4);
}

.post-subtitle {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
}

/* ========================================
   POST CONTENT
   ======================================== */
.post-content {
  margin-bottom: var(--space-12);
}

.post-content p {
  margin-bottom: var(--space-6);
}

/* Drop cap */
.post-content > p:first-of-type::first-letter {
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: var(--space-3);
  margin-top: 6px;
  color: var(--accent);
  font-weight: 500;
}

/* H2 with accent bar */
.post-content h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text);
  position: relative;
  padding-left: var(--space-6);
}

.post-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--text);
}

/* Lists */
.post-content ul,
.post-content ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}

.post-content li {
  margin-bottom: var(--space-2);
}

.post-content li::marker {
  color: var(--accent);
}

/* Blockquotes */
.post-content blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: var(--accent-subtle);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--text-secondary);
  position: relative;
}

.post-content blockquote::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 48px;
  color: var(--accent-light);
  position: absolute;
  top: -10px;
  left: 16px;
  line-height: 1;
}

/* Inline code */
.post-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-paper);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Code blocks */
.post-content pre {
  background: #2c2c2c;
  color: #e8e0d4;
  padding: var(--space-6);
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: var(--space-6);
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Highlighted text */
.post-content .highlight,
.post-content mark {
  background: var(--rose-highlight);
  padding: 1px 5px;
  border-radius: 3px;
}

.post-content strong {
  font-weight: 600;
  color: var(--text);
}

/* Callout / Note */
.note,
.kg-callout-card {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--space-4) var(--space-6);
  background: var(--accent-subtle);
  border-radius: 6px;
  margin: var(--space-8) 0;
  border-left: 3px solid var(--terracotta);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.note::before {
  content: '\270E';
  color: var(--accent);
  flex-shrink: 0;
}

.kg-callout-card-emoji {
  font-style: normal;
}

/* Images */
.post-content figure {
  margin: var(--space-8) 0;
}

.post-content img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.post-content figcaption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-3);
}

/* Horizontal rule */
.post-content hr {
  border: none;
  margin: var(--space-12) auto;
  width: 60px;
  height: 3px;
  background: var(--accent-light);
  border-radius: 2px;
}

/* ========================================
   GHOST CARD STYLES
   ======================================== */

/* Bookmark Card */
.kg-bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: var(--space-8) 0;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
  border: none;
}

.kg-bookmark-content {
  padding: 20px;
  flex-grow: 1;
}

.kg-bookmark-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.kg-bookmark-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.kg-bookmark-metadata {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-3);
}

/* Toggle Card */
.kg-toggle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: var(--space-6) 0;
}

.kg-toggle-heading {
  padding: var(--space-4) 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
}

.kg-toggle-content {
  padding: 0 20px var(--space-4);
  color: var(--text-secondary);
}

/* Image Card */
.kg-image-card {
  margin: var(--space-8) 0;
}

.kg-image-card img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.kg-image-card figcaption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-3);
}

/* Width modifiers for Ghost cards */
.kg-width-wide {
  margin-left: -80px;
  margin-right: -80px;
  max-width: calc(100% + 160px);
}

.kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
}

/* Gallery Card */
.kg-gallery-card {
  margin: var(--space-8) 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kg-gallery-row {
  display: flex;
  gap: var(--space-2);
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ========================================
   POST FOOTER
   ======================================== */
.post-footer {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  margin-bottom: var(--space-12);
}

.post-footer .post-tags {
  margin-bottom: var(--space-8);
  margin-top: 0;
}

/* ========================================
   AUTHOR CARD
   ======================================== */
.author-card {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--terracotta));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  flex-shrink: 0;
}

.author-info h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.author-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   RELATED POSTS
   ======================================== */
.related {
  margin-bottom: var(--space-12);
}

.related-header {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.related-posts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.related-post {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.related-post:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.related-post a {
  border: none;
}

.related-post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.related-post-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

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

/* ========================================
   NOW PAGE
   ======================================== */
.now-intro {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  font-style: italic;
}

.now-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

.now-content h2,
.now-section h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  margin-bottom: var(--space-4);
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.now-content h2::before,
.now-section h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Override post-content h2 styles inside now page */
.now-content.post-content h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.now-content.post-content h2::before {
  position: static;
  transform: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.now-content p,
.now-section p,
.now-section ul {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Now page blockquotes as arrow list items */
.now-content blockquote {
  background: none;
  border-left: none;
  border-radius: 0;
  padding: 0 0 0 var(--space-6);
  margin: 0 0 var(--space-3) 0;
  position: relative;
  font-style: normal;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
}

.now-content blockquote::before {
  content: '\2192';
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--terracotta);
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1.8;
}

.now-section ul {
  list-style: none;
  padding-left: 0;
}

.now-section li {
  padding-left: var(--space-6);
  position: relative;
  margin-bottom: var(--space-3);
}

.now-section li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--terracotta);
}

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-content {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-content p {
  margin-bottom: var(--space-6);
}

.about-content strong {
  color: var(--text);
}

.about-content h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
  position: relative;
}

.about-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.values-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.values-list ul {
  list-style: none;
  padding: 0;
}

.values-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.values-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.values-list li:last-child {
  border-bottom: none;
}

.values-list em {
  color: var(--text-muted);
  font-style: normal;
}

.connect-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.connect-link {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: var(--space-2) var(--space-4);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-light);
  border-radius: 6px;
  color: var(--accent-dark);
}

.connect-link:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* ========================================
   PAGE STYLES (generic)
   ======================================== */
.page-header {
  margin-bottom: var(--space-8);
}

.page-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
}

/* ========================================
   TAG / AUTHOR ARCHIVE PAGES
   ======================================== */
.tag-header,
.author-header {
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.tag-header h1,
.author-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.tag-header p,
.author-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ========================================
   ERROR PAGE
   ======================================== */
.error-page {
  text-align: center;
  padding: var(--space-16) 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 72px;
  color: var(--accent-light);
  font-weight: 400;
  margin-bottom: var(--space-4);
}

.error-message {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text);
  margin-bottom: var(--space-6);
}

.error-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.error-link {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--accent-dark);
  border-bottom: 1px solid var(--accent-light);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  margin-top: var(--space-16);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.footer-links {
  display: flex;
  gap: var(--space-4);
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  border: none;
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .site-title {
    font-size: 20px;
  }

  .post-item .post-title {
    font-size: 20px;
  }

  .post-full .post-title {
    font-size: 28px;
  }

  .post-subtitle {
    font-size: 17px;
  }

  .post-content h2 {
    font-size: 20px;
  }

  .related-posts {
    grid-template-columns: 1fr;
  }

  .author-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-4);
  }

  .kg-width-wide {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}
