/* ============================================================
   Site-wide 2026 visual pass — loaded when params.navStyle != "classic".
   Scoped under body.nav-redesign so classic mode is unchanged.
   Does not rewrite project articles or the portfolio filter JS.
   ============================================================ */

body.nav-redesign {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Shared content width: match homepage + compact navbar (1120px) */
body.nav-redesign .container,
body.nav-redesign .intro-header .container,
body.nav-redesign footer .container {
  max-width: 1120px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}
body.nav-redesign .intro-header .container > .row,
body.nav-redesign header .container > .row {
  margin-left: 0;
  margin-right: 0;
}
body.nav-redesign .intro-header .container > .row > [class*="col-"],
body.nav-redesign header .container > .row > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  margin-left: 0 !important;
  float: none;
  padding-left: 0;
  padding-right: 0;
}

/* Active compact-nav item: teal + underline (same for Projects / About / Contact) */
body.nav-redesign .navbar-custom.navbar-redesign .nav > li.active > a,
body.nav-redesign .navbar-custom.navbar-redesign .nav > li.active .slow_hover > a {
  color: #087f8c;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
body.nav-redesign .navbar-custom.navbar-redesign #fontToggle {
  font-weight: 600;
}

/* Page titles */
body.nav-redesign .page-heading h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 6px;
}
body.nav-redesign .page-subtitle {
  font-size: 20px;
  color: #555;
  font-weight: 400;
  margin: 0 0 8px;
}
body.nav-redesign .page-kicker {
  font-size: 14px;
  color: #087f8c;
  margin: 0 0 18px;
}
body.nav-redesign .page-back {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
body.nav-redesign .page-back a {
  color: #087f8c;
  text-decoration: none;
}
body.nav-redesign .page-back a:hover {
  text-decoration: underline;
}
body.nav-redesign .intro-header.no-img {
  padding-top: 16px;
  padding-bottom: 8px;
}

/* ---------- Portfolio filters ---------- */
body.nav-redesign .portfolio-filters-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin: 4px 0 28px;
}
body.nav-redesign .portfolio-filters {
  margin: 0;
  flex: 1 1 220px;
  min-width: 0;
}
body.nav-redesign .portfolio-browse {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-left: auto;
  font-size: 13.5px;
  color: #888;
}
body.nav-redesign .portfolio-browse-label {
  font-weight: 500;
  color: #888;
}
body.nav-redesign .portfolio-browse a {
  color: #087f8c;
  font-weight: 600;
  text-decoration: none;
}
body.nav-redesign .portfolio-browse a:hover,
body.nav-redesign .portfolio-browse a:focus {
  text-decoration: underline;
}
body.nav-redesign .portfolio-filters-toggle {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 600;
  color: #087f8c;
  padding: 2px 0;
}
body.nav-redesign .portfolio-filters-toggle::-webkit-details-marker,
body.nav-redesign .portfolio-filters-toggle::marker {
  display: none;
  content: '';
}
body.nav-redesign .portfolio-filters-toggle::before {
  content: '';
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin: 0 2px 1px 0;
  flex: 0 0 auto;
}
body.nav-redesign .portfolio-filters[open] .portfolio-filters-toggle::before {
  transform: rotate(45deg);
  margin-bottom: 3px;
}
body.nav-redesign .portfolio-filters-hint {
  font-weight: 500;
  font-size: 13.5px;
  color: #888;
}
body.nav-redesign .filter-projects-label {
  display: none;
}
body.nav-redesign .facet-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 40px;
  background: transparent;
  border: 0;
  border-top: 1px solid #ececec;
  border-radius: 0;
  padding: 18px 0 4px;
  margin: 10px 0 0;
}
body.nav-redesign .facet-row .filters {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
body.nav-redesign .facet-row fieldset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 100%;
}
body.nav-redesign .facet-row legend {
  float: none;
  display: block;
  width: auto;
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  border: 0;
  margin: 0 0 4px;
  padding: 0;
  line-height: 1.2;
}
body.nav-redesign .facet-row .filters a {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  color: #555;
  text-decoration: none;
  box-shadow: none;
  transform: none;
}
body.nav-redesign .facet-row .filters a:hover,
body.nav-redesign .facet-row .filters a:focus {
  border: 0;
  color: #087f8c;
  background: transparent;
  text-decoration: none;
}
body.nav-redesign .facet-row .filters a.active {
  background: transparent;
  border: 0;
  color: #087f8c;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}
body.nav-redesign .facet-row .filters a:focus-visible {
  outline: 2px solid #087f8c;
  outline-offset: 2px;
}
body.nav-redesign .facet-break {
  display: none;
}
body.nav-redesign .extra-filters-row {
  margin: 0 0 20px;
}
body.nav-redesign .extra-filters a {
  color: #087f8c;
  font-weight: 600;
  font-size: 13.5px;
}
body.nav-redesign .filters-scale fieldset {
  gap: 8px;
}
body.nav-redesign .scale-slider {
  width: 100%;
  max-width: 240px;
  --scale-pct: 50%;
  --scale-fill: #087f8c;
  --scale-track: #e5e5e5;
  --scale-thumb: #fff;
}
body.nav-redesign .scale-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--scale-fill) 0 var(--scale-pct), var(--scale-track) var(--scale-pct) 100%);
  outline: none;
  margin: 8px 0 8px;
  cursor: pointer;
}
body.nav-redesign .scale-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--scale-thumb);
  border: 2px solid var(--scale-fill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
body.nav-redesign .scale-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--scale-fill);
  border-radius: 50%;
  background: var(--scale-thumb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
body.nav-redesign .scale-slider input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border: 0;
}
body.nav-redesign .scale-slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
body.nav-redesign .scale-slider-labels button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  line-height: 1.3;
}
body.nav-redesign .scale-slider-labels button:hover,
body.nav-redesign .scale-slider-labels button.active {
  color: #087f8c;
  font-weight: 700;
}
@media (max-width: 800px) {
  body.nav-redesign .facet-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  body.nav-redesign .facet-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Portfolio cards ---------- */
body.nav-redesign .list-cards {
  gap: 40px 36px;
}
body.nav-redesign .list-cards .card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
body.nav-redesign .list-cards .card:hover {
  background: #fafafa;
  border-color: #e8e8e8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
body.nav-redesign .list-cards .card .images {
  aspect-ratio: 3 / 2;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
body.nav-redesign .list-cards .card .content {
  padding: 16px 18px 12px;
}
body.nav-redesign .list-cards .card .content a h2,
body.nav-redesign .list-cards .card .post-title {
  font-size: 22px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0 0 6px;
}
body.nav-redesign .list-cards .card .content p {
  font-size: 16px;
  color: #444;
  line-height: 1.45;
}
body.nav-redesign .list-cards .card .card-cats {
  justify-content: flex-start;
  margin-top: 4px;
  margin-bottom: 10px;
  gap: 6px;
}
body.nav-redesign .list-cards .card .card-cats .cat {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  line-height: 1.3;
  border-radius: 999px;
  background: rgba(8, 127, 140, 0.1);
  border: 0;
  color: #087f8c;
}
body.nav-redesign .list-cards .card .card-cats .cat:hover {
  background: rgba(8, 127, 140, 0.18);
  filter: none;
  color: #065f69;
}
body.nav-redesign .list-cards .card .content .footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 8px !important;
}
body.nav-redesign .list-cards .card .content .footer p {
  margin: 0;
  font-size: 13.5px;
}
body.nav-redesign .list-cards .card .content .footer p a {
  color: #087f8c;
  font-weight: 600;
}
body.nav-redesign .list-cards .card .content .footer .date {
  opacity: 0.7;
  white-space: nowrap;
}

/* ---------- Project pages ---------- */
body.nav-redesign .project-hero {
  margin: 0 0 32px;
}
body.nav-redesign .project-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  background: #f2f2f2;
}
body.nav-redesign .project-hero figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #888;
}
body.nav-redesign .project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  position: relative;
}
@media (min-width: 992px) {
  body.nav-redesign .project-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: start;
  }
  body.nav-redesign .project-sidebar {
    position: sticky;
    top: 88px;
  }
  body.nav-redesign .project-page .sidebar__right {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    right: auto;
  }
}
body.nav-redesign .project-page .blog-post {
  font-size: 17px;
  line-height: 1.6;
}
body.nav-redesign .project-page .blog-post h2,
body.nav-redesign .project-page .blog-post h3 {
  font-weight: 800;
  margin-top: 1.6em;
}
body.nav-redesign .project-page .table-of-contents {
  border: 0;
  background: transparent;
  padding: 0;
}
body.nav-redesign .project-page .nav__title {
  border: 0;
  background: transparent;
  color: #888;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  padding: 0;
  margin: 0 0 10px;
}
body.nav-redesign .project-page .toc a {
  color: #555;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  display: inline-block;
  margin: 4px 0;
}
body.nav-redesign .project-page .toc a:hover {
  color: #087f8c;
}
body.nav-redesign .project-page #makesticky {
  display: none;
}
body.nav-redesign .project-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
  font-weight: 600;
}
body.nav-redesign .project-pager a {
  color: #087f8c;
  text-decoration: none;
}
body.nav-redesign .project-pager a:hover {
  text-decoration: underline;
}
body.nav-redesign .project-page .blog-tags a {
  color: #087f8c;
  font-size: 13.5px;
}

/* Breadcrumbs + See also */
body.nav-redesign .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 28px 0 0;
  border-radius: 0;
}
body.nav-redesign #breadcrumbs {
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 0;
}
body.nav-redesign #breadcrumbs li:not(:first-child):before {
  content: '›';
  color: #bbb;
  margin: 0 8px 0 2px;
}
body.nav-redesign #breadcrumbs a {
  color: #087f8c;
  font-weight: 600;
}
body.nav-redesign #breadcrumbs span {
  color: #777;
  font-weight: 500;
}
body.nav-redesign .see-also {
  margin: 20px 0 8px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}
body.nav-redesign .see-also h3,
body.nav-redesign h4.see-also {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 10px;
}
body.nav-redesign .see-also ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
body.nav-redesign .see-also li {
  margin: 0;
}
body.nav-redesign .see-also a {
  color: #087f8c;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
body.nav-redesign .see-also a:hover {
  text-decoration: underline;
}

body.nav-redesign .project-facets {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #ececec;
}
body.nav-redesign .project-facet {
  margin: 0 0 16px;
}
body.nav-redesign .project-facet-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 8px;
}
body.nav-redesign .project-facet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
body.nav-redesign .project-facet-chips a {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #f4f4f4;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
}
body.nav-redesign .project-facet-chips a:hover,
body.nav-redesign .project-facet-chips a:focus {
  color: #087f8c;
  border-color: #087f8c;
  background: #fff;
}

/* Content links: teal, matching homepage */
body.nav-redesign .blog-post a,
body.nav-redesign .well a {
  color: #087f8c;
}

/* Pages with no TOC and no facet chips: one centered column, no ghost sidebar */
body.nav-redesign.page-plain .container[role="main"] > .row > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  margin-left: 0 !important;
  float: none;
  padding-left: 0;
  padding-right: 0;
}
body.nav-redesign.page-plain .page-heading,
body.nav-redesign.page-plain.section-page .blog-post:not(.contact-article) {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Contact page ---------- */
body.nav-redesign:has(.contact-page) .intro-header.no-img {
  padding-bottom: 0;
}
body.nav-redesign:has(.contact-page) .page-heading hr.small {
  margin-bottom: 36px !important;
}
body.nav-redesign .contact-page {
  padding-bottom: 48px;
}
body.nav-redesign .contact-hero {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.5fr);
  gap: 32px 48px;
  align-items: stretch;
}
body.nav-redesign .contact-hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
body.nav-redesign .contact-article {
  font-size: 17px;
  line-height: 1.65;
  max-width: none;
  margin: 0;
}
body.nav-redesign .contact-photo-box {
  max-width: 280px;
  width: 100%;
  margin: 0 auto;
}
body.nav-redesign .contact-photo {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  background-color: #6a6562;
  -webkit-box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.8);
  -moz-box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.8);
  box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.8);
}
body.nav-redesign .contact-photo-inner {
  background-image: url(/images/cv_pic.jpg);
  background-position: 50% 12%;
  background-repeat: no-repeat;
  background-size: 112%;
  display: block;
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: -8%;
  right: -8%;
}
@media (prefers-reduced-motion: no-preference) {
  body.nav-redesign .contact-photo-inner:not(.without-move) {
    transition: background-position 0.3s ease-out;
  }
}
@media only screen and (max-width: 900px) {
  body.nav-redesign .contact-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  body.nav-redesign .contact-photo-box {
    max-width: 200px;
  }
}
body.nav-redesign .contact-page > .see-also {
  max-width: 680px;
  margin: 36px auto 0;
  text-align: center;
}
body.nav-redesign .contact-page > .see-also ul {
  justify-content: center;
}
body.nav-redesign .contact-intro {
  margin-top: 0;
}
body.nav-redesign .contact-prompt {
  margin-top: 0;
}
body.nav-redesign .contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
}
body.nav-redesign .contact-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
body.nav-redesign .contact-page .contact-btn-primary {
  background: #087f8c;
  color: #fff;
  border: 2px solid #087f8c;
}
body.nav-redesign .contact-page .contact-btn-primary:hover,
body.nav-redesign .contact-page .contact-btn-primary:focus {
  background: #066a75;
  border-color: #066a75;
  color: #fff;
}
body.nav-redesign .contact-page .contact-btn-secondary {
  background: transparent;
  color: #087f8c;
  border: 2px solid #087f8c;
}
body.nav-redesign .contact-page .contact-btn-secondary:hover,
body.nav-redesign .contact-page .contact-btn-secondary:focus {
  background: rgba(8, 127, 140, 0.08);
  color: #065f69;
}
body.nav-redesign .contact-page .contact-btn:focus-visible {
  outline: 2px solid #087f8c;
  outline-offset: 3px;
}
body.nav-redesign .contact-hint,
body.nav-redesign .contact-telegram,
body.nav-redesign .contact-more {
  color: #555;
  font-size: 15.5px;
}
body.nav-redesign .contact-more p {
  margin: 1em 0 0;
}
