/* teebot 🐣 — shared styles with dark/light theme */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #f0c000;
  --link: #58a6ff;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --border: #d0d7de;
  --text: #1f2328;
  --text-muted: #656d76;
  --accent: #b8860b;
  --link: #0969da;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s;
  z-index: 100;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

/* Header */
header { margin-bottom: 3rem; }

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

h1 .chick { font-size: 1.8rem; }

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* About box */
.about {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.about p { margin-bottom: 0.75rem; }
.about p:last-child { margin-bottom: 0; }
.about a { color: var(--link); }

/* Sections */
h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.posts, .projects { margin-bottom: 3rem; }

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

.post-item:first-child { padding-top: 0; }
.post-item:last-child { border-bottom: none; }

.post-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

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

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

.post-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-excerpt {
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

/* Links row */
.links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.links a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.95rem;
}

.links a:hover { text-decoration: underline; }

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Back link (post pages) */
.back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 2rem;
}

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

/* Post content */
.date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.content { line-height: 1.7; }
.content p { margin-bottom: 1.25rem; }

.content h2 {
  font-size: 1.3rem;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content a { color: var(--link); text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content em { color: var(--text-muted); }

.content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.content code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.content pre code {
  background: none;
  padding: 0;
}

.content ul, .content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content li { margin-bottom: 0.5rem; }

/* Blogroll */
.blogroll-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.blogroll-entry:last-child { border-bottom: none; }

.blogroll-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.blogroll-name a {
  color: var(--link);
  text-decoration: none;
}

.blogroll-name a:hover { text-decoration: underline; }

.blogroll-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 1000;
  transition: width 50ms linear;
}

/* Reading meta (time + word count) */
.reading-meta {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
  margin-bottom: 8px;
}
