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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #040B15;
  --surface: #0A1525;
  --nav-bg: rgba(4,11,21,0.9);
  --text-primary: #F0F4F8;
  --text-secondary: rgba(240,244,248,0.68);
  --text-muted: rgba(240,244,248,0.42);
  --border: rgba(255,255,255,0.06);
  --border-mid: rgba(255,255,255,0.08);
  --accent: #8ECAE6;
  --accent2: #7BBEC4;
}

html.sepia {
  --bg: #F5F0E8;
  --surface: #EDE8DC;
  --nav-bg: rgba(245,240,232,0.92);
  --text-primary: #2C2A22;
  --text-secondary: rgba(44,42,34,0.72);
  --text-muted: rgba(44,42,34,0.45);
  --border: rgba(44,42,34,0.08);
  --border-mid: rgba(44,42,34,0.12);
  --accent: #4A7A8A;
  --accent2: #4A8A87;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ── Navigation ── */

nav.blog-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

nav.blog-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

nav.blog-nav a:hover {
  opacity: 0.75;
}

nav.blog-nav span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Main content ── */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

/* ── Article header ── */

article header {
  margin-bottom: 3rem;
}

/* ── Headings ── */

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

h1 .accent {
  background: linear-gradient(135deg, #8ECAE6, #7BBEC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
}

/* ── Meta ── */

.meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Body text ── */

p {
  line-height: 1.75;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

li {
  line-height: 1.75;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

/* ── Table ── */

.table-example {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.table-example table {
  width: 100%;
  border-collapse: collapse;
}

.table-example th {
  text-align: left;
  padding: 0.6rem 1rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-mid);
}

.table-example td {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

/* ── CTA box ── */

.cta-box {
  background: linear-gradient(135deg, rgba(122, 180, 201, 0.08), rgba(123, 190, 196, 0.05));
  border: 1px solid rgba(122, 180, 201, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.cta-box p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #7AB4C9, #7BBEC4);
  color: #040B15;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.88;
}

/* ── Footer ── */

footer.blog-footer {
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer.blog-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

footer.blog-footer a:hover {
  color: var(--accent);
}

/* ── Language selector ── */

.blog-lang-select {
  position: relative;
}

.blog-lang-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s;
}

.blog-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.blog-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 0.4rem;
  min-width: 120px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.blog-lang-dropdown.open {
  display: block;
}

.blog-lang-dropdown a {
  display: block;
  padding: 0.45rem 0.8rem;
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.blog-lang-dropdown a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary) !important;
  opacity: 1 !important;
}

.blog-lang-dropdown a.active {
  color: #8ECAE6 !important;
  font-weight: 600;
}

/* ── Theme toggle ── */

.blog-theme-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.32rem 0.55rem;
  line-height: 1;
  transition: background 0.2s;
}

.blog-theme-btn:hover {
  background: rgba(255,255,255,0.1);
}

html.sepia .blog-theme-btn {
  background: rgba(0,0,0,0.05);
}

html.sepia .blog-theme-btn:hover {
  background: rgba(0,0,0,0.1);
}

html.sepia .blog-lang-btn {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary);
}

html.sepia .blog-lang-dropdown {
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

html.sepia .blog-lang-dropdown a:hover {
  background: rgba(0,0,0,0.06);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  main {
    padding: 6rem 1.2rem 3rem;
  }

  h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
}
