/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #6366f1;
  --secondary:  #4f46e5;
  --accent:     #a78bfa;
  --gold:       #c9a84c;
  --bg:         #0f172a;
  --text:       #e2e8f0;
  --header-bg:  #1e1b4b;
  --footer-bg:  #0a0a1a;
  --link:       #818cf8;
  --link-hover: #a78bfa;
  --card-bg:    #1e293b;
  --border:     #334155;
  --muted:      #64748b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
}

a { color: var(--link); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }

/* === HEADER / T-MENU === */
.t-menu {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: linear-gradient(to right, var(--primary) 38%, var(--header-bg) 38%);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
  min-height: 68px;
}

.t-menu__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  width: 38%;
  background: transparent;
  text-decoration: none;
  flex-shrink: 0;
}

.t-menu__logo { width: 40px; height: 40px; flex-shrink: 0; }

.t-menu__site-name {
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.t-menu__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  gap: 4px;
  flex: 1;
}

.t-menu__link {
  color: #c7d2fe;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 11px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.t-menu__link:hover,
.t-menu__link--active { color: #fff; background: rgba(255,255,255,0.12); }

.t-menu__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0 20px;
  background: none;
  border: none;
  margin-left: auto;
}
.t-menu__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s;
}

/* === CONTAINER === */
.t-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === PAGE LAYOUT === */
.t-page-layout {
  display: flex;
  gap: 44px;
  padding: 44px 0;
  align-items: flex-start;
}
.t-main-content { flex: 1 1 0; min-width: 0; }
.t-sidebar { width: 308px; flex-shrink: 0; }

/* === TILDA RECORDS === */
.t-rec { padding: 64px 0; position: relative; }

.t-rec--hero {
  padding: 72px 0 56px;
  background: linear-gradient(170deg, #1e1b4b 0%, var(--bg) 100%);
  overflow: hidden;
}
.t-rec--hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.t-rec--hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.t-rec--alt { background: rgba(30,41,59,0.35); }

/* === DECORATIVE === */
.t-divider {
  width: 48px; height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  margin: 16px 0 24px;
}
.t-divider--gold { background: linear-gradient(to right, var(--gold), #e8c870); }

.t-route-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  margin: 0 auto;
}

.t-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.t-section-label::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--primary);
  flex-shrink: 0;
}

.t-section-title { margin-bottom: 36px; }
.t-section-title h2 { margin-bottom: 6px; }
.t-section-title p { color: var(--muted); font-size: 0.95rem; }

/* === CARDS GRID === */
.t-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* === T-CARD (museum exhibit) === */
.t-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.t-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 52px rgba(99,102,241,0.22);
  border-color: rgba(99,102,241,0.45);
}

.t-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #1a2540;
}
.t-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.t-card:hover .t-card__image img { transform: scale(1.05); }

.t-card__tag {
  position: absolute;
  bottom: 10px; left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
}

.t-card__body { padding: 18px 20px 20px; }

.t-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.t-card__date {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.t-card__cat {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

.t-card__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}
.t-card__title a { color: var(--text); transition: color 0.2s; }
.t-card__title a:hover { color: var(--primary); }

.t-card__excerpt {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 14px;
}

.t-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.t-card__read-more {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s, color 0.2s;
}
.t-card__read-more:hover { color: var(--accent); gap: 10px; }
.t-card__read-more::after { content: '→'; }

/* === HERO ARTICLE === */
.t-hero-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.t-hero-article__image {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 28px 72px rgba(0,0,0,0.55);
}
.t-hero-article__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.t-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 18px;
}

.t-hero-article__title {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.t-hero-article__title a { color: var(--text); }
.t-hero-article__title a:hover { color: var(--primary); }

.t-hero-article__excerpt {
  color: #94a3b8;
  line-height: 1.75;
  margin-bottom: 28px;
  font-size: 1rem;
}

.t-hero-article__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* === BUTTONS === */
.t-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
}
.t-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,0.35);
}
.t-btn--primary:hover {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99,102,241,0.5);
  transform: translateY(-2px);
}
.t-btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(99,102,241,0.5);
}
.t-btn--outline:hover {
  background: rgba(99,102,241,0.1);
  color: var(--accent);
  border-color: var(--primary);
}

/* === SIDEBAR === */
.t-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}
.t-widget__header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(99,102,241,0.08);
}
.t-widget__header h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.t-widget__body { padding: 14px 18px; }

.t-recent-post {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(51,65,85,0.5);
}
.t-recent-post:last-child { border-bottom: none; }
.t-recent-post__image {
  width: 56px; height: 42px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border);
}
.t-recent-post__image img { width: 100%; height: 100%; object-fit: cover; }
.t-recent-post__title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 3px;
}
.t-recent-post__title a { color: var(--text); }
.t-recent-post__title a:hover { color: var(--primary); }
.t-recent-post__date { font-size: 0.7rem; color: var(--muted); }

.t-cat-list { list-style: none; }
.t-cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(51,65,85,0.5);
}
.t-cat-list li:last-child { border-bottom: none; }
.t-cat-list a { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.t-cat-list a:hover { color: var(--primary); }
.t-cat-list__count {
  font-size: 0.7rem;
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.t-author-widget { text-align: center; padding: 20px 18px; }
.t-author-widget__avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
}
.t-author-widget__name { font-weight: 800; font-size: 0.95rem; margin-bottom: 5px; }
.t-author-widget__bio { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* === BREADCRUMBS === */
.t-breadcrumbs {
  padding: 14px 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.t-breadcrumbs a { color: var(--muted); }
.t-breadcrumbs a:hover { color: var(--primary); }
.t-breadcrumbs__sep { color: #475569; }
.t-breadcrumbs span:last-child { color: var(--text); }

/* === ARTICLE PAGE === */
.t-article-header { padding: 44px 0 28px; }

.t-article-pub-date {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.t-article-pub-date::before {
  content: '';
  width: 14px; height: 2px;
  background: var(--primary);
  flex-shrink: 0;
}

.t-article-image {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 24px 0 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.t-article-image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}
.t-article-image figcaption {
  padding: 9px 14px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* === ARTICLE BODY (entry-content) === */
.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #cbd5e1;
}
.entry-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 34px 0 14px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.entry-content h3 {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 26px 0 11px;
  color: var(--text);
}
.entry-content p { margin-bottom: 18px; }

.entry-content ul,
.entry-content ol { margin: 0 0 18px 22px; list-style: revert; }
.entry-content li { margin-bottom: 7px; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.entry-content th {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.entry-content tr:nth-child(even) td { background: rgba(30,41,59,0.6); }

.entry-content blockquote {
  border-left: 3px solid var(--primary);
  background: rgba(99,102,241,0.07);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: #a0aec0;
}
.entry-content blockquote strong { color: var(--text); font-style: normal; }

.entry-content .infobox {
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 22px 0;
}
.entry-content .infobox::before {
  content: 'На заметку';
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px;
}

.entry-content .stat-block {
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(167,139,250,0.08));
  border: 1px solid rgba(99,102,241,0.28);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 22px 0;
  text-align: center;
}
.entry-content .stat-block .stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}

.entry-content a { color: var(--link); }
.entry-content a:hover { color: var(--link-hover); }
.entry-content img {
  border-radius: 4px;
  border: 1px solid var(--border);
  margin: 24px auto;
}

/* === ARTICLE TAGS SECTION === */
.t-article-tags-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  flex-wrap: wrap;
}
.t-article-tags-section__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}

/* === TAGS === */
.t-tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

a.t-tag-pill {
  display: inline-block;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  letter-spacing: 0.03em;
}
a.t-tag-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* === FOOTER === */
.t-footer {
  background: var(--footer-bg);
  border-top: 1px solid #1a1a2e;
  padding: 60px 0 0;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.t-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent), var(--gold));
}

.t-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
}

.t-footer__brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.t-footer__brand-name { font-weight: 800; font-size: 1rem; color: #fff; }

.t-footer__tagline {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.65;
  max-width: 230px;
  margin-bottom: 18px;
}

.t-footer__col-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a5568;
  margin-bottom: 14px;
}

/* Animated footer links */
.t-footer__links { list-style: none; }
.t-footer__links li { margin-bottom: 9px; }
.t-footer__links a {
  font-size: 0.85rem;
  color: #64748b;
  position: relative;
  display: inline-block;
  transition: color 0.25s;
}
.t-footer__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.t-footer__links a:hover { color: #e2e8f0; }
.t-footer__links a:hover::after { transform: scaleX(1); }

/* Silhouette decorative band */
.t-footer__silhouettes {
  border-top: 1px solid #111827;
  padding: 18px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  opacity: 0.15;
}
.t-footer__silhouettes svg { height: 32px; fill: var(--primary); }

.t-footer__bottom {
  border-top: 1px solid #111827;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.t-footer__copyright { font-size: 0.75rem; color: #374151; }
.t-footer__legal { display: flex; gap: 18px; }
.t-footer__legal a { font-size: 0.75rem; color: #374151; }
.t-footer__legal a:hover { color: var(--muted); }

/* === CATEGORY PAGE === */
.t-category-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.t-category-header h1 { margin-bottom: 6px; }
.t-category-header p { color: var(--muted); font-size: 0.95rem; }

/* === SCROLL ANIMATIONS === */
.t-fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.t-fade-in.t-visible { opacity: 1; transform: translateY(0); }
.t-fade-in:nth-child(2) { transition-delay: 0.08s; }
.t-fade-in:nth-child(3) { transition-delay: 0.16s; }
.t-fade-in:nth-child(4) { transition-delay: 0.24s; }
.t-fade-in:nth-child(5) { transition-delay: 0.32s; }
.t-fade-in:nth-child(6) { transition-delay: 0.40s; }

/* === SECTION NUMBER DECORATION === */
.t-deco-number {
  font-size: 9rem;
  font-weight: 800;
  color: rgba(99,102,241,0.05);
  position: absolute;
  top: -10px; right: 0;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

/* === PAGINATION === */
.t-pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 36px 0 0;
}
.t-pagination a,
.t-pagination span {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  transition: all 0.2s;
}
.t-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.t-pagination .t-pagination--active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .t-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .t-footer__grid > *:first-child { grid-column: 1 / -1; }
  .t-hero-article { grid-template-columns: 1fr; }
  .t-hero-article__image { order: -1; }
}

@media (max-width: 768px) {
  .t-menu__nav { display: none; }
  .t-menu__nav.t-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 10px 14px 14px;
    background: var(--header-bg);
  }
  .t-menu__burger { display: flex; }
  .t-menu { flex-wrap: wrap; }
  .t-menu__brand { width: auto; flex: 1; padding-right: 10px; }

  .t-page-layout { flex-direction: column; padding: 24px 0; gap: 28px; }
  .t-sidebar { width: 100%; }

  .t-cards-grid { grid-template-columns: 1fr; }

  .t-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .t-footer__grid { grid-template-columns: 1fr; }
  .t-footer__bottom { flex-direction: column; text-align: center; }
  .t-container { padding: 0 16px; }
}
