/* itkudashev.ru — premium editorial layer */
:root {
  --bg: #f1f3f7;
  --surface: rgba(255, 255, 255, .78);
  --surface-2: #e8ebf1;
  --text: #11151c;
  --muted: #687180;
  --line: rgba(30, 42, 62, .105);
  --accent: #315ee7;
  --accent-hover: #234bc8;
  --accent-soft: rgba(49, 94, 231, .09);
  --accent-2: #7a5ce5;
  --header: rgba(244, 246, 250, .82);
  --page-gradient:
    radial-gradient(circle at 7% 4%, rgba(91, 77, 218, .075), transparent 29rem),
    radial-gradient(circle at 94% 18%, rgba(35, 117, 235, .055), transparent 35rem),
    linear-gradient(180deg, rgba(255, 255, 255, .44), transparent 40rem);
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .035);
  --shadow-sm: 0 12px 35px rgba(22, 33, 53, .065);
  --shadow: 0 24px 70px rgba(20, 31, 51, .09);
  --premium-ring: 0 0 0 1px rgba(255,255,255,.62) inset;
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 32px;
}

[data-theme="dark"] {
  --bg: #0c0f14;
  --surface: rgba(21, 25, 33, .82);
  --surface-2: #1c222c;
  --text: #f5f7fb;
  --muted: #9ca6b5;
  --line: rgba(220, 229, 244, .11);
  --accent: #7d9cff;
  --accent-hover: #9ab0ff;
  --accent-soft: rgba(105, 137, 255, .13);
  --accent-2: #a58bff;
  --header: rgba(11, 14, 19, .82);
  --page-gradient:
    radial-gradient(circle at 8% 2%, rgba(91, 76, 215, .09), transparent 31rem),
    radial-gradient(circle at 91% 16%, rgba(37, 106, 220, .075), transparent 37rem);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .24);
  --shadow-sm: 0 14px 38px rgba(0, 0, 0, .22);
  --shadow: 0 28px 80px rgba(0, 0, 0, .32);
  --premium-ring: 0 0 0 1px rgba(255,255,255,.025) inset;
}

html { scrollbar-gutter: stable; }
body {
  min-width: 320px;
  letter-spacing: -.006em;
  text-rendering: optimizeLegibility;
}
::selection { color: #fff; background: #315ee7; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
.shell { width: min(calc(100% - 48px), var(--shell)); }

.site-header {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.36) inset, 0 10px 35px rgba(24, 33, 50, .035);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
.header-inner { min-height: 74px; gap: 28px; }
.brand-logo { width: 188px; }
.main-nav {
  gap: 7px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow-xs), var(--premium-ring);
}
.main-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 720;
  transition: color .2s ease, background .2s ease;
}
.main-nav a::after { display: none; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { gap: 7px; }
.auth-login-link, .icon-button, .menu-toggle, .account-link, .header-pro-icon {
  box-shadow: var(--shadow-xs), var(--premium-ring);
}
.auth-login-link { min-height: 40px; padding-inline: 18px; }
.icon-button, .menu-toggle, .account-link, .header-pro-icon { width: 40px; height: 40px; }
.search-panel, .mobile-panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(24px);
}

.button, .site-search button, .search-page button {
  min-height: 44px;
  padding-inline: 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, #4775f5, #3159d9);
  box-shadow: 0 10px 26px rgba(49, 94, 231, .18), 0 1px 0 rgba(255,255,255,.2) inset;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.button:hover, .site-search button:hover, .search-page button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 15px 34px rgba(49, 94, 231, .24), 0 1px 0 rgba(255,255,255,.22) inset;
}
.button-secondary {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow-xs), var(--premium-ring);
}

.blog-intro { padding: clamp(56px, 7vw, 88px) 0 40px; }
.blog-intro .shell { max-width: 900px; }
.kicker, .eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .16em;
}
.kicker::before, .eyebrow::before {
  width: 24px;
  background: linear-gradient(90deg, #ff6b55, #7d64ee);
}
.blog-intro h1 {
  max-width: 820px;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.015;
  letter-spacing: -.052em;
}
.blog-intro p {
  max-width: 680px;
  margin-top: 22px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
}

.collections-section { padding-bottom: 52px; }
.collections-panel {
  position: relative;
  isolation: isolate;
  padding: clamp(28px, 4vw, 50px);
  border-color: rgba(119, 91, 209, .12);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 4% 0%, rgba(139, 109, 225, .085), transparent 28rem),
    linear-gradient(135deg, rgba(145, 113, 225, .055), rgba(68, 102, 213, .018)),
    color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: var(--shadow-sm), var(--premium-ring);
  backdrop-filter: blur(18px);
}
.section-heading { margin-bottom: 32px; }
.section-heading h2 { font-size: clamp(31px, 3.3vw, 46px); letter-spacing: -.042em; }
.section-heading > p { line-height: 1.65; }
.collection-rail { gap: 20px; padding: 4px 4px 14px; }
.collection-card > a {
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(18, 20, 34, .16);
  transform: translateZ(0);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.collections-section .collection-card > a:hover {
  transform: translateY(-6px);
  border-color: rgba(156, 129, 231, .28);
  box-shadow: 0 28px 62px rgba(25, 22, 48, .2);
}
.collection-card-shade {
  background:
    linear-gradient(180deg, rgba(5,9,17,.04) 18%, rgba(5,9,17,.22) 48%, rgba(5,9,17,.92) 100%);
}
.collection-card-top { top: 16px; left: 16px; right: 16px; }
.collection-card-copy { left: 20px; right: 20px; bottom: 22px; gap: 10px; }
.collection-card-copy b { font-size: 23px; }
.collection-card-copy small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.materials { padding: 44px 0 100px; }
.materials-heading {
  padding: 20px 24px;
  border-color: rgba(103, 79, 202, .1);
  border-radius: 20px;
  background:
    linear-gradient(110deg, rgba(128, 93, 218, .065), rgba(67, 104, 222, .018) 65%, transparent);
  box-shadow: var(--premium-ring);
}
.editorial-grid, .card-grid { gap: 30px 24px; }
.story-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-xs), 0 18px 44px rgba(53, 67, 94, .035), var(--premium-ring);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .28s ease, box-shadow .28s ease;
}
.story-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  box-shadow: var(--shadow-sm), 0 0 34px rgba(77, 94, 226, .055);
}
.story-card-media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  box-shadow: none;
}
.story-card:hover .story-card-media { transform: none; box-shadow: none; }
.story-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 20px;
}
.story-labels { margin-bottom: 13px; }
.story-labels a, .story-labels span { padding: 5px 9px; font-size: 10px; }
.story-card h3 { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.22; }
.story-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 13px 0 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.story-card .story-meta { margin-top: auto; }

.author-teaser {
  border-color: rgba(104, 83, 198, .09);
  background:
    radial-gradient(circle at 19% 35%, rgba(120, 91, 218, .085), transparent 36%),
    linear-gradient(120deg, rgba(121, 92, 219, .055), rgba(45, 96, 222, .025) 58%, transparent 82%),
    color-mix(in srgb, var(--surface) 82%, transparent);
}
.author-teaser-inner { grid-template-columns: minmax(260px, 350px) minmax(0, 1fr); }
.author-teaser-photo {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(38, 43, 70, .13), var(--premium-ring);
}
.author-teaser-copy h2 { font-size: clamp(38px, 4.5vw, 58px); }

.listing-head, .collection-hero { padding-top: clamp(58px, 7vw, 84px); }
.listing-head h1, .collection-hero h1, .content-page-head h1 {
  font-size: clamp(39px, 5vw, 66px);
}

.article-page { padding-top: clamp(48px, 6vw, 76px); }
.article-header { max-width: 930px; }
.article-header h1 {
  max-width: 930px;
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 1.035;
  letter-spacing: -.052em;
}
.article-header > p { max-width: 780px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.58; }
.article-meta {
  gap: 10px;
  padding-top: 6px;
}
.article-meta span {
  min-width: 126px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-xs), var(--premium-ring);
}
.article-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow-sm), var(--premium-ring);
}
.article-layout {
  grid-template-columns: minmax(0, 760px) minmax(230px, 290px);
  gap: clamp(42px, 6vw, 76px);
}
.article-content { font-size: 18px; line-height: 1.78; }
.article-content h2 { font-size: clamp(29px, 3vw, 36px); }
.article-content h3 { font-size: clamp(23px, 2vw, 27px); }
.article-content img { border-radius: 18px; box-shadow: var(--shadow-sm); }
.article-content pre { border: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 48px rgba(0,0,0,.16); }
.article-content table {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
}
.article-content .admonition, .legal-risk-notice {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 18px;
  box-shadow: var(--shadow-xs), var(--premium-ring);
}
.article-aside { align-self: start; }
.article-toc, .aside-topic {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-xs), var(--premium-ring);
  backdrop-filter: blur(16px);
}
.article-toc { max-height: calc(100vh - 118px); overflow-y: auto; }
.article-toc a { border-radius: 8px; transition: color .18s ease, background .18s ease; }
.article-toc a:hover { color: var(--accent); background: var(--accent-soft); }
.article-actions, .comment-form, .comment-card, .auth-gate-card, .article-author-note {
  border-radius: 20px;
  box-shadow: var(--shadow-xs), var(--premium-ring);
}

.profile-form, .profile-side-card, .profile-stats a, .pro-hero, .pro-category-header,
.pro-file-card, .pro-file-hero, .auth-card, .profile-card {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-sm), var(--premium-ring);
}
.profile-form, .profile-side-card { border-radius: 22px; }
.pro-landing-hero {
  border-radius: 32px;
  box-shadow: var(--shadow), var(--premium-ring);
}

.site-footer {
  border-top-color: var(--line);
  background:
    radial-gradient(circle at 5% 0%, rgba(101, 78, 205, .035), transparent 25rem),
    linear-gradient(145deg, rgba(91, 69, 177, .018), rgba(33, 95, 216, .012)),
    color-mix(in srgb, var(--surface) 88%, var(--bg));
}
.footer-main { padding-top: 64px; }
.footer-column a { color: var(--muted); transition: color .2s ease, transform .2s ease; }
.footer-column a:hover { color: var(--text); transform: translateX(2px); }
.footer-bottom { color: var(--muted); }

.cookie-notice {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  width: min(620px, calc(100% - 44px));
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(101, 78, 205, .07), transparent 55%),
    color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .18), var(--premium-ring);
  backdrop-filter: blur(22px) saturate(140%);
}
.cookie-notice[hidden] { display: none; }
.cookie-notice-copy { display: grid; gap: 6px; min-width: 0; }
.cookie-notice-copy strong { color: var(--text); font-size: 15px; }
.cookie-notice-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cookie-notice-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.cookie-notice-actions a { color: var(--muted); font-size: 13px; }
.cookie-notice-actions a:hover { color: var(--accent); }
.cookie-notice-actions button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #397be8);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(65, 101, 218, .2);
}

@media (max-width: 1040px) {
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 38px; }
}

@media (max-width: 760px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .site-header { backdrop-filter: blur(19px) saturate(135%); }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand-logo { width: 146px; height: 38px; }
  .header-actions { margin-left: auto; }
  .auth-login-link { min-height: 38px; padding-inline: 14px; }
  .icon-button, .menu-toggle, .account-link, .header-pro-icon { width: 38px; height: 38px; }
  .blog-intro { padding: 44px 0 30px; }
  .blog-intro h1 { font-size: clamp(38px, 11vw, 50px); }
  .collections-panel { margin-inline: -2px; padding: 24px 18px; border-radius: 24px; }
  .section-heading { gap: 12px; margin-bottom: 24px; }
  .section-heading h2 { font-size: 34px; }
  .collection-rail { grid-auto-columns: minmax(218px, 78vw); gap: 14px; }
  .editorial-grid, .card-grid { grid-template-columns: 1fr; gap: 20px; }
  .story-card-body { padding: 20px; }
  .story-card h3 { font-size: 22px; }
  .materials { padding: 32px 0 74px; }
  .materials-heading { padding: 18px; }
  .author-teaser { padding: 64px 0; }
  .author-teaser-inner { grid-template-columns: 1fr; gap: 32px; }
  .author-teaser-photo { max-width: 330px; }
  .article-page { padding-top: 38px; }
  .article-header h1 { font-size: clamp(35px, 9.4vw, 46px); }
  .article-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-meta span { min-width: 0; }
  .article-cover { border-radius: 20px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-content { font-size: 17px; line-height: 1.75; }
  .article-aside { order: -1; }
  .article-toc { position: static; max-height: none; }
  .footer-main { padding-top: 52px; }
  .cookie-notice {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cookie-notice-actions { justify-content: space-between; }
}

@media (max-width: 420px) {
  .header-pro-icon { display: none; }
  .article-meta { grid-template-columns: 1fr; }
  .blog-intro h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
