/* ===================================================
   RBI Studios — Stone-inspired CSS
   Inter font · Zinc palette · Dark mode
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..800;1,14..32,300..800&display=swap');

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

/* === DESIGN TOKENS === */
:root {
  --bg:          #09090b;
  --bg-subtle:   #18181b;
  --text:        #fafafa;
  --text-muted:  #a1a1aa;
  --border:      #27272a;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

/* === BASE === */
html {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 64px;
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.site-logo:hover img {
  transform: scale(1.12);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.nav-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-radius: 0.375rem;
  transition: color 0.15s, background-color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background-color: var(--bg-subtle);
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-link {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--text);
}

/* === HERO === */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 680px;
}

.hero-description {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn::before {
  content: '';
  display: inline-block;
  width: 27px;
  height: 31px;
  background: url('/public/dashund1.png') center / contain no-repeat;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background-color 0.15s;
  line-height: 1;
}

.btn-primary {
  background-color: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.75;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* === DISCORD SECTION === */
.discord-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.discord-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  color: #5865f2;
  /* SVG inherits currentColor so set it via filter for an img tag */
  filter: invert(35%) sepia(80%) saturate(600%) hue-rotate(210deg) brightness(105%);
}

.discord-heading {
  font-size: 0.9375rem;
  font-weight: 600;
}

.discord-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.discord-btn {
  margin-left: auto;
}

@media (max-width: 500px) {
  .discord-btn { margin-left: 0; }
}

/* === SECTION LABEL === */
.section-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* === FEATURED / ARCHIVE SECTION === */
.posts-section {
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.post-list {
  list-style: none;
}

.post-item {
  border-bottom: 1px solid var(--border);
}

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

.post-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.125rem 0;
  transition: opacity 0.15s;
}

.post-link:hover {
  opacity: 0.65;
}

.post-title {
  font-size: 0.9375rem;
  font-weight: 500;
}

.post-excerpt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* === PAGE HEADER === */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.page-desc {
  margin-top: 0.625rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* === ARTICLE === */
.article-header {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.meta-dot {
  color: var(--border);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}

.tag:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.article-content {
  padding: 3rem 0 4rem;
}

.article-body {
  max-width: 680px;
  font-size: 1rem;
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 2.5rem 0 1rem;
}

.article-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

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

.article-body li {
  margin-bottom: 0.375rem;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--text-muted);
}

.article-body code {
  font-size: 0.875em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
}

.article-body pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
}

.article-back {
  margin-bottom: 3rem;
}

.article-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.article-back a:hover {
  color: var(--text);
}

/* === TAGS PAGE === */
.tags-section {
  padding: 3rem 0 4rem;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.tag-card {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
  transition: background-color 0.15s, border-color 0.15s;
}

.tag-card:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.tag-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === 404 === */
.not-found {
  padding: 7rem 0;
}

.not-found-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.not-found-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.not-found-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 2rem;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .post-link {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-date {
    order: -1;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .posts-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
