/* Переменные и сброс */
:root {
    --bg-color: #FFFFFF;
    --secondary-bg: #F5F7FA; /* Легкий синеватый оттенок */
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --accent: #0066CC; /* Благородный технологичный синий */
    --accent-dark: #001F3D; /* Глубокий тёмно-синий для контрастных блоков */
    --accent-light: #5CA8FF; /* Светлый синий для акцентов на тёмном фоне */
    --line-color: #D2D2D7;
    --card-border-hover: #B4D5FF;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle, rgba(0, 102, 204, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
}

.container {
    max-width: 1120px; /* Оптимальная ширина для двух колонок */
    margin: 0 auto;
    padding: 0 24px;
}

/* Навигация */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--line-color);
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-main);
}

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

nav .nav-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    transition: color 0.2s;
}

nav .nav-link:hover, nav .nav-link.active {
    color: var(--text-main);
}

/* Двухколоночный макет */
.two-column-layout {
    display: grid;
    grid-template-columns: 240px 1fr; /* Боковое меню и центр */
    gap: 48px;
    margin-top: 40px;
    margin-bottom: 80px;
    align-items: flex-start;
}

/* Левое боковое меню разделов */
.navigation-sidebar {
    position: sticky;
    top: 24px;
}

.navigation-sidebar h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.sections-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sections-menu li a:hover {
    background-color: var(--secondary-bg);
    color: var(--accent);
}

.sections-menu li a.active {
    background-color: #E6F0FA;
    color: var(--accent);
    font-weight: 600;
}

/* Центральная зона контента */
.center-content {
    display: flex;
    flex-direction: column;
}

.hero {
    padding: 0 0 35px 0;
}

.hero h1 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1.2px;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: -0.2px;
    margin: 0;
}

.section-divider {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 24px 0 16px 0;
    border-bottom: 1px solid var(--line-color);
    padding-bottom: 8px;
}

/* Тёмно-синий блок с графиком роста сложности чипов */
.transistor-chart {
    margin-bottom: 24px;
    padding: 30px 32px 22px 32px;
    background: linear-gradient(160deg, var(--accent-dark) 0%, #002B52 100%);
    border-radius: 18px;
    border: 1px solid #003D73;
}

.transistor-chart-title {
    font-size: 19px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}

.transistor-chart-sub {
    font-size: 13px;
    color: #8FBFFF;
    margin: 0 0 18px 0;
}

.transistor-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.transistor-chart-note {
    font-size: 11px;
    color: #5C8FC7;
    text-align: right;
    margin-top: 10px;
}

/* Полоса статистики под заголовком */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: var(--line-color);
    border: 1px solid var(--line-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
}

.stat-strip-item {
    background-color: #FFFFFF;
    padding: 18px 16px;
    text-align: center;
}

.stat-strip-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-strip-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Таймлайн знаковых эпох на главной */
.era-timeline {
    margin-bottom: 32px;
    padding: 28px 28px 22px 28px;
    background-color: var(--secondary-bg);
    border-radius: 18px;
    border: 1px solid var(--line-color);
}

.era-timeline-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.era-timeline svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Иконки в боковом меню категорий */
.sections-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333336;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s;
}

.sections-menu .cat-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    opacity: 0.75;
}

/* Сетка карточек статей */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.card {
    background-color: var(--secondary-bg);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    transition: border 0.3s, transform 0.2s, background-color 0.3s;
}

.card:hover {
    border: 1px solid var(--card-border-hover);
    background-color: #FFFFFF;
    transform: translateY(-2px);
}

.category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Стили для страниц статей */
.post-content {
    max-width: 720px;
    margin: 0 auto 100px 0;
}

.post-content h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle {
    font-size: 19px;
    color: var(--text-muted);
    margin-top: 0;
    line-height: 1.4;
}

.accent-line {
    height: 1px;
    background-color: var(--line-color);
    margin: 30px 0;
}

.post-content h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-top: 36px;
    margin-bottom: 14px;
}

.post-content p, .post-content li {
    font-size: 16px;
    line-height: 1.6;
    color: #333336;
}

.post-content ul {
    padding-left: 20px;
    margin-bottom: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.table-scroll {
    overflow-x: auto;
    margin: 28px 0;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 560px;
}

.spec-table th, .spec-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-color);
    white-space: nowrap;
}

.spec-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    font-weight: 600;
}

.spec-table td:first-child {
    font-weight: 600;
    color: var(--text-main);
}

/* Адаптивность */
@media (max-width: 900px) {
    .two-column-layout { grid-template-columns: 1fr; gap: 24px; }
    .navigation-sidebar { display: none; }
    .grid { grid-template-columns: 1fr; }
}