/* Resume / CV pages. Composition only: every colour, font and radius comes
   from tokens.css, and the components (about-heading, about-text, skills-*,
   project-link, project-chip, social-links) come from styles.css. */

.doc {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 6vh) 6vw 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  --doc-gap: 56px;
  gap: var(--doc-gap);
}

.doc-head {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.doc--cv .doc-head {
  justify-content: space-between;
}
.doc-head__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doc-photo {
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    var(--photo-src) bottom center / 78% auto no-repeat,
    linear-gradient(180deg, var(--bg-panel-from) 0%, var(--bg-panel-to) 100%);
  filter: grayscale(var(--photo-grayscale, 1));
}
.doc-kicker {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.doc-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-stretch: var(--font-display-stretch);
  letter-spacing: var(--font-display-tracking);
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1;
  color: var(--text-primary);
}
.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}
.doc-links li + li::before {
  content: "|";
  margin: 0 12px;
  color: var(--text-muted);
}
.doc-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.doc-links a:hover {
  color: var(--accent-interactive);
}

.doc-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}
.doc-section .about-text {
  max-width: 720px;
}
.doc-rule {
  display: flex;
  align-items: center;
  gap: 16px;
}
.doc-rule::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border-subtle);
}

.doc-entry {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.doc-entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.doc-entry__title {
  width: auto;
  cursor: auto;
}
.doc-entry__title span {
  font-weight: 300;
}
.doc-entry__note {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
}
.doc-entry .about-text {
  gap: 16px;
}
.doc-entry--sub {
  padding-left: 24px;
}
.doc-section--projects {
  gap: 24px;
}
.doc-section--projects + .doc-section--projects {
  margin-top: calc(24px - var(--doc-gap));
}

.doc-skills .skills {
  max-width: none;
}
.doc-skills .skills-group__label {
  width: 220px;
}

.doc-cert {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doc-cert__label {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .doc {
    --doc-gap: 40px;
  }
  .doc-head,
  .doc--cv .doc-head {
    flex-direction: column;
    gap: 24px;
  }
  .doc--cv .doc-photo {
    order: -1;
  }
  .doc-photo {
    width: 96px;
  }
  .doc-links {
    flex-direction: column;
    gap: 8px;
  }
  .doc-links li + li::before {
    content: none;
  }
  .doc-skills .skills-group__label {
    width: auto;
  }
}

@media (max-width: 900px) {
  .doc-skills .skills-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

.doc-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.doc-download:hover {
  color: var(--accent-interactive);
  border-color: var(--border-strong);
}
.doc-download:focus-visible {
  outline: 2px solid var(--accent-interactive);
  outline-offset: 4px;
}
.doc-download__icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.site-nav__link[aria-current="page"] {
  position: relative;
}
.site-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--text-primary);
}

.doc-copy {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}
.doc-copy:hover,
.doc-copy.is-copied {
  color: var(--accent-interactive);
}
.doc-copy:focus-visible {
  outline: 2px solid var(--accent-interactive);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}
.doc-copy__tip {
  position: absolute;
  top: 50%;
  left: 100%;
  margin-left: 10px;
  transform: translateY(-50%);
  padding: 2px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.doc-copy:hover .doc-copy__tip,
.doc-copy:focus-visible .doc-copy__tip,
.doc-copy.is-copied .doc-copy__tip {
  opacity: 1;
}

@keyframes doc-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.doc-anim [data-reveal]:not(.is-visible) {
  opacity: 0;
}
.doc-anim [data-reveal].is-visible {
  animation: doc-rise 0.5s ease backwards;
}

@media (min-width: 769px) {
  .site-nav__links .site-nav__link:nth-child(2) {
    margin-right: auto;
  }
}

.doc-lang {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
}
.doc-lang__opt {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.doc-lang__opt:hover {
  color: var(--accent-interactive);
}
.doc-lang__opt[aria-current="page"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 500;
  pointer-events: none;
}
.doc-lang__opt:focus-visible {
  outline: 2px solid var(--accent-interactive);
  outline-offset: 2px;
}
@media (max-width: 768px) {
  .doc-lang__opt {
    padding: 5px 16px;
    font-size: 14px;
  }
}
