:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #142033;
  --muted: #607086;
  --line: #dce4ee;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --ink: #0f172a;
  --max: 1120px;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(220, 228, 238, .9);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-weight: 600; font-size: .73rem; letter-spacing: .04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { text-decoration: none; color: #415169; font-weight: 650; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; font: inherit; }

.hero { padding: 94px 0 76px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 50px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
h1, h2, h3 { line-height: 1.15; color: var(--ink); letter-spacing: -.035em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); margin: 14px 0 24px; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 0 0 18px; }
h3 { font-size: 1.22rem; margin: 0 0 10px; }
.lead { max-width: 760px; font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 10px; text-decoration: none; font-weight: 800; background: var(--accent); color: #fff; }
.button:hover { background: var(--accent-dark); }
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.secondary:hover { background: var(--surface-2); }
.hero-card { background: var(--ink); color: #dce6f5; border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.hero-card h2 { color: white; font-size: 1.45rem; }
.hero-card p { color: #b7c4d8; }
.hero-card ul { padding-left: 18px; margin-bottom: 0; }

.section { padding: 78px 0; }
.section.white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 760px; color: var(--muted); margin-bottom: 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 10px 30px rgba(15,23,42,.035); }
.card p { color: var(--muted); margin-bottom: 0; }
.card-link { text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kicker { color: var(--accent); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }

.tech-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-list span { border: 1px solid #cfe0fb; background: #edf4ff; color: #2456a7; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .9rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stat { padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.stat strong { display: block; font-size: 1.5rem; color: var(--ink); }
.stat span { color: var(--muted); font-size: .92rem; }

.page-hero { padding: 72px 0 44px; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); }
.breadcrumb { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }

.cv-layout { display: grid; grid-template-columns: 1.8fr .8fr; gap: 36px; align-items: start; }
.cv-section { padding: 28px 0; border-top: 1px solid var(--line); }
.cv-section:first-child { border-top: 0; padding-top: 0; }
.cv-meta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 100px; }
.cv-meta dl { margin: 0; }
.cv-meta dt { font-weight: 800; color: var(--ink); margin-top: 16px; }
.cv-meta dt:first-child { margin-top: 0; }
.cv-meta dd { margin: 2px 0 0; color: var(--muted); }

.case { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.case + .case { margin-top: 24px; }
.case-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 26px; }
.case h2 { font-size: 1.8rem; }
.article .case h2 { margin-top: 0; }
.case ul { margin-bottom: 0; }
.note { padding: 18px 20px; border-left: 4px solid var(--accent); background: #eef5ff; border-radius: 10px; color: #334862; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 46px; align-items: start; }
.article { max-width: 780px; }
.article h2 { margin-top: 54px; font-size: 2rem; }
.article h3 { margin-top: 32px; }
.article p, .article li { color: #405067; }
.article pre { overflow-x: auto; padding: 22px; background: #101827; color: #dce8f7; border-radius: 14px; line-height: 1.5; }
.article table { width: 100%; border-collapse: collapse; margin: 26px 0; background: var(--surface); }
.article th, .article td { text-align: left; padding: 13px; border: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--surface-2); color: var(--ink); }
.toc { position: sticky; top: 102px; border-left: 1px solid var(--line); padding-left: 20px; }
.toc strong { color: var(--ink); }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 6px 0; font-size: .92rem; }
.toc a:hover { color: var(--accent); }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 28px 0; }
.flow { display: grid; gap: 12px; }
.flow-box { padding: 18px; text-align: center; border: 1px solid #cdd8e6; border-radius: 12px; background: #f9fbfd; font-weight: 800; }
.flow-arrow { text-align: center; color: var(--accent); font-weight: 900; }

.cta { padding: 40px; border-radius: 24px; background: var(--ink); color: #ced9e9; }
.cta h2 { color: white; }

.home-page .container { width: min(980px, calc(100% - 40px)); }
.home-page .hero { padding: 64px 0 54px; }
.home-page .hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(250px, .8fr); gap: 36px; }
.home-page h1 { max-width: 18ch; margin: 10px 0 18px; font-size: clamp(2.35rem, 4.2vw, 3.6rem); }
.home-page .hero h1 { max-width: none; margin: 10px 0 12px; font-size: clamp(2.8rem, 5vw, 4rem); }
.home-page .home-specialty { margin: 0 0 12px; color: var(--ink); font-size: clamp(1.08rem, 1.8vw, 1.3rem); font-weight: 700; line-height: 1.35; }
.home-page h2 { margin-bottom: 14px; font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
.home-page h3 { font-size: 1.12rem; }
.home-page .lead { max-width: 620px; margin-bottom: 0; font-size: clamp(1rem, 1.5vw, 1.12rem); }
.home-page .actions { margin-top: 24px; }
.home-page .hero-card { padding: 24px; border-radius: 18px; }
.home-page .hero-card h2 { font-size: 1.25rem; }
.home-page .hero-card ul { padding-left: 18px; font-size: .94rem; line-height: 1.55; }
.home-page .section { padding: 56px 0; }
.home-page .section-intro { max-width: 680px; margin-bottom: 26px; font-size: .98rem; }
.home-page .grid-3, .home-page .grid-2 { gap: 16px; }
.home-page .card { padding: 22px; }
.home-page .card p { font-size: .94rem; }
.home-page .card-link { display: block; }
.home-page .tech-list { gap: 8px; }
.home-page .tech-list span { padding: 6px 10px; font-size: .84rem; }
.home-page .cta { padding: 32px; border-radius: 18px; }
.home-page .cta .button.secondary { color: white; border-color: #41506a; }
.home-page .cta .button.secondary:hover { background: #1c2940; }

.site-footer { padding: 34px 0; border-top: 1px solid var(--line); color: var(--muted); background: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }

@media (max-width: 860px) {
  .hero-grid, .cv-layout, .article-layout, .case-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .home-page .hero-grid, .home-page .grid-3, .home-page .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .cv-meta, .toc { position: static; }
  .toc { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
}

@media (max-width: 720px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .nav { min-height: 64px; }
  .menu-button { display: inline-block; }
  .nav-links { display: none; position: absolute; left: 14px; right: 14px; top: 68px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; gap: 12px; }
  .nav-links.open { display: flex; }
  .hero { padding-top: 64px; }
  .section { padding: 60px 0; }
  h1 { font-size: clamp(2.6rem, 15vw, 4.2rem); }
  .home-page .container { width: min(980px, calc(100% - 28px)); }
  .home-page .hero { padding: 44px 0 40px; }
  .home-page .hero h1 { font-size: clamp(2.25rem, 9.5vw, 3.1rem); }
  .home-page .home-specialty { font-size: 1.08rem; }
  .home-page .section { padding: 44px 0; }
  .home-page .card { padding: 20px; }
  .home-page .cta { padding: 24px; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .page-hero, .section { padding: 28px 0; }
  .container { width: 100%; }
  .cv-layout { display: block; }
  .cv-meta { border: 0; padding: 0; margin-top: 24px; }
}
