/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Deepanshu's Blog — Warm Cream Theme
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #FFEDD4;
  --bg-surface: #FFF5E6;
  --text: #2D1810;
  --text-secondary: #5C3D2E;
  --text-muted: #8B6F5E;
  --accent: #6B3A2A;
  --link: #5C3317;
  --link-hover: #3E1F0D;
  --border: #DCC5A8;
  --code-bg: #FFF0D9;
  --tag-bg: #F5DFC0;
  --tag-text: #6B4F3A;
  --max-width: 860px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ━━ Layout ━━ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ━━ Header / Nav ━━ */

header {
  padding: 2.5rem 0 0.5rem;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

nav {
  margin-top: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

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

/* ━━ Blog Index ━━ */

.blog-list {
  margin-top: 2.5rem;
}

.blog-item {
  margin-bottom: 2.4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

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

.blog-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.blog-title {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.15s;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.blog-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.blog-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.blog-tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-tag {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

/* ━━ Article ━━ */

article {
  margin-top: 2rem;
  margin-bottom: 4rem;
}

article h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.3rem;
}

article .post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

article h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

article p {
  margin-bottom: 1.2rem;
}

article a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

article a:hover {
  color: var(--link-hover);
}

article img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
}

article blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

article ul, article ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.4rem;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ━━ Code ━━ */

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--accent);
}

pre {
  background: #2D1810;
  color: #FFF0D9;
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #FFF0D9;
}

/* ━━ Footer ━━ */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
}

footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

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

/* ━━ Back Link ━━ */

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

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

.back-link::before {
  content: '\2190 ';
}

/* ━━ Responsive ━━ */

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

  .container {
    padding: 0 1.2rem;
  }

  article h1 {
    font-size: 1.7rem;
  }

  article h2 {
    font-size: 1.25rem;
  }

  nav {
    gap: 0.8rem;
  }
}
