/*
 * inimene.html lehe-spetsiifiline CSS
 */

.profile-wrap {
  width: min(1080px, 92vw);
  margin: 24px auto 70px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--menu-base);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  font-weight: 580;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color 200ms ease, border-color 200ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--color-brand-deep);
  border-color: currentColor;
}

.back-link:focus-visible {
  outline: 2px solid var(--menu-base);
  outline-offset: 4px;
}

.profile-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 32px;
  align-items: start;
}

.profile-media {
  width: 100%;
  max-width: 320px;
}

.photo-box {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-near-black);
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(236, 232, 220, 0.92), rgba(246, 243, 234, 1));
}

.photo-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.photo-box img.loaded {
  opacity: 1;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.74);
}

.profile-photo-fallback {
  position: absolute;
  inset: 0;
  background: url("../../namm-assets/backgrounds/join-card-kristjan-empty-background-bright-copy.webp") center / cover no-repeat;
}

.person-name {
  margin: 0;
  font-family: "Avenir Next", "Mulish", sans-serif;
  font-size: clamp(1.72rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0.003em;
  text-transform: none;
  font-weight: 590;
  color: var(--color-black);
}

.person-role {
  margin: 12px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-black-70);
}

.profile-extra {
  margin-top: 30px;
  max-width: 62ch;
}

.profile-extra[hidden],
.profile-side-sections[hidden] {
  display: none;
}

.profile-contact-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.profile-contact-list li {
  display: grid;
  grid-template-columns: minmax(140px, 0.34fr) 1fr;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.profile-contact-label,
.profile-section h2 {
  font-size: 0.884rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--menu-base);
}

.profile-contact-value {
  color: var(--color-black-86);
}

.bio {
  margin: 24px 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  line-height: 1.74;
  max-width: 62ch;
  color: var(--color-black-86);
}

.profile-intro {
  margin: 0 0 34px;
  font-size: 0.95rem;
  line-height: 1.74;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.78);
}

.profile-sections {
  display: grid;
  gap: 22px;
}

.profile-side-sections {
  margin-top: 28px;
  width: 100%;
}

.profile-section {
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.profile-section h2 {
  margin: 0 0 8px;
}

.profile-section p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-black-72);
}

.profile-placeholder {
  font-style: italic;
}

.profile-divider[hidden],
.profile-cv[hidden] {
  display: none;
}

html.profile-detail-page,
body.profile-detail-page {
  background: var(--color-bg);
}

body.profile-detail-page {
  --profile-bg: var(--color-bg);
  --profile-ink: var(--color-ink);
  --profile-muted: var(--color-text-body-soft);
  --profile-accent: var(--color-brand);
  --profile-accent-strong: var(--color-brand-deep);
  --profile-line: var(--color-line-subtle);
  font-family: "Avenir Next", "Mulish", sans-serif;
  color: var(--profile-ink);
}

body.profile-detail-page .profile-wrap {
  width: min(1200px, calc(100% - 160px));
  margin: 80px auto 0;
  color: var(--profile-ink);
}

body.profile-detail-page .back-link {
  color: var(--profile-accent);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  font-weight: 580;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color 200ms ease, border-color 200ms ease;
}

body.profile-detail-page .back-link:hover {
  color: var(--profile-accent-strong);
  border-color: currentColor;
}

body.profile-detail-page .back-link:focus-visible,

body.profile-detail-page .profile-wrap a:focus-visible {
  outline: 2px solid var(--profile-accent);
  outline-offset: 4px;
}

body.profile-detail-page .profile-card {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 0;
  align-items: start;
}

body.profile-detail-page .profile-media {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  color: var(--profile-ink);
  letter-spacing: 0;
}

body.profile-detail-page .profile-info {
  grid-column: 7 / span 6;
  color: var(--profile-ink);
  letter-spacing: 0;
}

body.profile-detail-page .photo-box {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 0;
  background: var(--color-surface-muted);
}

body.profile-detail-page .photo-box img {
  filter: grayscale(1) brightness(1);
  transition: filter 400ms ease;
}

body.profile-detail-page .photo-box:hover img {
  filter: grayscale(1) brightness(1.05);
}

body.profile-detail-page .person-name {
  font-family: "Avenir Next", "Mulish", sans-serif;
  margin: 32px 0 0;
  max-width: 460px;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  color: var(--profile-ink);
}

body.profile-detail-page .person-role {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--profile-accent);
}

body.profile-detail-page .profile-extra {
  max-width: 460px;
  margin-top: 32px;
}

body.profile-detail-page .profile-info--with-contact .profile-extra {
  max-width: none;
  margin-top: 34px;
}

body.profile-detail-page .profile-media--wide-contact .profile-extra {
  width: calc(200% + 24px);
  max-width: none;
  margin-top: 32px;
}

body.profile-detail-page .profile-card--contact-contained .profile-media--wide-contact .profile-extra {
  width: 100%;
}

body.profile-detail-page .profile-card--contact-contained .profile-media--wide-contact .profile-contact-inline {
  row-gap: 10px;
}

html[lang="ru"] body.profile-detail-page .profile-media--wide-contact .profile-extra {
  width: 100%;
}

body.profile-detail-page .profile-media--wide-contact .profile-media-heading {
  display: none;
}

body.profile-detail-page .profile-contact-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line-subtle);
}

body.profile-detail-page .profile-info--with-contact .profile-contact-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding-top: 20px;
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 12px 0 0;
  border-top: 0;
  border-bottom: 0;
}

body.profile-detail-page .profile-contact-office,
body.profile-detail-page .profile-contact-primary {
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.45;
  font-weight: 580;
  letter-spacing: 0.003em;
}

body.profile-detail-page .profile-info--with-contact .profile-contact-primary {
  font-size: clamp(18px, 1.3vw, 20px);
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-primary {
  font-size: clamp(17px, 1.16vw, 18px);
  font-weight: 580;
}

body.profile-detail-page .profile-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--profile-muted);
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-meta {
  font-size: clamp(17px, 1.16vw, 18px);
  color: var(--color-text-body-softer);
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-office {
  font-size: clamp(17px, 1.16vw, 18px);
  color: var(--color-text-body-softer);
}

body.profile-detail-page .profile-info--with-contact .profile-contact-meta,
body.profile-detail-page .profile-info--with-contact .profile-contact-links,
body.profile-detail-page .profile-media--wide-contact .profile-contact-office,
body.profile-detail-page .profile-media--wide-contact .profile-contact-meta,
body.profile-detail-page .profile-media--wide-contact .profile-contact-links {
  align-items: center;
}

body.profile-detail-page .profile-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--profile-accent);
}

body.profile-detail-page .profile-info--with-contact .profile-contact-links {
  gap: 0;
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-links {
  flex-basis: auto;
  gap: 0;
  margin-top: 0;
  font-size: clamp(17px, 1.16vw, 18px);
  color: var(--color-text-body-softer);
}

body.profile-detail-page .profile-contact-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin: 0 0.58rem;
  border-radius: 50%;
  background: var(--color-panel-profile-separator);
  color: transparent;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
}

body.profile-detail-page .profile-contact-inline a,
body.profile-detail-page .profile-cta-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

body.profile-detail-page .profile-contact-primary a {
  color: var(--profile-accent);
  text-decoration-color: transparent;
}

body.profile-detail-page .profile-contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--profile-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  text-transform: none;
  letter-spacing: 0.003em;
  font-weight: 580;
  transition:
    color 200ms ease,
    text-decoration-color 200ms ease;
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-primary a {
  color: var(--profile-accent);
  text-decoration-color: transparent;
}

body.profile-detail-page .profile-info--with-contact .profile-contact-links a {
  min-height: 31px;
  padding: 0.5rem 0.62rem;
  font-size: 11px;
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-links a {
  min-height: 0;
  padding: 0;
  font-size: inherit;
}

body.profile-detail-page .profile-contact-links span:not(.profile-contact-separator) {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--profile-accent);
  text-transform: none;
  letter-spacing: 0.003em;
  font-weight: 580;
}

body.profile-detail-page .profile-contact-links .profile-contact-separator {
  min-height: 0;
  padding: 0;
  border: 0;
}

body.profile-detail-page .profile-media--wide-contact .profile-contact-links .profile-contact-separator:first-child {
  display: none;
}

body.profile-detail-page .profile-contact-inline a:hover,
body.profile-detail-page .profile-contact-inline a:focus-visible,
body.profile-detail-page .profile-cta-link:hover,
body.profile-detail-page .profile-cta-link:focus-visible {
  color: var(--profile-accent-strong);
  text-decoration-color: currentColor;
}

body.profile-detail-page .profile-contact-links a:hover,
body.profile-detail-page .profile-contact-links a:focus-visible {
  color: var(--profile-accent-strong);
  text-decoration-color: currentColor;
}

body.profile-detail-page .profile-eyebrow {
  margin: 0;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.14em;
  font-weight: 580;
  text-transform: uppercase;
  color: var(--profile-accent);
}

body.profile-detail-page .profile-short-line {
  width: 40px;
  height: 1px;
  margin: 24px 0 32px;
  background: var(--profile-line);
}

body.profile-detail-page .profile-cv .profile-short-line {
  margin: 12px 0 20px;
  background: var(--color-line-strong);
}

body.profile-detail-page .profile-intro-block {
  max-width: 560px;
}

body.profile-detail-page .profile-intro-block--empty .profile-short-line {
  margin-bottom: 0;
}

body.profile-detail-page .profile-intro-name {
  margin: 0;
  font-family: "Avenir Next", "Mulish", sans-serif;
  font-size: 56px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--profile-ink);
  text-transform: none;
}

body.profile-detail-page .profile-intro-role {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--profile-accent);
}

body.profile-detail-page .profile-intro {
  margin: 0;
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: 0;
  font-style: normal;
  color: var(--color-text-body-soft);
}

body.profile-detail-page .profile-intro p {
  margin: 0 0 16px;
}

body.profile-detail-page .profile-intro p:last-child {
  margin-bottom: 0;
}

body.profile-detail-page .profile-intro p.is-emphasis {
  margin: 0 0 24px;
  font-size: 22px;
  line-height: 1.5;
  color: var(--profile-accent-strong);
}

body.profile-detail-page .profile-text-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 560ms cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: var(--profile-text-delay, 0ms);
}

body.profile-detail-page .profile-reveal.is-visible .profile-text-reveal {
  opacity: 1;
  transform: translateY(0);
}

body.profile-detail-page .profile-divider {
  width: 100%;
  height: 1px;
  margin: 96px 0 64px;
  background: var(--profile-line);
}

body.profile-detail-page .profile-cv {
  display: grid;
  grid-template-columns:
    minmax(0, 1.34fr)
    minmax(0, 1.42fr)
    minmax(0, 0.78fr)
    minmax(0, 1.08fr);
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: 96px;
}

body.profile-detail-page .profile-cv-column {
  min-width: 0;
}

body.profile-detail-page .profile-cv-column[data-profile-cv-column="languages"] {
  margin-left: clamp(18px, 2vw, 34px);
}

body.profile-detail-page .profile-cv-column[data-profile-cv-column="membership"] {
  margin-left: clamp(22px, 2.6vw, 46px);
}

body.profile-detail-page .profile-cv-column[data-profile-cv-position="1"] {
  grid-column: 1 / span 2;
  grid-row: 2;
  margin-top: clamp(28px, 4vw, 48px);
}

body.profile-detail-page .profile-cv-column[data-profile-cv-position="2"] {
  grid-column: 3 / span 2;
  grid-row: 2;
  margin-left: clamp(18px, 2vw, 34px);
  margin-top: clamp(28px, 4vw, 48px);
}

body.profile-detail-page .profile-cv-column[data-profile-cv-position="3"] {
  grid-column: 1 / span 2;
  grid-row: 3;
  margin-top: clamp(10px, 2vw, 24px);
}

body.profile-detail-page .profile-cv-stack + .profile-cv-stack {
  margin-top: 28px;
}

body.profile-detail-page .profile-cv-content {
  margin: 0;
  font-size: clamp(15.5px, 1.04vw, 17px);
  line-height: 1.68;
  letter-spacing: 0;
  font-style: normal;
  color: var(--color-text-body-soft);
  white-space: pre-line;
}

body.profile-detail-page .profile-publications-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
  white-space: normal;
}

body.profile-detail-page .profile-plain-list {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  white-space: normal;
}

body.profile-detail-page .profile-plain-list li {
  margin: 0;
}

body.profile-detail-page .profile-plain-list a {
  color: var(--color-text-body-soft);
  text-decoration: none;
  transition: color 200ms ease;
}

body.profile-detail-page .profile-plain-list a:hover,
body.profile-detail-page .profile-plain-list a:focus-visible {
  color: var(--profile-accent);
}

body.profile-detail-page .profile-publications-list li {
  margin: 0;
  position: relative;
  padding-left: 1.55rem;
}

body.profile-detail-page .profile-publications-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: -0.01em;
  color: var(--profile-accent);
  font-size: 1.42em;
  line-height: 1.2;
  font-weight: 580;
  opacity: 0.72;
  transform: translateX(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

body.profile-detail-page .profile-publications-list a {
  display: inline-block;
  color: var(--color-text-body-soft);
  text-decoration: none;
  transition: color 200ms ease;
}

body.profile-detail-page .profile-publications-list li:hover::before,
body.profile-detail-page .profile-publications-list li:focus-within::before {
  opacity: 1;
  transform: translateX(0);
}

body.profile-detail-page .profile-publications-list a:hover,
body.profile-detail-page .profile-publications-list a:focus-visible {
  color: var(--profile-accent);
}

body.profile-detail-page .profile-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

body.profile-detail-page .profile-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.profile-detail-page .profile-reveal,
  body.profile-detail-page .profile-text-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  body.profile-detail-page .profile-wrap {
    width: min(1200px, calc(100% - 48px));
    margin-top: 48px;
  }

  body.profile-detail-page .profile-card {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  body.profile-detail-page .profile-media,
  body.profile-detail-page .profile-info {
    grid-column: 1;
  }

  body.profile-detail-page .photo-box {
    max-width: none;
  }

  body.profile-detail-page .person-name {
    margin-top: 24px;
    max-width: none;
    font-size: 36px;
  }

  body.profile-detail-page .profile-media--wide-contact .profile-media-heading {
    display: block;
  }

  body.profile-detail-page .profile-media--wide-contact .person-name {
    order: 1;
    margin-top: 0;
    margin-bottom: 8px;
  }

  body.profile-detail-page .profile-media--wide-contact .person-role {
    order: 2;
    margin-bottom: 28px;
  }

  body.profile-detail-page .profile-media--wide-contact .photo-box {
    order: 3;
  }

  body.profile-detail-page .profile-media--wide-contact .profile-extra {
    order: 4;
    width: 100%;
    margin-top: 24px;
  }

  body.profile-detail-page .profile-intro-name {
    font-size: 36px;
  }

  body.profile-detail-page .profile-intro-name,
  body.profile-detail-page .profile-intro-role,
  body.profile-detail-page .profile-intro-block > .profile-short-line {
    display: none;
  }

  body.profile-detail-page .profile-intro-block--empty {
    display: none;
  }

  body.profile-detail-page .profile-extra {
    max-width: none;
  }

  body.profile-detail-page .profile-info {
    padding-top: 48px;
    border-top: 1px solid var(--color-line-subtle);
  }

  body.profile-detail-page .profile-intro-block {
    max-width: none;
  }

  body.profile-detail-page .profile-divider {
    margin: 64px 0 64px;
  }

  body.profile-detail-page .profile-cv {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  body.profile-detail-page .profile-cv-column[data-profile-cv-column="languages"] {
    margin-left: 0;
  }

  body.profile-detail-page .profile-cv-column[data-profile-cv-column="membership"] {
    margin-left: 0;
  }

  body.profile-detail-page .profile-cv-column[data-profile-cv-extra-index] {
    grid-column: auto;
    grid-row: auto;
    margin-left: 0;
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  body.profile-detail-page .profile-contact-meta,
  body.profile-detail-page .profile-contact-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  body.profile-detail-page .profile-info--with-contact .profile-contact-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  body.profile-detail-page .profile-media--wide-contact .profile-contact-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 0;
  }

  body.profile-detail-page .profile-contact-inline .profile-contact-separator {
    display: none;
  }

  body.profile-detail-page .profile-contact-office .profile-contact-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: 0 0.58rem;
    border-radius: 50%;
    background: var(--color-panel-profile-separator);
    color: transparent;
    font-size: 0;
    line-height: 0;
    vertical-align: middle;
  }

  body.profile-detail-page .profile-media--wide-contact .profile-contact-links {
    width: auto;
    align-items: flex-start;
    gap: 14px;
  }

  body.profile-detail-page .profile-media--wide-contact .profile-contact-links a {
    width: auto;
    justify-content: flex-start;
  }

}

@media (max-width: 900px) {
  .profile-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profile-media {
    max-width: 340px;
  }
}
