@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg: #050508;
  --bg2: #0a0a10;
  --bg3: #0f0f18;
  --accent: #7b2fff;
  --accent2: #ff2fd4;
  --accent3: #2fffb4;
  --text: #c8c8d8;
  --text-dim: #5a5a7a;
  --border: #1e1e30;
  --glow: rgba(123, 47, 255, 0.4);
  --glow2: rgba(255, 47, 212, 0.3);
}

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

/* ── CUSTOM CURSOR ── */
*, *::before, *::after, a, button {
  cursor: url('cursor.ani'), auto !important;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── SCANLINES ── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
}

/* ── NOISE OVERLAY ── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: -200%;
  z-index: 999;
  width: 400%;
  height: 400%;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  animation: noiseShift 0.4s steps(1) infinite;
}

@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -3%); }
  50%  { transform: translate(3%, 1%); }
  75%  { transform: translate(-1%, 4%); }
  100% { transform: translate(2%, -2%); }
}

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ── LOGO GLITCH ── */
.logo {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 0 0 12px var(--glow);
  position: relative;
  cursor: default;
  user-select: none;
}

.logo::before,
.logo::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

.logo::before {
  color: var(--accent2);
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation: glitchTop 4s infinite;
  opacity: 0;
}

.logo::after {
  color: var(--accent3);
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation: glitchBot 4s infinite;
  opacity: 0;
}

@keyframes glitchTop {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91%  { opacity: 1; transform: translateX(-3px); }
  93%  { opacity: 1; transform: translateX(3px); }
  95%  { opacity: 1; transform: translateX(-2px); }
  97%  { opacity: 0; }
}

@keyframes glitchBot {
  0%, 88%, 100% { opacity: 0; transform: none; }
  89%  { opacity: 1; transform: translateX(4px); }
  92%  { opacity: 1; transform: translateX(-4px); }
  94%  { opacity: 1; transform: translateX(2px); }
  96%  { opacity: 0; }
}

/* ── NAV ── */
nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 3px;
  transition: color 0.2s, text-shadow 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── LANG SWITCH ── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active,
.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

.lang-sep { color: var(--text-dim); font-size: 0.7rem; }

/* ── MAIN ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── TERMINAL CONSOLE ── */
.term-section {
  border-bottom: 1px solid var(--border);
  background: #000;
  overflow: hidden;
}

.term-inner {
  display: flex;
  align-items: stretch;
}

.term-output {
  display: block;
  flex: 0 0 400px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #33ff41;
  margin: 0;
  padding: 28px 32px 32px;
  white-space: pre;
  overflow-x: hidden;
  min-height: 260px;
  text-shadow: 0 0 8px rgba(51, 255, 65, 0.45);
  background: transparent;
}

.term-art {
  flex: 1 1 auto;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1rem;
  line-height: 1.5;
  color: #33ff41;
  margin: 0;
  padding: 16px 16px 20px 0;
  white-space: pre;
  text-shadow: 0 0 8px rgba(51, 255, 65, 0.45);
  opacity: 0;
  transition: opacity 1.8s ease-in;
  overflow: hidden;
}

.term-art--visible {
  opacity: 1;
}

.term-cur {
  color: #33ff41;
  animation: blink 1s step-end infinite;
}

@media (max-width: 600px) {
  .term-inner {
    flex-direction: column;
  }
  .term-art {
    display: none;
  }
  .term-output {
    font-size: 0.82rem;
    padding: 16px 14px 20px;
    min-height: 200px;
  }
}

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.glitch-title {
  font-family: 'VT323', monospace;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.1;
  color: var(--text);
  position: relative;
}

.glitch-title .t {
  display: block;
  position: relative;
}

.glitch-title .t::before,
.glitch-title .t::after {
  content: attr(data-ru);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}

.glitch-title .t::before {
  color: var(--accent2);
  animation: titleGlitch1 6s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  opacity: 0;
}

.glitch-title .t::after {
  color: var(--accent3);
  animation: titleGlitch2 6s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 85%, 0 85%);
  opacity: 0;
}

@keyframes titleGlitch1 {
  0%, 80%, 100% { opacity: 0; transform: none; }
  81% { opacity: 1; transform: translateX(-6px) skewX(-2deg); }
  84% { opacity: 1; transform: translateX(5px); }
  87% { opacity: 0; }
}

@keyframes titleGlitch2 {
  0%, 82%, 100% { opacity: 0; transform: none; }
  83% { opacity: 1; transform: translateX(8px); }
  86% { opacity: 1; transform: translateX(-4px) skewX(1deg); }
  89% { opacity: 0; }
}

.hero-sub {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
  letter-spacing: 4px;
  text-transform: lowercase;
}

.ascii-art {
  font-size: 0.6rem;
  line-height: 1.4;
  color: var(--accent);
  opacity: 0.4;
  text-shadow: 0 0 6px var(--glow);
  white-space: pre;
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--accent3);
  text-transform: uppercase;
  margin: 56px 0 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── POSTS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.post-card {
  background: var(--bg2);
  padding: 28px;
  border: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--accent);
  transition: height 0.4s;
  box-shadow: 0 0 12px var(--glow);
}

.post-card:hover {
  background: var(--bg3);
  border-color: var(--border);
}

.post-card:hover::before { height: 100%; }

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

.post-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.post-tag {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  padding: 1px 6px;
  opacity: 0.7;
}

.post-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.post-title a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

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

.post-excerpt {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.post-read-more {
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--accent3);
  transition: color 0.2s, text-shadow 0.2s;
}

.post-read-more:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

/* ── TERMINAL LINE ── */
.divider-section {
  margin: 60px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.terminal-line {
  font-size: 0.75rem;
  color: var(--accent3);
  letter-spacing: 2px;
  opacity: 0.6;
}

.cursor-blink::after {
  content: '▌';
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 3px;
}

.footer-noise {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  font-style: italic;
  opacity: 0.5;
}

/* ══════════════════════════
   BLOG PAGE
══════════════════════════ */
.blog-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
}

.blog-header h1 {
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: 6px;
  text-shadow: 0 0 20px var(--glow);
}

.blog-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 3px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--accent3);
  color: var(--accent3);
  box-shadow: 0 0 8px rgba(47,255,180,0.2);
}

.blog-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.blog-list-item {
  background: var(--bg2);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 100px 72px 1fr auto;
  gap: 24px;
  align-items: center;
  border-left: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.blog-list-thumb {
  width: 72px;
  height: 72px;
  min-width: 72px;
  max-width: 72px;
  max-height: 72px;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: contrast(1.05);
  display: block;
  align-self: center;
}
.blog-list-thumb-empty {
  width: 72px;
  height: 72px;
  min-width: 72px;
  background: var(--bg3);
  border: 1px solid var(--border);
  align-self: center;
}

.blog-list-item:hover {
  background: var(--bg3);
  border-left-color: var(--accent);
}

/* Stretched link — весь блок кликабелен */
.blog-list-content h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.blog-list-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding-top: 3px;
}

.blog-list-content h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.blog-list-content h3 a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.blog-list-content h3 a:hover { color: var(--accent); }

.blog-list-content p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.blog-list-tag {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  padding: 2px 8px;
  align-self: start;
  white-space: nowrap;
  opacity: 0.7;
}

/* ══════════════════════════
   ABOUT PAGE
══════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  padding: 60px 0;
}

.about-text h1 {
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: 6px;
  text-shadow: 0 0 20px var(--glow);
  margin-bottom: 32px;
}

.about-text p {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 20px;
}

.about-text p .hl {
  color: var(--accent2);
}

/* Win95 frame for 3D model */
.about-win95-frame {
  border: 2px solid #848484;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
  background: #c0c0c0;
  width: 100%;
  max-width: 420px;
}

.about-win95-titlebar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.about-win95-title {
  letter-spacing: 1px;
}

.about-win95-btns {
  display: flex;
  gap: 2px;
}

.about-win95-btns span {
  display: inline-block;
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  color: #000;
  font-size: 0.7rem;
  text-align: center;
  line-height: 13px;
  border: 1px solid #848484;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff;
  cursor: default;
}

.about-win95-body {
  position: relative;
  width: 100%;
  height: 480px;
  background: #c0c0c0;
  padding: 4px;
  box-sizing: border-box;
}

#char-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1001;
}

.char-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #000080;
  letter-spacing: 2px;
}

.about-win95-statusbar {
  background: #c0c0c0;
  border-top: 1px solid #848484;
  padding: 2px 6px 3px;
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  color: #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #848484;
  margin: 0 4px 4px;
  display: flex;
  align-items: center;
}

/* Bio text below */
.about-bio {
  padding: 40px 0 60px;
  max-width: 680px;
  border-top: 1px solid var(--border);
}

.about-bio p {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 20px;
}

.about-bio p .hl {
  color: var(--accent2);
}

.about-sidebar {
  border-left: 1px solid var(--border);
  padding-left: 40px;
}

.sidebar-block {
  margin-bottom: 36px;
}

.sidebar-block h4 {
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: var(--accent3);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sidebar-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-block ul li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.sidebar-block ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.contact-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.contact-link:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}

/* ══════════════════════════
   POST PAGE
══════════════════════════ */
.post-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0 80px;
}

.post-layout .post-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.post-layout h1 {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-layout .post-meta-bar {
  display: flex;
  gap: 18px;
  align-items: center;
}

.post-body {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text);
}

.post-body h2 {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent3);
  letter-spacing: 3px;
  margin: 40px 0 16px;
  text-transform: uppercase;
}

.post-body p { margin-bottom: 18px; }

.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 10px 20px;
  margin: 28px 0;
  color: var(--text-dim);
  font-style: italic;
  background: var(--bg2);
}

.post-body a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.post-body a:hover { border-bottom-color: var(--accent2); }

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── SKULL GIFs ── */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.skull-gif {
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ── SWORD DIVIDER ── */
.sword-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  overflow: visible;
  padding: 0 0 8px;
}

.sword-wrap {
  width: 200px;
  height: 55px;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
}

.sword-gif {
  width: 55px;
  height: 200px;
  image-rendering: pixelated;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
}

.sword-wrap-left .sword-gif {
  transform: translate(-50%, -50%) rotate(90deg);
}

.sword-wrap-right .sword-gif {
  transform: translate(-50%, -50%) rotate(-90deg);
}

/* ── WEB 1.0 BANNER WALL ── */
.web1-wall {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.web1-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.web1-row img {
  display: block;
  image-rendering: pixelated;
  max-height: 80px;
}

.web1-buttons img {
  max-height: 40px;
}

/* ── MARQUEE ASCII ── */
.marquee-ascii-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg2);
}

.marquee-ascii-wrap::-webkit-scrollbar {
  height: 3px;
}
.marquee-ascii-wrap::-webkit-scrollbar-track { background: var(--bg2); }
.marquee-ascii-wrap::-webkit-scrollbar-thumb { background: var(--accent); }

.marquee-ascii {
  font-family: 'Courier New', Courier, monospace;
  font-size: 3px;
  line-height: 1.1;
  color: var(--accent);
  opacity: 0.3;
  white-space: pre;
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  text-shadow: 0 0 3px var(--glow);
  letter-spacing: 0;
}

.marquee-ascii-wrap:hover .marquee-ascii {
  opacity: 0.5;
}

/* ══════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════ */

/* Убираем кастомный курсор на тач-устройствах */
@media (hover: none) and (pointer: coarse) {
  *, *::before, *::after, a, button {
    cursor: auto !important;
  }
}

/* Сглаживание тапов на iOS/Android */
a, button, .filter-btn, .lang-btn, .platform-btn, .blog-list-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Планшет и мобилка (≤768px) ── */
@media (max-width: 768px) {

  /* Header: лого + lang в одну строку, nav на вторую */
  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    padding: 12px 16px;
    row-gap: 10px;
  }
  .logo {
    order: 1;
    font-size: 1.5rem;
    letter-spacing: 3px;
  }
  .lang-switch {
    order: 2;
    margin-left: auto;
  }
  nav {
    order: 3;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
  }
  .nav-link {
    font-size: 0.75rem;
    letter-spacing: 2px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Touch targets для кнопок */
  .lang-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .filter-btn {
    min-height: 40px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
  }

  /* Main padding */
  main {
    padding: 0 16px 60px;
  }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 0 36px;
    gap: 0;
  }
  .ascii-art { display: none; }
  .hero-sub { font-size: 0.8rem; letter-spacing: 2px; }

  /* Section title */
  .section-title { margin: 40px 0 20px; }

  /* Posts grid */
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .post-card { padding: 20px; }

  /* Terminal */
  .divider-section { margin: 40px 0 0; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* Post main padding */
  .post-main {
    padding: 0 16px !important;
  }

  /* ── BLOG PAGE ── */
  .blog-header {
    padding: 40px 0 28px;
  }
  .blog-header h1 {
    font-size: 2.4rem;
    letter-spacing: 4px;
  }
  .blog-filter {
    gap: 8px;
    margin-top: 18px;
  }
  .blog-list { margin-top: 28px; }
  .blog-list-item {
    grid-template-columns: 56px 1fr auto;
    padding: 16px;
    gap: 14px;
  }
  .blog-list-thumb, .blog-list-thumb-empty {
    width: 56px;
    height: 56px;
  }
  .blog-list-date {
    display: none;
  }
  .blog-list-content h3 {
    font-size: 0.9rem;
  }
  .blog-list-tag {
    align-self: start;
    width: fit-content;
  }

  /* ── ABOUT PAGE ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0;
  }
  .about-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 32px;
  }
  .about-text h1 { font-size: 2.4rem; }

  /* ── POST PAGE ── */
  .post-layout {
    padding: 32px 0 60px;
  }
  .post-layout .post-meta-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* ASCII marquee на мобилке — скрываем */
  .marquee-ascii-wrap { display: none; }
}

/* ── Маленький телефон (≤480px) ── */
@media (max-width: 480px) {
  .header-inner { padding: 10px 14px; }
  .logo { font-size: 1.3rem; letter-spacing: 2px; }
  nav { gap: 14px; }
  .nav-link { font-size: 0.7rem; }

  main { padding: 0 14px 50px; }

  .glitch-title {
    font-size: clamp(1.6rem, 9vw, 2.8rem);
  }
  .hero { padding: 36px 0 28px; }

  .blog-header h1 { font-size: 2rem; letter-spacing: 3px; }
  .blog-filter { gap: 6px; }

  .about-text h1 { font-size: 2rem; }
  .about-text p { font-size: 0.82rem; }
}

/* -- WINDOWS 95 POPUP -- */
.win95-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.win95-dialog {
  width: 560px;
  height: 172px;
  background: url('okna/Window frame.png') no-repeat center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  display: flex;
  flex-direction: column;
  animation: win95pop 0.1s ease-out;
  position: relative;
}

@keyframes win95pop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.win95-titlebar-spacer {
  height: 28px;
  flex-shrink: 0;
}

.win95-x-btn {
  position: absolute;
  top: 0;
  right: 16px;
  width: 28px;
  height: 26px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: url('cursor.ani'), auto !important;
  z-index: 10;
}

#wizard-modal .win95-x-btn {
  right: 12px;
  width: 24px;
}

@media (max-width: 600px) {
  .win95-x-btn {
    right: 9px;
    width: 15px;
    height: 16px;
  }
  #wizard-modal .win95-x-btn {
    right: 7px;
    width: 13px;
  }
}

.win95-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 6px 20px 14px;
}

.win95-msg {
  image-rendering: pixelated;
  width: 176px;
  height: 22px;
  display: block;
}

.win95-btns {
  display: flex;
  gap: 16px;
}

.win95-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: url('cursor.ani'), pointer !important;
  line-height: 0;
}

.win95-btn-img {
  image-rendering: pixelated;
  width: 112px;
  height: 34px;
  display: block;
  transition: filter 0.05s;
}

.win95-btn:active .win95-btn-img {
  filter: brightness(0.82);
}

@media (max-width: 600px) {
  .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-titlebar-spacer { height: 16px; }
  .win95-msg { width: 100px; height: 13px; }
  .win95-btn-img { width: 64px; height: 20px; }
  .win95-btns { gap: 10px; }
  .win95-body { padding: 4px 12px 8px; }
}

/* -- WIN95 VARIANTS -- */
.win95-dialog-sm {
  background-image: url('okna/Window frame-1.png');
}
.win95-dialog-tall {
  height: 216px;
}
.win95-dialog-tall.win95-dialog:not(.win95-dialog-sm) {
  height: 216px;
}

/* popup 2 Warning!!! */
#legalize-2 .win95-dialog {
  background-image: url('okna/Window frame-2.png');
  height: 216px;
}
/* popup 3 Success! */
#legalize-3 .win95-dialog {
  background-image: url('okna/Window frame-3.png');
  height: 216px;
}
/* popup 4 Finish */
#legalize-4 .win95-dialog {
  background-image: url('okna/Window frame-4.png');
  height: 216px;
}

.win95-msg-wide {
  width: 376px;
  height: 18px;
}
.win95-msg-tall {
  width: 320px;
  height: 70px;
}
.win95-msg-reward {
  width: 320px;
  height: 46px;
}

@media (max-width: 600px) {
  .win95-dialog-tall,
  #legalize-2 .win95-dialog,
  #legalize-3 .win95-dialog,
  #legalize-4 .win95-dialog {
    height: 124px;
  }
  .win95-msg-wide  { width: 216px; height: 10px; }
  .win95-msg-tall  { width: 184px; height: 40px; }
  .win95-msg-reward { width: 184px; height: 26px; }
}

/* popup 1 Warning! */
#legalize-1 .win95-dialog {
  background-image: url('okna/Window frame-1.png');
}

/* -- WIZARD POPUP -- */
.win95-dialog-wizard {
  background-image: url('okna2/window-wizard.png');
  width: 602px;
  height: 186px;
}
.win95-msg-wizard {
  width: 248px;
  height: 20px;
}
.win95-btn-wizard {
  width: 156px;
  height: 34px;
}

@media (max-width: 600px) {
  .win95-dialog-wizard {
    width: 320px;
    height: 99px;
  }
  .win95-msg-wizard { width: 132px; height: 11px; }
  .win95-btn-wizard  { width: 84px;  height: 18px; }
}

/* -- TRUST NO ONE POPUP -- */
#trustnoone-modal .win95-dialog {
  background-image: url('okna2/Window frame-1.png');
  width: 560px;
  height: 172px;
}
.win95-msg-trustnoone {
  width: 136px;
  height: 48px;
}
.win95-btn-trustnoone {
  width: 196px;
  height: 34px;
}

@media (max-width: 600px) {
  #trustnoone-modal .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-msg-trustnoone { width: 78px; height: 28px; }
  .win95-btn-trustnoone { width: 112px; height: 20px; }
}

/* -- KILL YOUR TV POPUP -- */
#kytv-modal .win95-dialog {
  background-image: url('okna2/Window frame-1.png');
  width: 560px;
  height: 172px;
}
.win95-msg-kytv {
  width: 140px;
  height: 22px;
}
.win95-btn-kytv {
  width: 112px;
  height: 34px;
}

@media (max-width: 600px) {
  #kytv-modal .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-msg-kytv { width: 80px; height: 13px; }
  .win95-btn-kytv { width: 64px; height: 20px; }
}

/* -- WELCOME POPUP -- */
#welcome-modal .win95-dialog {
  background-image: url('okna2/Window frame-3.png');
  width: 560px;
  height: 172px;
}
.win95-msg-welcome {
  width: 218px;
  height: 22px;
}
.win95-btn-welcome {
  width: 178px;
  height: 34px;
}

@media (max-width: 600px) {
  #welcome-modal .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-msg-welcome { width: 125px; height: 13px; }
  .win95-btn-welcome  { width: 102px; height: 20px; }
}

/* -- RESTRICTED POPUP -- */
#restricted-modal .win95-dialog {
  background-image: url('okna2/Window frame-4.png');
  width: 560px;
  height: 172px;
}
.win95-msg-restricted {
  width: 376px;
  height: 22px;
}
.win95-btn-restricted {
  width: 196px;
  height: 34px;
}

@media (max-width: 600px) {
  #restricted-modal .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-msg-restricted { width: 216px; height: 13px; }
  .win95-btn-restricted  { width: 112px; height: 20px; }
}

/* -- HORROR / BE CAREFUL POPUP -- */
#horror-modal .win95-dialog {
  background-image: url('okna2/Window frame-6.png');
  width: 564px;
  height: 228px;
}
.win95-msg-horror {
  width: 318px;
  height: 76px;
}
.win95-btn-horror {
  width: 196px;
  height: 34px;
}

@media (max-width: 600px) {
  #horror-modal .win95-dialog {
    width: 320px;
    height: 130px;
  }
  .win95-msg-horror { width: 182px; height: 44px; }
  .win95-btn-horror  { width: 112px; height: 20px; }
}

/* -- HEAVEN POPUP -- */
#heaven-modal .win95-dialog {
  background-image: url('okna2/Window frame-5.png');
  width: 560px;
  height: 188px;
}
.win95-msg-heaven {
  width: 308px;
  height: 20px;
}
.win95-btn-heaven {
  width: 196px;
  height: 34px;
}

@media (max-width: 600px) {
  #heaven-modal .win95-dialog {
    width: 320px;
    height: 108px;
  }
  .win95-msg-heaven { width: 176px; height: 12px; }
  .win95-btn-heaven  { width: 112px; height: 20px; }
}

/* -- SWORDS POPUP -- */
#swords-modal .win95-dialog {
  background-image: url('okna2/Window frame-8.png');
  width: 560px;
  height: 188px;
}
.win95-msg-swords {
  width: 314px;
  height: 18px;
}
.win95-btn-swords {
  width: 196px;
  height: 34px;
}

@media (max-width: 600px) {
  #swords-modal .win95-dialog {
    width: 320px;
    height: 108px;
  }
  .win95-msg-swords { width: 180px; height: 10px; }
  .win95-btn-swords  { width: 112px; height: 20px; }
}

/* -- IE DIALING POPUP -- */
.ie-dialing-gif {
  image-rendering: pixelated;
  cursor: pointer;
}

/* -- GET PAID POPUP -- */
#getpaid-modal .win95-dialog {
  background-image: url('okna2/Window frame-2.png');
  width: 560px;
  height: 172px;
}
.win95-msg-getpaid {
  width: 472px;
  height: 24px;
}
.win95-btn-getpaid {
  width: 112px;
  height: 34px;
}

@media (max-width: 600px) {
  #getpaid-modal .win95-dialog {
    width: 320px;
    height: 99px;
  }
  .win95-msg-getpaid { width: 270px; height: 14px; }
  .win95-btn-getpaid  { width: 64px;  height: 20px; }
}
