/* ivanovpavel.pro — single stylesheet, system fonts, no scripts required */
:root {
  --navy: #0B1628;
  --navy-2: #101D33;
  --teal: #2BB5A8;
  --teal-d: #1E7F86;
  --ink: #0F1E33;
  --muted: #5B6B7F;
  --soft: #F4F6F9;
  --line: #E3E8EF;
  --on-dark: #C3CEDC;
  --wrap: 1140px;
  --head: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font: 18px/1.65 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-d); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
section[id] { scroll-margin-top: var(--head); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 808px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--teal); color: var(--navy); padding: 10px 16px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px; border-radius: 8px;
  font: 600 16px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  border: 2px solid var(--teal); transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--navy); }

/* ---------- header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: var(--navy); border-bottom: 1px solid #1B2A44; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--head); }
.brand { color: #fff; font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: .01em; }
.brand:hover { color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav ul { list-style: none; display: flex; gap: 28px; }
.site-nav a { color: var(--on-dark); text-decoration: none; font-size: 16px; font-weight: 500; }
.site-nav a:hover { color: #fff; }
.lang-switch { font-size: 15px; font-weight: 600; color: var(--on-dark); }
.lang-switch .sep { margin: 0 8px; color: #4A5B78; }
.lang-switch .current { color: var(--teal); }
.lang-switch a { color: var(--on-dark); text-decoration: none; }
.lang-switch a:hover { color: #fff; }
.menu-btn {
  display: none; min-height: 44px; padding: 0 18px; background: transparent; color: #fff;
  border: 1.5px solid #4A5B78; border-radius: 8px; font: 600 15px/1 inherit; font-family: inherit; cursor: pointer;
}
.menu-btn:hover { border-color: var(--teal); }
main { padding-top: var(--head); }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #fff; padding: 88px 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 320px; gap: 72px; align-items: center; }
.hero h1 { font-size: 60px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.hero .role { margin-top: 16px; color: var(--teal); font-size: 19px; font-weight: 600; line-height: 1.45; }
.hero .lead { margin-top: 24px; color: var(--on-dark); font-size: 20px; line-height: 1.6; max-width: 640px; }
.hero .location { margin-top: 16px; color: #9AA9BE; font-size: 16px; }
.hero .location:empty { display: none; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.hero .social { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-social {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 999px;
  font: 600 15px/1 inherit; font-family: inherit; text-decoration: none; white-space: nowrap;
  color: #fff; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-social .ico { flex: none; width: 18px; height: 18px; transition: color .15s; }
.btn-social:hover { border-color: #2BB5A8; background: rgba(43,181,168,0.12); color: #fff; }
.btn-social:hover .ico { color: #2BB5A8; }
.btn-social.on-light { color: #0F1E33; background: transparent; border-color: #E3E8EF; }
.btn-social.on-light:hover { border-color: #1E7F86; background: transparent; color: #0F1E33; }
.btn-social.on-light:hover .ico { color: #1E7F86; }
.portrait-wrap { width: 320px; height: 320px; border-radius: 50%; border: 2px solid var(--teal); background: #fff; overflow: hidden; justify-self: end; order: 2; }
.portrait { width: 100%; height: 100%; object-fit: cover; }

/* ---------- stats band ---------- */
.stats-band { background: var(--soft); border-bottom: 1px solid var(--line); padding: 48px 0; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stats li { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; border-left: 3px solid var(--teal-d); }
.stats .value { font-size: 48px; line-height: 1; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.stats .label { color: var(--muted); font-size: 16px; line-height: 1.45; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section h2, .case-body h2 { position: relative; padding-bottom: 20px; margin-bottom: 40px; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.section h2::after, .case-body h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; background: var(--teal-d); border-radius: 2px; }
.section-intro { color: var(--muted); font-size: 19px; max-width: 720px; margin: -16px 0 40px; }
.section.dark { background: var(--navy); color: #fff; }
.section.dark h2 { color: #fff; }
.section.dark h2::after { background: var(--teal); }
.section.dark .section-intro { color: var(--on-dark); margin-top: -16px; }

/* about */
#about .about-text { columns: 2; column-gap: 56px; font-size: 18px; line-height: 1.65; }
#about .about-text p { break-inside: avoid; margin-bottom: 20px; }
#about .about-text p:first-child { break-after: column; }

/* cases */
#cases { background: var(--soft); }
.case-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.case-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.case-card:hover, .case-card:focus-within { border-color: var(--teal); transform: translateY(-2px); }
.thumb-link { display: block; }
.thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); border-bottom: 1px solid var(--line); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 28px 28px; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.tag { color: var(--teal-d); text-transform: uppercase; letter-spacing: .09em; font-size: 13px; font-weight: 700; }
.card-body h3 { margin-top: 12px; font-size: 22px; line-height: 1.3; font-weight: 800; }
.card-body h3 a { color: var(--navy); text-decoration: none; }
.card-body h3 a:hover { color: var(--teal-d); }
.card-body p { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.more { margin-top: auto; padding-top: 20px; font-weight: 700; font-size: 16px; text-decoration: none; color: var(--teal-d); }
.more:hover { text-decoration: underline; }

/* experience */
.timeline { list-style: none; position: relative; margin-left: 8px; padding-left: 36px; border-left: 3px solid var(--teal-d); }
.timeline > li { position: relative; padding-bottom: 48px; }
.timeline > li:last-child { padding-bottom: 8px; }
.timeline > li::before { content: ""; position: absolute; left: -46px; top: 8px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--teal-d); }
.timeline h3 { font-size: 22px; line-height: 1.3; font-weight: 800; color: var(--navy); }
.timeline .org, .timeline .dates { color: var(--muted); font-size: 16px; line-height: 1.5; }
.timeline .org { margin-top: 6px; font-weight: 600; }
.timeline ul { margin-top: 16px; padding-left: 22px; font-size: 17px; line-height: 1.6; }
.timeline ul li { margin-bottom: 8px; }
.timeline ul li::marker { color: var(--teal-d); }
.two-col { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; font-size: 17px; }
.two-col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .09em; color: var(--teal-d); margin-bottom: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.plain { list-style: none; }

/* skills */
#skills { background: var(--soft); }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skills-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.skills-grid h3 { font-size: 20px; font-weight: 800; color: var(--navy); padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--teal-d); }
.skills-grid ul { list-style: none; font-size: 16px; line-height: 1.5; }
.skills-grid li { padding: 6px 0 6px 18px; position: relative; }
.skills-grid li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; background: var(--teal-d); border-radius: 50%; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact-list { margin: 0; }
.contact-list dt { color: #9AA9BE; font-size: 14px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; margin-top: 24px; }
.contact-list dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; }
.contact-list a { color: var(--teal); text-decoration: none; }
.contact-list a:hover { color: #fff; text-decoration: underline; }
.contact-form { background: #fff; color: var(--ink); border-radius: 12px; padding: 36px; display: flex; flex-direction: column; }
.contact-form label { font-size: 15px; font-weight: 600; color: var(--navy); margin: 0 0 6px; }
.contact-form input[type=text], .contact-form textarea {
  width: 100%; min-height: 48px; padding: 0 14px; margin-bottom: 20px; border: 1.5px solid #C5CEDB; border-radius: 8px;
  font: 17px/1.4 inherit; font-family: inherit; color: var(--ink); background: #fff;
}
.contact-form textarea { padding: 12px 14px; min-height: 130px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal-d); }
.contact-form .btn { width: 100%; min-height: 52px; font-size: 17px; }
.contact-form .btn-primary:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- case page ---------- */
.case { padding: 64px 0 24px; }
.back { margin-bottom: 32px; }
.back-link { font-weight: 600; font-size: 16px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.case-meta { display: flex; gap: 16px; align-items: baseline; font-size: 15px; font-weight: 600; color: var(--muted); }
.case h1 { margin: 14px 0 40px; font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.banner { border: 1px solid var(--teal-d); border-left-width: 4px; border-radius: 8px; padding: 12px 18px; margin: -16px 0 32px; background: #EEF7F7; font-size: 16px; }
.case-body { max-width: 760px; font-size: 18px; line-height: 1.7; }
.case-body p { margin-bottom: 20px; }
.case-body h2 { font-size: 26px; margin: 56px 0 28px; padding-bottom: 16px; }
.case-body ul { padding-left: 24px; margin-bottom: 24px; }
.case-body li { margin-bottom: 10px; }
.case-body li::marker { color: var(--teal-d); }
.case-body ul ul { margin: 10px 0 0; }
.diagram { margin: 40px 0; }
.diagram img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.diagram figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 64px 0 56px; }
.case-nav a { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.case-nav a:hover { border-color: var(--teal); transform: translateY(-2px); }
.case-nav .next { grid-column: 2; text-align: right; }
.case-nav .dir { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--teal-d); }
.case-nav .name { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.cta-band { background: var(--navy); padding: 56px 0; text-align: center; }

.thanks { padding: 120px 0; }
.thanks h1 { font-size: 40px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.thanks .lead { color: var(--muted); margin-bottom: 28px; }
.thanks .btn-secondary { color: var(--navy); border-color: var(--navy); }
.thanks .btn-secondary:hover { background: var(--navy); color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); border-top: 1px solid #1B2A44; color: #9AA9BE; font-size: 15px; padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr 260px; gap: 40px; }
  .hero h1 { font-size: 52px; }
  .portrait-wrap { width: 260px; height: 260px; }
  .site-nav { gap: 20px; }
  .site-nav ul { gap: 18px; }
  .contact-grid { gap: 40px; }
}
@media (max-width: 820px) {
  .js .menu-btn { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; position: absolute; top: var(--head); left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 16px; background: var(--navy); border-bottom: 1px solid #1B2A44; padding: 20px 24px 24px; }
  .js .site-nav.open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 4px; width: 100%; }
  .js .site-nav li a { display: block; padding: 12px 0; font-size: 18px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; text-align: left; }
  .portrait-wrap { order: -1; justify-self: center; width: 200px; height: 200px; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 40px; }
  .hero .lead { font-size: 18px; }
  .hero .actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: 1fr; gap: 24px; }
  .stats-band { padding: 40px 0; }
  .stats .value { font-size: 40px; }
  #about .about-text { columns: auto; column-count: 1; }
  #about .about-text p:first-child { break-after: auto; }
  .case-grid, .skills-grid, .contact-grid, .two-col { grid-template-columns: 1fr; }
  .case-grid { gap: 24px; }
  .contact-form { padding: 24px; }
  .case h1 { font-size: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 30px; margin-bottom: 32px; }
  .section-intro { margin: -12px 0 32px; font-size: 17px; }
  .case { padding-top: 40px; }
  .case-nav { grid-template-columns: 1fr; margin: 48px 0 40px; }
  .case-nav .next { grid-column: 1; text-align: left; }
  .timeline { padding-left: 28px; }
  .timeline > li::before { left: -38px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
