/* ============================================
   zyatnin.me — Style Sheet
   Technical/engineering aesthetic
   ============================================ */

/* --- CSS Custom Properties (Theming) --- */
:root {
  /* Light theme */
  --bg: #f5f4f0;
  --bg-secondary: #eae9e4;
  --bg-card: #ffffff;
  --text-primary: #1a1b2e;
  --text-secondary: #4a4b5e;
  --text-muted: #7a7b8e;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-bg: rgba(14, 165, 233, 0.08);
  --border: #d4d3ce;
  --border-light: #e8e7e2;
  --code-bg: #eae9e4;
  --shadow-sm: 0 1px 3px rgba(26, 27, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 27, 46, 0.08);
  --shadow-lg: 0 8px 30px rgba(26, 27, 46, 0.12);
  --header-bg: rgba(245, 244, 240, 0.85);
  --terminal-bg: #1a1b2e;
  --terminal-text: #e0e0e0;
  --terminal-accent: #0ea5e9;
  --tag-bg: rgba(14, 165, 233, 0.1);
  --tag-text: #0284c7;
  --scrollbar-thumb: #c4c3be;
  --scrollbar-track: transparent;
}

[data-theme="dark"] {
  --bg: #1a1b2e;
  --bg-secondary: #232438;
  --bg-card: #2a2b42;
  --text-primary: #e8e8ec;
  --text-secondary: #a8a8bc;
  --text-muted: #6e6e82;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-bg: rgba(56, 189, 248, 0.1);
  --border: #3a3b52;
  --border-light: #2e2f46;
  --code-bg: #232438;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(26, 27, 46, 0.85);
  --terminal-bg: #0f0f1a;
  --terminal-text: #e0e0e0;
  --terminal-accent: #38bdf8;
  --tag-bg: rgba(56, 189, 248, 0.12);
  --tag-text: #7dd3fc;
  --scrollbar-thumb: #3a3b52;
  --scrollbar-track: transparent;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

code {
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  background: var(--terminal-bg);
  color: var(--terminal-text);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 780px;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.header__logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo svg {
  width: 28px;
  height: 28px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--accent);
}

.header__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  width: 36px;
  height: 36px;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-sun {
  display: block;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.lang-switcher button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.lang-switcher button:not(:last-child) {
  border-right: 1px solid var(--border);
}

.lang-switcher button:hover {
  color: var(--accent);
  background: var(--accent-bg);
}

.lang-switcher button.active {
  color: var(--accent);
  background: var(--accent-bg);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.hamburger:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hamburger svg {
  width: 18px;
  height: 18px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 99;
  padding: 2rem 1.25rem;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  font-size: 1.1rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* --- Hero Section --- */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, var(--accent-bg) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__greeting::before {
  content: '>';
  opacity: 0.5;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Terminal Block */
.terminal {
  background: var(--terminal-bg);
  border-radius: 10px;
  padding: 0;
  max-width: 560px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 2rem;
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }

.terminal__body {
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--terminal-text);
}

.terminal__line {
  display: block;
  margin-bottom: 0.25rem;
}

.terminal__prompt {
  color: var(--terminal-accent);
}

.terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--terminal-accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Typing animation */
.typing-line {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typing 1.5s steps(40) forwards;
}

.typing-line:nth-child(2) { animation-delay: 0.5s; }
.typing-line:nth-child(3) { animation-delay: 1s; }
.typing-line:nth-child(4) { animation-delay: 1.5s; }

@keyframes typing {
  to { width: 100%; }
}

/* Hero CTA */
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* --- Section --- */
.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section__label::before {
  content: '//';
  opacity: 0.5;
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section__divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.75rem;
  border-radius: 2px;
}

/* --- About --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about__tech-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 20px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.tech-tag:hover {
  border-color: var(--accent);
}

.about__interests {
  margin-top: 1.5rem;
}

.about__interests ul {
  list-style: none;
  padding: 0;
}

.about__interests li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about__interests li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

/* About Stats */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.stat-card__value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Projects --- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 8px;
  color: var(--accent);
}

.project-card__name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.project-card__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: var(--code-bg);
  color: var(--text-muted);
  border-radius: 4px;
}

/* --- Blog Highlights / Blog Index --- */
.blog-highlights__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.blog-card__topic {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.blog-card__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace;
}

.blog-card__read-more {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-card__read-more::after {
  content: '→';
  transition: transform 0.2s;
}

.blog-card:hover .blog-card__read-more::after {
  transform: translateX(4px);
}

/* Blog Index */
.blog-topic-group {
  margin-bottom: 3rem;
}

.blog-topic-group__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-topic-group__title::before {
  content: '#';
  color: var(--accent);
}

.blog-topic-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* --- Blog Article --- */
.article {
  padding: 3rem 0 5rem;
}

.article__header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.article__back:hover {
  color: var(--accent);
}

.article__back::before {
  content: '←';
}

.article__topic {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.article__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Article Body */
.article__body {
  max-width: 100%;
}

.article__body h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article__body h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article__body p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  font-size: 0.95rem;
}

.article__body ul,
.article__body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article__body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article__body pre {
  margin: 1.5rem 0;
}

.article__body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-bg);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Syntax highlighting (simple) */
.kw { color: #c678dd; }
.str { color: #98c379; }
.cm { color: #5c6370; font-style: italic; }
.fn { color: #61afef; }
.num { color: #d19a66; }
.op { color: #56b6c2; }
.var { color: #e06c75; }

[data-theme="dark"] .kw { color: #c678dd; }
[data-theme="dark"] .str { color: #98c379; }
[data-theme="dark"] .cm { color: #5c6370; }
[data-theme="dark"] .fn { color: #61afef; }
[data-theme="dark"] .num { color: #d19a66; }

/* Related articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.related-articles__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__link svg {
  width: 16px;
  height: 16px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: calc(80vh - 60px);
    padding: 2rem 0;
  }

  .hero__name {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .blog-highlights__grid,
  .blog-topic-group__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .terminal {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .about__stats {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}

/* --- RTL Support --- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .hero__greeting::before {
  content: '<';
}

[dir="rtl"] .section__label::before {
  content: '//';
}

[dir="rtl"] .about__interests li {
  padding-left: 0;
  padding-right: 1.25rem;
}

[dir="rtl"] .about__interests li::before {
  left: auto;
  right: 0;
  content: '←';
}

[dir="rtl"] .article__back::before {
  content: '→';
}

[dir="rtl"] .blog-card__read-more::after {
  content: '←';
}

[dir="rtl"] .blog-card:hover .blog-card__read-more::after {
  transform: translateX(-4px);
}

[dir="rtl"] .article__body blockquote {
  border-left: none;
  border-right: 3px solid var(--accent);
  border-radius: 8px 0 0 8px;
}

[dir="rtl"] .article__body ul,
[dir="rtl"] .article__body ol {
  padding-left: 0;
  padding-right: 1.5rem;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible,
.fade-in.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- View All Link --- */
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 2rem;
}

.view-all::after {
  content: '→';
  transition: transform 0.2s;
}

.view-all:hover::after {
  transform: translateX(4px);
}

[dir="rtl"] .view-all::after {
  content: '←';
}

[dir="rtl"] .view-all:hover::after {
  transform: translateX(-4px);
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 0;
}

/* --- Blog page header --- */
.page-header {
  padding: 3rem 0 1rem;
}

.page-header__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.page-header__desc {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}
