/* ── Light mode warm background ── */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #faf8f4;
}

/* ── Header ── */
.md-header__button.md-logo svg {
  display: none;
}
.md-header__button.md-logo::after {
  content: "ruiz.sh";
  font-weight: 600;
  font-size: 0.9rem;
}
.md-header__title {
  flex-grow: 1;
}
.md-header__title .md-header__ellipsis {
  visibility: hidden;
}
.md-header__source {
  display: none;
}

/* ── Hide headerlinks ── */
.home-hero .headerlink,
.articles-list .headerlink {
  display: none;
}

/* ── Home hero ── */
.home-hero {
  max-width: 860px;
  margin: 1rem auto 2.5rem;
  text-align: center;
}
.home-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.home-hero p {
  font-size: 0.88rem;
  opacity: 0.75;
  line-height: 1.6;
}

/* ── Recent posts section ── */
.home-posts {
  max-width: 760px;
  margin: 0 auto 2rem;
}
.home-posts h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ── Post list ── */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.25rem 0;
}
@media (max-width: 600px) {
  .post-list li {
    flex-direction: column;
    gap: 0.1rem;
  }
}
.post-list li + li {
  border-top: 1px solid var(--md-default-fg-color--lightest);
}
.post-list time {
  font-size: 0.72rem;
  opacity: 0.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.post-list a {
  font-size: 0.82rem;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: color 0.15s;
}
.post-list a:hover {
  color: var(--md-accent-fg-color);
}
.post-list__all {
  margin-top: 1rem;
  font-size: 0.9rem;
}
.post-list__all a {
  color: var(--md-default-fg-color);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.15s;
}
.post-list__all a:hover {
  opacity: 1;
}

/* ── Articles page ── */
.articles-list {
  max-width: 860px;
  margin: 1rem auto;
}
.articles-list h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ── Article page ── */
.article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.article-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--md-default-fg-color);
  opacity: 0.45;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-bottom: 0.5rem;
}
.article-back:hover {
  opacity: 1;
}

.article-header {
  margin-bottom: 2.5rem;
}
.article-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.75rem 0 0.5rem;
}
.article-meta {
  font-size: 0.82rem;
  opacity: 0.4;
}

/* hide the duplicate h1 that comes from markdown content */
.article-body > h1:first-child {
  display: none;
}

.article-body {
  font-size: 0.95rem;
  line-height: 1.7;
}
.article-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.article-body p {
  margin-bottom: 1.25rem;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin: 2.5rem 0;
}
.article-body blockquote {
  border-left: 3px solid var(--md-default-fg-color--lightest);
  padding-left: 1rem;
  opacity: 0.75;
  margin: 1.5rem 0;
}

/* end of article styles */

/* ── Tag badges ── */
.tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.1em 0.45em;
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.4;
}
.tag--homelab {
  background: #e0f2f1;
  color: #00796b;
}
.tag--work {
  background: #e3f2fd;
  color: #1565c0;
}
.tag--career {
  background: #fce4ec;
  color: #c62828;
}
.tag--cert {
  background: #fff3e0;
  color: #e65100;
}

[data-md-color-scheme="slate"] .tag--homelab {
  background: #00796b33;
  color: #80cbc4;
}
[data-md-color-scheme="slate"] .tag--work {
  background: #1565c033;
  color: #90caf9;
}
[data-md-color-scheme="slate"] .tag--career {
  background: #c6282833;
  color: #ef9a9a;
}
[data-md-color-scheme="slate"] .tag--cert {
  background: #e6510033;
  color: #ffcc80;
}
