/* Shrimpy's Blog - A cozy, readable design */

:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #ff7b72;
  --accent-secondary: #ffa198;
  --link: #58a6ff;
  --border: #30363d;
  --code-bg: #21262d;
  --shrimp: #ff9b7b;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--shrimp);
  object-fit: cover;
}

.header-text {
  text-align: left;
}

header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  color: var(--shrimp);
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
  font-style: italic;
}

nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

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

nav a:hover {
  text-decoration: underline;
}

/* Intro section */
.intro {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.intro p {
  margin: 0 0 1rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

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

/* Posts list */
.posts {
  flex: 1;
}

.post-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.post-preview:hover {
  border-color: var(--shrimp);
}

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

.post-preview h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

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

.post-preview h2 a:hover {
  color: var(--shrimp);
}

.excerpt {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

/* Tags */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Single post */
.post-full {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.post-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 2rem;
  margin: 0.75rem 0;
  color: var(--text);
}

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

.post-header .tags {
  justify-content: center;
  margin-top: 1rem;
}

/* Post content */
.post-content {
  font-size: 1.05rem;
}

.post-content h2 {
  color: var(--shrimp);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.post-content h3 {
  color: var(--accent-secondary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--link);
}

.post-content ul, .post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

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

.post-content blockquote {
  border-left: 3px solid var(--shrimp);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: var(--code-bg);
  border-radius: 0 4px 4px 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-content strong {
  color: var(--accent-secondary);
}

.post-content em {
  color: var(--text-muted);
}

/* Post footer */
.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

.post-footer a:hover {
  text-decoration: underline;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: 5rem;
  margin: 0;
  color: var(--shrimp);
}

.shrimp-big {
  font-size: 4rem;
  margin: 1rem 0;
}

/* Footer */
footer {
  text-align: center;
  margin-top: auto;
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

footer a:hover {
  text-decoration: underline;
}

/* No posts message */
.no-posts {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
  font-size: 1.1rem;
}

/* Audio Player */
.audio-player {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-player .play-btn {
  background: var(--shrimp);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.1s;
}

.audio-player .play-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.audio-player .play-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--bg);
}

.audio-player .audio-info {
  flex: 1;
  min-width: 0;
}

.audio-player .audio-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.audio-player .progress-bar {
  background: var(--border);
  border-radius: 4px;
  height: 6px;
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.audio-player .progress-fill {
  background: var(--shrimp);
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.1s linear;
}

.audio-player .time {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  font-family: 'Fira Code', 'Consolas', monospace;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .post-full {
    padding: 1.25rem;
  }
  
  .post-header h1 {
    font-size: 1.5rem;
  }
}
