/*
Theme Name: INV Studio
Description: Редакция об ИИ, вебе и карьере в технологиях.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: inv-studio
*/

:root {
  --ink: #12151a;
  --muted: #5b6573;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e3e8f0;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --chip: #e8eefc;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.03rem;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-2); }
img { max-width: 100%; height: auto; display: block; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .4rem; }
.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }

.top {
  background: var(--ink);
  color: #d7deea;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
}
.top .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 8; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; }
.mark {
  width: 2.1rem; height: 2.1rem;
  background: var(--blue);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: -.04em;
}
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.03em; }
.brand-name span { color: var(--blue); }
.tag { color: var(--muted); font-size: .86rem; }
.menu { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: .95rem; }
.menu .current-menu-item a { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.nav-toggle { display: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 18.5rem; gap: 2rem; padding: 1.6rem 0 3rem; }
.hero {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.6rem 1.6rem 1.5rem;
  margin-bottom: 1.2rem;
}
.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--blue-2);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  font-weight: 600;
}
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.12; letter-spacing: -.035em; margin: .55rem 0 .7rem; font-weight: 700; }
.dek { color: var(--muted); font-size: 1.08rem; max-width: 42rem; }
.meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); display: flex; gap: .8rem; margin-top: .9rem; }

.stream { display: grid; gap: 1rem; }
.row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: .85rem;
}
.thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1e3a8a, #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 1.2rem;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.t1 { background: linear-gradient(135deg, #1e3a8a, #60a5fa); }
.thumb.t2 { background: linear-gradient(135deg, #0f766e, #5eead4); }
.thumb.t3 { background: linear-gradient(135deg, #1e293b, #64748b); }
.thumb.t4 { background: linear-gradient(135deg, #1d4ed8, #93c5fd); }
.row h2 { font-size: 1.18rem; margin: .35rem 0 .3rem; letter-spacing: -.02em; line-height: 1.25; }
.row p { margin: 0; color: var(--muted); font-size: .92rem; }

.side { display: grid; gap: 1rem; align-content: start; }
.panel { background: var(--card); border: 1px solid var(--line); padding: 1rem 1rem 1.1rem; }
.panel h2 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.panel ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.panel li { counter-increment: n; padding: .65rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4rem 1fr; gap: .5rem; }
.panel li::before { content: counter(n, decimal-leading-zero); font-family: var(--mono); color: var(--blue); font-size: .8rem; }
.panel li:first-child { border-top: 0; }

.article { max-width: 44rem; margin: 1.4rem auto 3rem; }
.article h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -.03em; line-height: 1.15; margin: .45rem 0 .8rem; }
.article-body { font-size: 1.08rem; line-height: 1.7; }
.article-body p { margin: 0 0 1em; }
.article-body h2 { font-size: 1.4rem; margin-top: 1.6em; letter-spacing: -.02em; }
.callout {
  border: 1px solid var(--line);
  background: #eef3ff;
  padding: .9rem 1rem;
  margin: 1.3rem 0;
  font-size: .95rem;
}

.footer { background: var(--ink); color: #9aa6b8; padding: 2rem 0; font-size: .9rem; }
.footer strong { color: #fff; display: block; margin-bottom: .4rem; }
.footer a { color: #dbe7ff; }

.archive-head { padding: 1.2rem 0; }
.archive-head h1 { margin: .3rem 0 0; letter-spacing: -.03em; }
.search-form { display: flex; gap: .4rem; }
.search-form input { border: 1px solid var(--line); padding: .45rem .65rem; font: inherit; min-width: 12rem; }
.search-form button { background: var(--blue); color: #fff; border: 0; padding: .45rem .8rem; cursor: pointer; font: inherit; }

@media (max-width: 860px) {
  .layout, .row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); background: #fff; }
  .menu { display: none; }
  body.nav-open .menu { display: flex; flex-direction: column; position: absolute; background: #fff; inset: 3.4rem 1rem auto; padding: 1rem; border: 1px solid var(--line); }
}
