html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--clay-d);
  color: #fff;
  font-family: 'Plex', monospace;
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sheet {
  max-width: 960px;
  margin-top: 20px;
  border-radius: 4px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .05);
}

.topbar {
  max-width: 960px;
  padding: 16px 8px 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1.5px solid var(--clay);
  border-radius: 30px;
  padding: 9px 14px;
  background: transparent;
  color: var(--clay-d);
  font-family: 'Plex', monospace;
  font-size: 12px;
  letter-spacing: .03em;
  cursor: pointer;
}

.btn-print svg {
  width: 15px;
  height: 15px;
}

.btn-print:hover {
  background: var(--chip-bg);
}

.exp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--clay-d);
  font-family: 'Plex', monospace;
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
}

.exp-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exp-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .18s ease;
}

.exp-toggle[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}

.exp-details[hidden] {
  display: none;
}

.nd-item {
  color: inherit;
  text-decoration: none;
}

.nd-item:focus-visible .nd-label {
  opacity: 1;
  transform: translateX(0);
}

.nd-item[aria-current="location"] .nd-dot {
  background: var(--clay);
  transform: scale(1.3);
}

.exp-head,
.sub-h {
  gap: 10px;
}

.hero-left,
.sg-chips,
.two > *,
.exp,
.exp-top,
.sub,
.stack,
.ln,
.st-text {
  min-width: 0;
}

.co,
.role,
.pj-t,
.sub-t,
.st-text,
.contact a {
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(14, 110, 115, .38);
  outline-offset: 3px;
}

.fld input:focus-visible,
.fld textarea:focus-visible {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(14, 110, 115, .18);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--chip-bd);
  border-radius: 30px;
  padding: 9px 13px;
  background: rgba(245, 243, 237, .96);
  color: var(--clay-d);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
  font-family: 'Plex', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1020px) {
  .nav-dots {
    right: 10px;
  }

  .sheet,
  .topbar,
  footer.site {
    margin-left: 18px;
    margin-right: 54px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 780px) {
  body {
    padding-bottom: 78px;
  }

  .sheet,
  .topbar,
  footer.site {
    margin-left: 10px;
    margin-right: 10px;
  }

  .nav-dots {
    position: fixed;
    inset: auto 8px 8px;
    z-index: 150;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    transform: none;
    padding: 6px;
    border: 1px solid rgba(14, 110, 115, .18);
    border-radius: 12px;
    background: rgba(245, 243, 237, .96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    backdrop-filter: blur(12px);
  }

  .nd-group {
    display: none;
  }

  .nd-item.nd-main {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 6px 3px;
    border-radius: 8px;
  }

  .nd-main .nd-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink2);
    font-size: 9px;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal;
    opacity: 1;
    transform: none;
  }

  .nd-main .nd-dot {
    display: none;
  }

  .nd-item.active,
  .nd-item[aria-current="location"] {
    background: var(--chip-bg);
  }

  .back-to-top {
    right: 14px;
    bottom: 76px;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 130;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
    background: rgba(232, 230, 221, .96);
    backdrop-filter: blur(10px);
  }

  .topbar-actions {
    min-width: 0;
    gap: 7px;
  }

  .btn-contact,
  .btn-print,
  .btn-dl {
    width: auto;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .btn-contact {
    min-width: 0;
  }

  .btn-contact span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .document-actions {
    justify-content: flex-end;
  }

  .lang-btn {
    min-height: 38px;
    padding: 6px 10px;
  }

  .sheet {
    margin-top: 8px;
    padding-right: 18px;
    padding-left: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  }

  .sheet .portrait,
  .sheet .portrait img {
    width: 108px;
    height: 138px;
  }

  .sheet .name {
    font-size: clamp(31px, 10vw, 38px);
  }

  .sec-head,
  .exp-head,
  .sub-h {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .sec-head .h-meta {
    width: 100%;
    margin-left: 0;
  }

  .badge,
  .badge.big {
    white-space: normal;
  }

  footer.site {
    margin-bottom: 18px;
    padding: 0 14px;
  }
}

@media (max-width: 430px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .btn-contact {
    flex: 1 1 auto;
  }

  .btn-dl {
    flex: 1 1 auto;
  }

  .document-actions {
    width: 100%;
  }

  .btn-print {
    flex: 0 0 auto;
  }

  .nd-main .nd-label {
    font-size: 8px;
    letter-spacing: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    overflow: visible;
    background: #fff;
  }

  body {
    padding: 0;
    font-size: 10pt;
  }

  .skip-link,
  .nav-dots,
  .back-to-top {
    display: none !important;
  }

  .sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .exp-details[hidden] {
    display: block;
  }

  .exp-toggle {
    display: none;
  }

  .exp,
  .sg,
  .sub,
  .stack {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
