/* =====================
   BLOG WRAPPER
   ===================== */

.blog-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: var(--background-color);
  padding: 60px 1.5rem 4rem;
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 1025px) {
  .blog-wrapper {
    padding: 80px 3rem 4rem;
  }
}

/* =====================
   BLOG HEADER
   ===================== */

.blog-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--color-grey-stroke);
  padding-bottom: 2rem;
}

.blog-header__title {
  font-family: var(--text-righteous);
  font-size: 3rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.blog-header__subtitle {
  font-family: var(--text-roboto);
  font-size: 1rem;
  color: var(--color-grey);
  font-weight: 300;
}

/* =====================
   POST LIST
   ===================== */

.post-year {
  margin-bottom: 2.5rem;
}

.post-year__label {
  font-family: var(--text-roboto);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 1rem;
}

.post-year__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-grey-stroke);
  transition: background-color var(--transition-fast);
}

.post-item:first-child {
  border-top: 1px solid var(--color-grey-stroke);
}

.post-item__date {
  font-family: var(--text-roboto);
  font-size: 0.8rem;
  color: var(--color-grey);
  white-space: nowrap;
  min-width: 50px;
  flex-shrink: 0;
}

.post-item__title {
  font-family: var(--text-roboto);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.4;
  transition: color var(--transition-fast);
}

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

/* =====================
   SINGLE POST
   ===================== */

.post {
  max-width: 640px;
}

.post__header {
  margin-bottom: 2.5rem;
}

.post__back {
  font-family: var(--text-roboto);
  font-size: 0.85rem;
  color: var(--color-grey);
  transition: color var(--transition-fast);
  display: inline-block;
  margin-bottom: 1.5rem;
}

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

.post__date {
  font-family: var(--text-roboto);
  font-size: 0.8rem;
  color: var(--color-grey);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.post__title {
  font-family: var(--text-roboto);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.2;
}

@media (min-width: 769px) {
  .post__title {
    font-size: 2.5rem;
  }
}

/* =====================
   POST BODY
   ===================== */

.post__body {
  font-family: var(--text-roboto);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--color-grey);
  line-height: 1.8;
}

/* Paragraphs & generic blocks */
.post__body p,
.post__body div {
  margin-bottom: 1.5rem;
}

/* Headings */
.post__body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.post__body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.post__body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 1.75rem 0 0.5rem;
  line-height: 1.3;
}

/* Inline text styles */
.post__body strong,
.post__body b {
  font-weight: 700;
  color: var(--color-white);
}

.post__body em,
.post__body i {
  font-style: italic;
}

.post__body u {
  text-decoration: underline;
}

.post__body s,
.post__body strike {
  text-decoration: line-through;
}

.post__body sub { vertical-align: sub; font-size: 0.8em; }
.post__body sup { vertical-align: super; font-size: 0.8em; }

/* <font> tags generated by execCommand — neutralise size/color overrides */
.post__body font {
  font-size: inherit;
  font-family: inherit;
}

/* Links */
.post__body a {
  color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.post__body a:hover {
  border-bottom-color: var(--color-accent);
}

/* Inline code */
.post__body code {
  font-family: monospace;
  font-size: 0.9em;
  background-color: var(--secondary-color);
  color: var(--color-accent);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Code blocks */
.post__body pre {
  background-color: var(--secondary-color);
  border: 1px solid var(--color-grey-stroke);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post__body pre code {
  background: none;
  padding: 0;
  color: var(--color-white);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Lists */
.post__body ul,
.post__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post__body ul li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.post__body ol li {
  margin-bottom: 0.5rem;
  list-style: decimal;
}

/* Blockquote */
.post__body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--color-grey);
  font-style: italic;
}

/* Horizontal rule */
.post__body hr {
  border: none;
  border-top: 1px solid var(--color-grey-stroke);
  margin: 2rem 0;
}

/* Images */
.post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 1.5rem 0;
}

/* Tables */
.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.post__body th,
.post__body td {
  border: 1px solid var(--color-grey-stroke);
  padding: 0.6rem 0.875rem;
  text-align: left;
}

.post__body th {
  font-weight: 700;
  color: var(--color-white);
  background-color: var(--secondary-color);
}

/* Highlight (mark) */
.post__body mark {
  background-color: rgba(255, 214, 0, 0.25);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

/* =====================
   POST FOOTER
   ===================== */

.post__footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-grey-stroke);
}
