/* ABOUTME: Complete stylesheet for Cosmo's blog — warm minimalism with analog feel */
/* ABOUTME: Libre Baskerville serif, terracotta accent, paper-like texture, generous whitespace */

/* ---- Reset & Base ---- */

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  color: #2C2C2C;
  background-color: #FAF8F5;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' 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.015'/%3E%3C/svg%3E");
  line-height: 1.7;
}

/* ---- Layout ---- */

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

/* ---- Header ---- */

.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E8E4DF;
}

.site-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2C2C2C;
  text-decoration: none;
  display: block;
}

.site-name:hover {
  color: #C0704A;
}

.site-tagline {
  font-size: 0.9rem;
  color: #B0A89F;
  font-style: italic;
  margin-top: 0.25rem;
}

/* ---- Post List (Homepage & Section) ---- */

.post-list {
  padding: 0;
}

.post-entry {
  margin-bottom: 0.75rem;
}

.post-entry a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-decoration: none;
  color: #2C2C2C;
  padding: 0.4rem 0;
  gap: 1rem;
}

.post-entry a:hover .post-title {
  color: #C0704A;
}

.post-entry .post-title {
  font-size: 1rem;
  transition: color 0.15s ease;
}

.post-entry .post-date {
  font-size: 0.8rem;
  color: #B0A89F;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Single Post ---- */

.post-header {
  margin-bottom: 2rem;
}

.post-header .post-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-header .post-date {
  font-size: 0.85rem;
  color: #B0A89F;
  display: block;
}

.post-mood {
  font-size: 0.85rem;
  font-style: italic;
  color: #B0A89F;
  margin-top: 0.25rem;
}

/* ---- Post Content ---- */

.post-content {
  margin-bottom: 2rem;
}

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

.post-content h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-content a {
  color: #C0704A;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: #A85D3B;
}

.post-content blockquote {
  border-left: 3px solid #C0704A;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #5A5550;
  font-style: italic;
}

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

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

.post-content code {
  font-size: 0.85em;
  background: #F0ECE7;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: #F0ECE7;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid #E8E4DF;
  margin: 2rem 0;
}

/* ---- Post Tags ---- */

.post-tags {
  margin-bottom: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #E8E4DF;
}

.tag {
  font-size: 0.8rem;
  color: #B0A89F;
  margin-right: 0.75rem;
}

.tag::before {
  content: "#";
}

/* ---- Post Navigation ---- */

.post-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid #E8E4DF;
  font-size: 0.85rem;
}

.post-nav a {
  color: #C0704A;
  text-decoration: none;
}

.post-nav a:hover {
  color: #A85D3B;
}

/* ---- Footer ---- */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #E8E4DF;
  font-size: 0.8rem;
  color: #B0A89F;
  text-align: center;
}

/* ---- Responsive ---- */

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

  .container {
    padding: 2rem 1rem;
  }

  .site-name {
    font-size: 1.5rem;
  }

  .post-entry a {
    flex-direction: column;
    gap: 0.15rem;
  }

  .post-header .post-title {
    font-size: 1.4rem;
  }
}
