/* Diawatch main.css
   - Dark, soft reading theme
   - Muted grey-blue links
   - Softer typography and layout
   - Improved blockquotes, code blocks, and images
*/

:root {
  --bg: #0d0f14;
  --bg-alt: #151821;
  --fg: #e8e9f3;
  --accent: #ff6b81;
  --muted: #a0a4b8;
  --content-width: 720px;
  --radius: 12px;
}

/* Base */

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  font-size: 16px;
}

/* Layout */

.wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.site-title {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
}

.site-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
}

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

/* Hero */

.hero {
  background-image: linear-gradient(
      120deg,
      rgba(0, 0, 0, 0.7),
      rgba(0, 0, 0, 0.85)
    ),
    url("/images/cover1.jpg");
  background-size: cover;
  background-position: center;
  padding: 4rem 1.5rem 3rem;
}

.hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
  color: var(--fg);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

/* Main */

.site-main {
  padding: 3rem 1.5rem 4rem;
}

/* Post container */

.post {
  background: var(--bg-alt);
  padding: 2.2rem 2rem 2.8rem;
  border-radius: var(--radius);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 3px 12px rgba(0, 0, 0, 0.25);
  margin-top: -2.2rem;
}

.post-header h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2.05rem;
  line-height: 1.35;
}

.post-meta {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Home page post list */

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
}

.post-item h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

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

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

.post-item .post-meta {
  margin: 0 0 0.7rem;
}

.post-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #dfe1f0;
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* Headings inside posts */

.post-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.85rem;
  font-weight: 600;
  color: #f0f1fa;
}

.post-content h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
  font-weight: 600;
  color: #eef0fa;
}

/* Paragraphs */

.post-content p {
  margin: 0 0 1.2rem;
  font-size: 1rem;
  color: #e4e6f2;
}

/* Drop cap on first paragraph */

.post-content p:first-of-type::first-letter {
  float: left;
  font-size: 2.6rem;
  line-height: 1;
  padding-right: 0.35rem;
  padding-top: 0.1rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.9;
}

/* Links – muted grey-blue */

a {
  color: #b2b7d9;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #d2d6ef;
  text-decoration: underline;
}

/* Blockquotes */

.post-content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 10px 10px 0;
  color: #f3f4fc;
  font-style: italic;
}

.post-content blockquote p {
  margin: 0.2rem 0;
}

/* Lists */

.post-content ul {
  padding-left: 1.4rem;
  margin: 0 0 1.4rem;
}

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

/* Horizontal rule */

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

/* Images */

.post-content img {
  max-width: 85%;
  height: auto;
  display: block;
  margin: 1.6rem auto;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Code blocks */

.post-content pre,
.post-content code {
  font-family: Menlo, Consolas, "SF Mono", "Roboto Mono", monospace;
  font-size: 0.9rem;
}

.post-content pre {
  background: #0c0d12;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 1.4rem 0;
  color: #f8f9ff;
}

.post-content code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

/* Inline code inside pre shouldn't get extra padding */

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

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 1.5rem 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile */

@media (max-width: 768px) {
  .site-header .wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    margin-top: 0.5rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .post {
    padding: 1.8rem 1.3rem 2.2rem;
    margin-top: -1.5rem;
  }
}
