/* ============================================================
   SwimIQ Dev Blog — Shared Stylesheet
   Design language: Aquatic Minimal
   Palette: navy #0A1F2C · aqua #00C2A8 · white cards · gray-100 bg
   Font: Inter (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #f3f4f6;
  color: #1a2b36;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #00C2A8;
  text-decoration: none;
  transition: color 150ms ease-out;
}

a:hover {
  color: #009e88;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ── Site header ──────────────────────────────────────────── */
.site-header {
  background-color: #0A1F2C;
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  max-width: 1200px; /* Widened for desktop */
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-header__logo-mark {
  width: 32px;
  height: 32px;
  background-color: #00C2A8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #0A1F2C;
  flex-shrink: 0;
}

.site-header__logo-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

.site-header__logo-text span {
  color: #00C2A8;
}

.site-header__nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.site-header__nav a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
  transition: color 150ms ease-out;
}

.site-header__nav a:hover {
  color: #fff;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.page {
  max-width: 1200px; /* Widened for desktop */
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Hero / page title section ────────────────────────────── */
.hero {
  margin-bottom: 48px;
  max-width: 800px; /* Keeps index page from stretching too wide */
  margin-left: auto;
  margin-right: auto;
}

.hero__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00C2A8;
  margin-bottom: 10px;
}

.hero__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: #0A1F2C;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* ── Post cards (index page) ──────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px; /* Keeps index page from stretching too wide */
  margin-left: auto;
  margin-right: auto;
}

.post-card {
  background: #fff;
  border: 1px solid #e2e8ed;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 150ms ease-out, transform 150ms ease-out;
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-card__date {
  font-size: 12px;
  color: #7a909f;
  font-weight: 500;
}

.post-card__author-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: #e6faf8;
  color: #008c78;
  padding: 3px 10px;
  border-radius: 999px;
}

.post-card__week-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: #eef2f5;
  color: #4b5d68;
  padding: 3px 10px;
  border-radius: 999px;
}

.post-card__title {
  font-size: 19px;
  font-weight: 700;
  color: #0A1F2C;
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-card:hover .post-card__title {
  color: #00C2A8;
}

.post-card__excerpt {
  font-size: 14px;
  color: #4b5d68;
  line-height: 1.6;
}

.post-card__read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #00C2A8;
  letter-spacing: 0.02em;
}

/* ── Article page ─────────────────────────────────────────── */
.article {
  background: #fff;
  border: 1px solid #e2e8ed;
  border-radius: 16px;
  padding: 48px 56px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (max-width: 600px) {
  .article {
    padding: 28px 20px;
  }
}

/* ── Desktop Text Constraints ─────────────────────────────── */
/* Centers the text elements at a readable width, but lets images go full-width */
.article__back,
.article__meta,
.article__title,
.article__byline,
.article__body > p,
.article__body > h2,
.article__body > h3,
.article__body > ul,
.article__body > ol,
.tech-tags {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article__back {
  display: flex; /* Changed from inline-flex so auto margins work */
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #7a909f;
  margin-bottom: 32px;
  transition: color 150ms ease-out;
}

.article__back:hover {
  color: #00C2A8;
}

.article__back::before {
  content: '←';
  font-size: 15px;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article__week-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: #00C2A8;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
}

.article__date {
  font-size: 13px;
  color: #7a909f;
  font-weight: 500;
}

.article__title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: #0A1F2C;
  line-height: 1.2;
  margin-bottom: 12px;
}

.article__byline {
  font-size: 14px;
  color: #4b5d68;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e2e8ed;
}

.article__byline strong {
  color: #0A1F2C;
}

/* ── Article body typography ──────────────────────────────── */
.article__body {
  font-size: 16px;
  color: #2a3d48;
  line-height: 1.75;
}

.article__body h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0A1F2C;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 3px solid #00C2A8;
}

.article__body h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0A1F2C;
  margin-top: 24px;
  margin-bottom: 8px;
}

.article__body p {
  margin-bottom: 18px;
}

.article__body ul,
.article__body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article__body li {
  margin-bottom: 6px;
}

.article__body code {
  background-color: #f0f4f7;
  color: #0A1F2C;
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 13.5px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #dde4ea;
}

.article__body pre {
  background-color: #0e2333;
  color: #c8e6f5;
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article__body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Figures / screenshots ─────────────────────────────────── */
.article__body figure {
  margin: 48px auto; 
  width: 100%;
  max-width: 1000px; /* Caps the absolute largest images so they aren't overwhelming */
}

.article__body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); 
}

.article__body figcaption {
  font-size: 13px;
  color: #7a909f;
  margin-top: 12px;
  text-align: center;
  font-style: italic;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- NEW: Utility classes for smaller screenshots --- */

/* Use for large full-browser landscape screenshots */
.article__body figure.img-lg {
  max-width: 760px;
}

/* Use for medium modals or single-column features */
.article__body figure.img-md {
  max-width: 700px;
}

/* Use for small popups like Login, Signup, and Role Selection */
.article__body figure.img-sm {
  max-width: 400px;
}


/* ── Tech tag pills ─────────────────────────────────────────── */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px; 
  margin-bottom: 24px;
}

.tech-tag {
  font-size: 12px;
  font-weight: 500;
  background-color: #eef2f5;
  color: #4b5d68;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #dde4ea;
}

/* ── Site footer ──────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: #7a909f;
  border-top: 1px solid #e2e8ed;
  margin-top: 32px;
}

.site-footer a {
  color: #00C2A8;
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 540px) {
  .page {
    padding: 24px 16px 56px;
  }

  .post-card {
    padding: 20px;
  }

  .site-header__nav {
    display: none;
  }
}