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

    :root {
      --bg: #0d1117;
      --s1: #161b22;
      --s2: #21262d;
      --border: #30363d;
      --text: #e6edf3;
      --muted: #8b949e;
      --accent: #58a6ff;
      --adim: #1f6feb;
      --green: #3fb950;
      --red: #f85149;
      --yellow: #d29922;
      --purple: #bc8cff;
    }

    html { scroll-behavior: smooth; }
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

    /* NAV */
    nav {
      position: sticky; top: 0; z-index: 100;
      background: rgba(13,17,23,0.94); backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 56px;
    }
    .nav-brand { font-size: 0.9rem; font-weight: 700; }
    .nav-links { display: flex; gap: 2rem; list-style: none; }
    .nav-links a { color: var(--muted); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: color .15s; }
    .nav-links a:hover, .nav-links a.active { color: var(--accent); }

    /* LAYOUT */
    .wrap { max-width: 920px; margin: 0 auto; padding: 5rem 2rem; }
    .sec-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem; }
    .sec-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--adim); padding: .2rem .65rem; border-radius: 4px; white-space: nowrap; }
    .sec-line { flex: 1; height: 1px; background: var(--border); }
    h2 { font-size: 1.85rem; font-weight: 700; line-height: 1.2; }
    .sub-head { display: flex; align-items: center; gap: .65rem; font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text); margin: 3.25rem 0 1.4rem; }
    .sub-head::before { content: ''; width: 3px; height: 1.05em; border-radius: 2px; background: var(--accent); flex: 0 0 auto; }
    .divider { height: 1px; background: linear-gradient(to right, transparent, var(--border), transparent); }

    /* ── RESUME ── */
    .resume-hero {
      display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2rem;
      padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--border);
    }
    h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
    .r-role { font-size: 1rem; color: var(--accent); font-weight: 500; margin: .4rem 0 1rem; }
    .r-summary { font-size: .915rem; color: var(--muted); max-width: 540px; line-height: 1.75; }
    .r-contact { display: flex; flex-direction: column; gap: .45rem; align-items: flex-end; font-size: .83rem; }
    .r-contact span { color: var(--muted); }
    .r-contact a { color: var(--accent); text-decoration: none; }
    .r-contact a:hover { text-decoration: underline; }

    /* Skills two-col */
    .skills-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
    .skill-group .sub-head { margin: 0 0 1.1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
    .skill-group .sub-head::before { display: none; }
    .tags { display: flex; flex-wrap: wrap; gap: .35rem; }
    .tag { font-size: .77rem; background: var(--s2); border: 1px solid var(--border); padding: .18rem .55rem; border-radius: 4px; }
    .tag.hi { border-color: var(--adim); color: var(--accent); }
    .tag.gr { border-color: rgba(63,185,80,.4); color: var(--green); }

    /* Experience */
    .exp-card { padding: 1.4rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; margin-bottom: .9rem; transition: border-color .2s; }
    .exp-card:hover { border-color: var(--adim); }
    .exp-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .2rem; }
    .exp-title { font-size: .975rem; font-weight: 700; }
    .exp-period { font-size: .78rem; color: var(--muted); white-space: nowrap; }
    .exp-org { font-size: .85rem; color: var(--accent); margin-bottom: .8rem; }
    .bullets { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
    .bullets li { font-size: .875rem; color: var(--muted); padding-left: 1.1rem; position: relative; line-height: 1.55; }
    .bullets li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: .75rem; top: .15rem; }
    .bullets li strong { color: var(--text); }

    /* Education */
    .edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: .9rem; }
    .edu-card { padding: .95rem 1.2rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; }
    .edu-inst { font-size: .88rem; font-weight: 700; margin-bottom: .15rem; }
    .edu-deg { font-size: .78rem; color: var(--muted); line-height: 1.4; }
    .edu-year { font-size: .73rem; color: var(--accent); margin-top: .4rem; }
    .edu-card.ai-card { border-color: var(--adim); }

    /* ── PRODUCT ── */
    #product { background: var(--s1); }

    .ctx-note { font-size: .875rem; color: var(--muted); background: var(--s2); border-left: 3px solid var(--accent); padding: .7rem 1rem; border-radius: 0 6px 6px 0; margin: 1.5rem 0 2.5rem; }
    .ctx-note strong { color: var(--text); }

    /* Context flow */
    .ctx-flow-wrap { background: var(--s2); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
    .ctx-flow-row { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
    .ctx-flow-node { padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
    .ctx-flow-node.src { border-color: var(--yellow); color: var(--yellow); }
    .ctx-flow-node.core { border-color: var(--accent); color: var(--accent); background: rgba(31,111,235,.08); }
    .ctx-mods { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
    .ctx-mod { font-size: .75rem; padding: .2rem .6rem; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); }
    .ctx-arrow { color: var(--muted); font-size: 1.1rem; padding-top: .4rem; }
    .ctx-footnote { font-size: .8rem; color: var(--muted); margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
    .ctx-footnote strong { color: var(--text); }

    /* Pain points */
    .pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
    .pain-card { padding: 1.2rem; background: rgba(248,81,73,.05); border: 1px solid rgba(248,81,73,.22); border-radius: 8px; }
    .pain-icon { font-size: 1.25rem; margin-bottom: .45rem; }
    .pain-t { font-size: .875rem; font-weight: 700; margin-bottom: .25rem; }
    .pain-d { font-size: .8rem; color: var(--muted); line-height: 1.6; }

    /* Modules grid */
    .mods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-bottom: 2.5rem; }
    .mod-card { padding: 1.1rem; background: var(--s2); border: 1px solid var(--border); border-radius: 8px; }
    .mod-card:hover { border-color: var(--adim); transition: border-color .2s; }
    .mod-ico { font-size: 1.4rem; margin-bottom: .5rem; }
    .mod-name { font-size: .88rem; font-weight: 700; margin-bottom: .3rem; }
    .mod-desc { font-size: .78rem; color: var(--muted); line-height: 1.5; }

    /* Screenshots */
    .screenshots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
    .screenshot-wrap { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--s2); }
    .screenshot-wrap img { width: 100%; height: auto; display: block; }
    .screenshot-wide { grid-column: 1 / -1; }
    .screenshot-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .5rem .75rem; border-top: 1px solid var(--border); background: var(--s2); }

    /* Metrics */
    .metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.75rem; background: var(--s2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 2rem; }
    .metric { text-align: center; }
    .metric-val { font-size: 1.9rem; font-weight: 800; line-height: 1; margin-bottom: .3rem; }
    .metric-val.blue { color: var(--accent); }
    .metric-val.green { color: var(--green); }
    .metric-val.orange { color: var(--yellow); }
    .metric-val.purple { color: var(--purple); }
    .metric-lbl { font-size: .78rem; font-weight: 600; margin-bottom: .15rem; }
    .metric-sub { font-size: .72rem; color: var(--muted); line-height: 1.4; }

    /* Before/After table */
    .ba-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin-bottom: 2.5rem; }
    .ba-table th { padding: .65rem 1rem; text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid var(--border); }
    .ba-table th:first-child { color: var(--muted); }
    .ba-table th.was { color: var(--red); }
    .ba-table th.now { color: var(--green); }
    .ba-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
    .ba-table tr:last-child td { border-bottom: none; }
    .ba-table td.row-label { font-weight: 600; color: var(--text); }
    .ba-table td.was { color: var(--muted); }
    .ba-table td.now { color: var(--text); font-weight: 500; }

    /* Market */
    .market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
    .mkt-card { padding: 1.4rem; background: var(--s2); border: 1px solid var(--border); border-radius: 8px; }
    .mkt-ico { font-size: 1.5rem; margin-bottom: .6rem; }
    .mkt-stat { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin-bottom: .25rem; line-height: 1; }
    .mkt-name { font-size: .85rem; font-weight: 700; margin-bottom: .5rem; }
    .mkt-text { font-size: .8rem; color: var(--muted); line-height: 1.65; }

    /* Potential */
    .pot-list { display: flex; flex-direction: column; gap: .9rem; }
    .pot-item { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.1rem 1.25rem; background: var(--s2); border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s; }
    .pot-item:hover { border-color: var(--adim); }
    .pot-num { font-size: 1.6rem; font-weight: 800; color: rgba(88,166,255,.25); line-height: 1; min-width: 2.2rem; }
    .pot-title { font-size: .9rem; font-weight: 700; margin-bottom: .3rem; }
    .pot-desc { font-size: .8rem; color: var(--muted); line-height: 1.6; }

    /* ── AI REPORTS ── */
    .ai-lede { text-align: center; padding: 1rem 0 3rem; }
    .ai-badge { display: inline-block; background: linear-gradient(135deg, rgba(88,166,255,.1), rgba(63,185,80,.1)); border: 1px solid rgba(88,166,255,.28); padding: .35rem 1rem; border-radius: 20px; font-size: .78rem; color: var(--accent); letter-spacing: .04em; margin-bottom: 1.5rem; }
    .ai-lede h2 { font-size: 2.2rem; margin-bottom: 1rem; }
    .ai-lede p { font-size: .975rem; color: var(--muted); max-width: 760px; margin: 0; text-align: left; }

    /* Chat */
    .chat-demo { background: var(--s1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0 0 2.5rem; }
    .chat-bar { background: var(--s2); border-bottom: 1px solid var(--border); padding: .7rem 1.2rem; font-size: .8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
    .online { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
    .chat-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
    .msg { display: flex; gap: .7rem; align-items: flex-start; }
    .msg.usr { flex-direction: row-reverse; }
    .av { width: 28px; height: 28px; border-radius: 50%; background: var(--s2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; flex-shrink: 0; }
    .av.ai { background: rgba(31,111,235,.18); border-color: var(--adim); color: var(--accent); }
    .av.u { background: rgba(63,185,80,.14); border-color: rgba(63,185,80,.28); color: var(--green); }
    .bubble { max-width: 76%; padding: .7rem .95rem; border-radius: 8px; font-size: .875rem; line-height: 1.55; }
    .usr .bubble { background: rgba(31,111,235,.13); border: 1px solid var(--adim); }
    .ai-msg .bubble { background: var(--s2); border: 1px solid var(--border); }
    .mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin-top: .55rem; }
    .mini-stat { background: var(--s1); border: 1px solid var(--border); border-radius: 6px; padding: .35rem .5rem; font-size: .75rem; line-height: 1.3; }
    .mini-stat strong { color: var(--accent); display: block; font-size: .95rem; }

    /* Tech stack */
    .tech-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin: .9rem 0 2rem; }
    .chip { display: flex; align-items: center; gap: .4rem; padding: .32rem .75rem; background: var(--s2); border: 1px solid var(--border); border-radius: 20px; font-size: .78rem; color: var(--muted); }
    .chip .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

    /* How it works */
    .how-box { padding: 1.25rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 2rem; }
    .how-row { display: flex; align-items: flex-start; gap: .55rem; flex-wrap: wrap; font-size: .875rem; }
    .how-step { padding: .4rem .75rem; background: var(--s2); border: 1px solid var(--border); border-radius: 6px; }
    .how-step.last { border-color: var(--adim); color: var(--accent); background: rgba(31,111,235,.08); }
    .how-arr { color: var(--muted); padding-top: .35rem; }
    .how-tools { font-size: .78rem; color: var(--muted); margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); width: 100%; }

    /* Vision */
    .vision-list { display: flex; flex-direction: column; gap: .75rem; }
    .vis-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s; }
    .vis-item:hover { border-color: var(--adim); }
    .vis-num { font-size: 1.35rem; font-weight: 800; color: var(--accent); line-height: 1; min-width: 1.9rem; }
    .vis-t { font-size: .9rem; font-weight: 700; margin-bottom: .2rem; }
    .vis-d { font-size: .8rem; color: var(--muted); }

    /* AI status / stage */
    .ai-note { font-size: .85rem; color: var(--muted); margin: 0 0 .95rem; max-width: 640px; line-height: 1.6; }
    .ai-stage { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .95rem 1.2rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; }
    .stage-step { display: flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
    .stage-step .st-check { color: var(--green); font-weight: 700; }
    .stage-step.now { color: var(--accent); }
    .stage-step.now .st-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.18); display: inline-block; }
    .stage-sep { color: var(--border); }
    .ai-pause { font-size: .85rem; color: var(--muted); line-height: 1.65; padding: .85rem 1.1rem; border-left: 2px solid var(--adim); background: rgba(31,111,235,.05); border-radius: 0 6px 6px 0; margin-bottom: 2.5rem; }
    .ai-pause strong { color: var(--text); font-weight: 600; }
    .built-list { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 2.5rem; }
    .built-item { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--muted); line-height: 1.5; padding: .85rem 1rem; background: var(--s2); border: 1px solid var(--border); border-radius: 8px; }
    .built-item .bi-check { color: var(--green); font-weight: 700; flex-shrink: 0; }
    .chat-concept { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; display: flex; align-items: center; gap: .45rem; }
    .chat-concept::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }

    /* FOOTER */
    footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; }
    .foot-name { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }
    .foot-sub { font-size: .83rem; color: var(--muted); }
    .foot-sub a { color: var(--accent); text-decoration: none; }

    /* ── MODULE SHOWCASE ── */
    .showcase-wide {
      position: relative;
      width: min(calc(100vw - 3rem), 1040px);
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 2.5rem;
    }

    .module-tabs {
      display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem;
      padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
    }
    .mod-tab {
      padding: .42rem 1.15rem; border-radius: 20px; font-size: .84rem; font-weight: 600;
      cursor: pointer; border: 1px solid var(--border); color: var(--muted);
      background: transparent; transition: all .18s; white-space: nowrap; outline: none;
    }
    .mod-tab:hover { border-color: var(--accent); color: var(--accent); }
    .mod-tab.active { background: var(--adim); border-color: var(--adim); color: #fff; box-shadow: 0 0 0 3px rgba(31,111,235,.12); }

    .tab-panel { display: none; }
    .tab-panel.active { display: block; animation: tabfade .25s ease; }
    @keyframes tabfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    .mod-gallery-header { display: flex; align-items: center; gap: .65rem; margin-bottom: .9rem; }
    .mod-meta-tag { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--adim); padding: .18rem .55rem; border-radius: 4px; white-space: nowrap; }
    .mod-gallery-name { font-size: 1rem; font-weight: 700; color: var(--text); }
    .mod-overview {
      font-size: .92rem; color: var(--muted); line-height: 1.7;
      max-width: 820px; margin-bottom: 1.15rem;
    }
    .mod-overview strong { color: var(--text); font-weight: 600; }

    .gallery-caption {
      position: absolute; bottom: 0; left: 0; right: 0;
      padding: 3.5rem 1.4rem 1rem;
      background: linear-gradient(to top, rgba(13,17,23,.96) 0%, rgba(13,17,23,.72) 55%, transparent 100%);
      font-size: .82rem; color: #c9d1d9; line-height: 1.65;
      transition: opacity .18s ease; pointer-events: none; letter-spacing: .01em;
    }

    .gallery-hero {
      position: relative; height: 520px; border-radius: 10px; overflow: hidden;
      border: 1px solid var(--border);
      background: linear-gradient(135deg, #0b1016 0%, #11161e 100%);
      transition: border-color .25s ease, box-shadow .25s ease;
    }
    .gallery-hero::before {
      content: ''; position: absolute; inset: 0;
      background-image: repeating-linear-gradient(135deg, rgba(88,166,255,.025) 0 1px, transparent 1px 14px);
      pointer-events: none;
    }
    .gallery-hero.is-loaded {
      border-color: rgba(31,111,235,.55);
      box-shadow: inset 0 0 0 1px rgba(31,111,235,.18), 0 0 32px -8px rgba(31,111,235,.28);
    }
    .gallery-hero img {
      position: relative; width: 100%; height: 100%;
      object-fit: contain; display: block; transition: opacity .2s ease;
    }
    .gallery-hero .hero-counter {
      position: absolute; top: .75rem; right: .85rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: .7rem; color: var(--muted);
      background: rgba(13,17,23,.75); backdrop-filter: blur(6px);
      border: 1px solid var(--border); padding: .22rem .55rem;
      border-radius: 4px; letter-spacing: .04em; pointer-events: none;
    }

    .gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
    .gallery-thumb {
      width: 112px; height: 72px; flex: 0 0 auto; border-radius: 6px; overflow: hidden;
      border: 1px solid var(--border); cursor: pointer; background: var(--s2);
      transition: border-color .18s ease, transform .18s ease;
    }
    .gallery-thumb:hover { border-color: rgba(88,166,255,.55); transform: translateY(-1px); }
    .gallery-thumb.active { border-color: var(--adim); box-shadow: 0 0 0 1px var(--adim), 0 0 0 4px rgba(31,111,235,.12); }
    .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .55; transition: opacity .18s ease; pointer-events: none; }
    .gallery-thumb:hover img, .gallery-thumb.active img { opacity: 1; }

    /* RESPONSIVE */
    @media (max-width: 680px) {
      h1 { font-size: 1.9rem; }
      h2 { font-size: 1.5rem; }
      .ai-lede h2 { font-size: 1.6rem; }
      .resume-hero { grid-template-columns: 1fr; }
      .r-contact { align-items: flex-start; }
      .skills-2col { grid-template-columns: 1fr; }
      .pain-grid { grid-template-columns: 1fr; }
      .mods-grid { grid-template-columns: 1fr 1fr; }
      .metrics-row { grid-template-columns: repeat(2,1fr); }
      .market-grid { grid-template-columns: 1fr; }
      .built-list { grid-template-columns: 1fr; }
      .screenshots { grid-template-columns: 1fr; }
      .nav-links { gap: 1.25rem; }
      .wrap { padding: 3.5rem 1.25rem; }
      .mod-showcase { grid-template-columns: 1fr; gap: 1.5rem; }
      .gallery-hero { height: 280px; }
      .gallery-thumb { width: 84px; height: 56px; }
      .showcase-wide { width: 100%; left: auto; transform: none; }
    }

/* ════════════════════════════════════════════════
   НОВЫЕ БЛОКИ — резюме v2 (AI / преподавание)
   ════════════════════════════════════════════════ */

nav a.nav-brand { color: var(--text); text-decoration: none; transition: color .15s; }
nav a.nav-brand:hover { color: var(--accent); }

/* Пометка «нужно заполнить» */
.exp-period.todo { color: var(--yellow); border: 1px dashed rgba(210,153,34,.5); padding: .05rem .45rem; border-radius: 4px; }

/* ── ИНСТРУМЕНТЫ ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.tool-group { padding: 1.1rem 1.25rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s; }
.tool-group:hover { border-color: var(--adim); }
.tool-head { display: flex; align-items: center; gap: .5rem; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.tool-head .ti { font-size: 1rem; }
.tool-group .tags { gap: .3rem; }

/* ── КЕЙСЫ: превью-карточки ── */
#cases { background: var(--s1); }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; }
.case-card {
  display: flex; flex-direction: column;
  background: var(--s2); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; text-decoration: none; color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.case-card:hover {
  border-color: var(--adim); transform: translateY(-2px);
  box-shadow: 0 8px 28px -12px rgba(31,111,235,.45);
}
.case-kicker { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.case-tag { font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--adim); padding: .16rem .5rem; border-radius: 4px; }
.case-tag.soon { color: var(--muted); border-color: var(--border); }
.case-status { font-size: .72rem; color: var(--muted); }
.case-title { font-size: 1.12rem; font-weight: 700; line-height: 1.25; margin-bottom: .5rem; }
.case-desc { font-size: .855rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.1rem; flex: 1; }
.case-metrics { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: .85rem 0; border-top: 1px solid var(--border); margin-bottom: .9rem; }
.case-metric .cm-val { font-size: 1.15rem; font-weight: 800; line-height: 1; margin-bottom: .2rem; }
.case-metric .cm-lbl { font-size: .68rem; color: var(--muted); letter-spacing: .02em; }
.case-stack { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.1rem; }
.case-cta { font-size: .82rem; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: .4rem; }
.case-card:hover .case-cta .arr { transform: translateX(3px); }
.case-cta .arr { transition: transform .2s; display: inline-block; }
.case-card.is-soon { opacity: .62; cursor: default; }
.case-card.is-soon:hover { border-color: var(--border); transform: none; box-shadow: none; }

/* Кейс как отдельная страница */
.case-page section { background: var(--bg) !important; }
.case-page .wrap { padding-top: 3.5rem; }

/* ── КОНТАКТЫ ── */
.contact-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.contact-card { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.25rem; background: var(--s1); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); font-size: .89rem; font-weight: 600; transition: border-color .2s, color .2s; }
.contact-card:hover { border-color: var(--adim); color: var(--accent); }
.contact-card .ci { font-size: 1.1rem; }

/* ── ПЕЧАТЬ / PDF ── */
@media print {
  nav, .case-cta, footer .foot-sub a { display: none !important; }
  body { background: #fff !important; color: #14181d !important; }
  .wrap { padding: 1.4rem 0 !important; max-width: 100% !important; }
  #cases, #product, .case-card, .exp-card, .edu-card, .tool-group, .contact-card {
    background: #fff !important; border-color: #cfd6dd !important; box-shadow: none !important;
  }
  .r-summary, .bullets li, .case-desc, .edu-deg, .tool-head { color: #444c55 !important; }
  .case-card { break-inside: avoid; page-break-inside: avoid; }
  .exp-card, .edu-card { break-inside: avoid; }
  a { color: #1f6feb !important; text-decoration: none !important; }
}

@media (max-width: 680px) {
  .case-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* ── ВСТРОЕННЫЙ ПРОТОТИП ── */
.proto-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--s2); margin-bottom: 1rem; }
.proto-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; background: var(--s1); border-bottom: 1px solid var(--border); font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.proto-bar .pb-dots { display: flex; gap: .35rem; }
.proto-bar .pb-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.proto-bar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.proto-bar a:hover { text-decoration: underline; }
.proto-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #fff; }
.proto-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.proto-hint { font-size: .8rem; color: var(--muted); margin-bottom: 2.5rem; line-height: 1.6; }
.proto-hint strong { color: var(--text); }
@media (max-width: 680px) { .proto-frame { aspect-ratio: 4 / 3; } }
@media print { .proto-wrap { display: none; } }

/* Выделенный тег кейса — отдельной строкой над остальными */
.case-stack.lead { margin-bottom: .35rem; }

/* ── ДЛИННЫЙ СКРИНШОТ (лендинг целиком) ── */
.longshot { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--s2); margin-bottom: .9rem; }
.longshot-bar { padding: .55rem 1rem; background: var(--s1); border-bottom: 1px solid var(--border); font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.longshot-bar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.longshot-scroll { max-height: 620px; overflow-y: auto; overscroll-behavior: contain; }
.longshot-scroll img { width: 100%; height: auto; display: block; }
@media (max-width: 680px) { .longshot-scroll { max-height: 420px; } }

/* ── ГРУППЫ КЕЙСОВ ── */
.case-group-head {
  display: flex; align-items: center; gap: .7rem;
  margin: 3.5rem 0 1.4rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}
.case-group-head.first { margin-top: 0; }
.case-group-head .cgh-mark {
  width: 3px; height: 1.15em; border-radius: 2px;
  background: var(--accent); flex: 0 0 auto;
}
.case-group-head h3 {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2;
}
.case-group-head .cgh-count {
  font-size: .7rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 20px;
  padding: .12rem .55rem; white-space: nowrap;
}

/* Стек — широкой строкой под колонками навыков */
.skill-group.wide { grid-column: 1 / -1; }
