/* Tech Digest - clean, readable, image-friendly */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #1f2328;
  background: #fdfdfd;
}

a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Two-column shell: profile sidebar + page content.
   flex-direction row follows html[dir], so the sidebar mirrors to the
   right automatically on RTL (Persian/Arabic) pages - no extra rules needed. */
.page-shell {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

/* Profile sidebar */
.profile-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 24px;
  background: #14161a;
  color: #e6edf3;
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  background: #2a2f38;
  border: 3px solid #3a3f4b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { font-size: 1.6rem; font-weight: 700; color: #9aa4b2; }
.profile-name { font-size: 1.1rem; margin: 0 0 4px; }
.profile-role { font-size: 0.88rem; color: #9aa4b2; margin: 0 0 18px; line-height: 1.4; }
.profile-meta { list-style: none; margin: 0; padding: 0; text-align: left; }
[dir="rtl"] .profile-meta { text-align: right; }
.profile-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-top: 1px solid #262a31;
  font-size: 0.9rem;
}
.profile-meta li:first-child { border-top: none; }
.profile-meta li svg { flex: none; color: #9aa4b2; }
.profile-meta li a { display: flex; align-items: center; gap: 8px; color: #e6edf3; }
.profile-meta li a:hover { color: #58a6ff; text-decoration: none; }
.profile-location span { color: #c9d1d9; }

/* Page content column */
.page-content { flex: 1; min-width: 0; max-width: 780px; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e4e7ea;
}
.site-header .site-title { font-weight: 700; font-size: 1.05rem; color: #1f2328; }
.site-header nav a { margin-left: 16px; font-size: 0.92rem; }
[dir="rtl"] .site-header nav a { margin-left: 0; margin-right: 16px; }

.site-main { padding: 8px 0 20px; }

/* Hero (home page) */
.hero h1 { font-size: 2.1rem; margin-bottom: 6px; }
.hero .tagline { color: #57606a; font-size: 1.05rem; }
.hero .byline { font-size: 0.95rem; }
.hero .langs-available { color: #57606a; font-size: 0.95rem; }
.hero .lang-name { white-space: nowrap; }

/* Digest archive list */
.digest-list { list-style: none; padding: 0; }
.digest-list li { margin-bottom: 26px; }
.digest-list a { font-weight: 600; font-size: 1.08rem; }
.digest-list time { display: block; color: #8b949e; font-size: 0.85rem; margin: 2px 0 4px; }
.digest-list p { margin: 0; color: #57606a; font-size: 0.95rem; }
.digest-list p.langs { margin-top: 6px; }
.digest-list p.langs a {
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Daily digest articles */
.digest h1 { font-size: 1.9rem; line-height: 1.25; }
.digest h2 {
  font-size: 1.35rem;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e7ea;
}
.digest img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e4e7ea;
}
.digest blockquote {
  margin: 12px 0;
  padding: 10px 18px;
  border-left: 4px solid #0969da;
  background: #f6f8fa;
  border-radius: 0 8px 8px 0;
  color: #3d444d;
}

/* Site-wide footer: curator credit on every page */
.site-footer {
  padding: 22px 0 0;
  margin-top: 12px;
  border-top: 1px solid #e4e7ea;
  color: #57606a;
  font-size: 0.9rem;
}
.site-footer p { margin: 4px 0; }

/* Translated editions: Persian (fa) and other RTL pages render right-to-left */
[dir="rtl"] .digest blockquote {
  border-left: 0;
  border-right: 4px solid #0969da;
  border-radius: 8px 0 0 8px;
}
[dir="rtl"] body { line-height: 1.9; }

/* Small screens: stack the sidebar above the content instead of beside it */
@media (max-width: 760px) {
  .page-shell { flex-direction: column; padding: 20px 16px 40px; }
  .profile-sidebar { position: static; width: 100%; flex: none; }
}
