:root {
  --cv-aside-w: clamp(19rem, 30vw, 25rem);
  --cv-date-w: 7.25rem;
  --cv-gap: clamp(1rem, 2.6vw, 2rem);
  --cv-radius: 1rem;
  --cv-surface: rgba(255, 255, 255, 0.025);
  --cv-surface-strong: rgba(255, 255, 255, 0.055);
  --cv-border: rgba(255, 255, 255, 0.12);
  --cv-border-strong: rgba(255, 255, 255, 0.2);
  --cv-text: #f7f4ef;
  --cv-text-soft: rgba(247, 244, 239, 0.76);
  --cv-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.22);
}

#main-content {
  min-height: 100dvh;
  padding-top: calc(var(--site-header-height, 4.25rem) + clamp(1rem, 2vw, 1.75rem));
  padding-bottom: var(--site-footer-safe-space, clamp(2.5rem, 6vw, 5rem));
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.06), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.045), transparent 30rem),
    linear-gradient(180deg, #090b10 0%, #0d1017 48%, #08090d 100%);
  color: var(--cv-text);
  color-scheme: dark;
  overflow-x: clip;
}

.cv-wrapper {
  width: min(100%, 88rem);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: var(--cv-aside-w) minmax(0, 1fr);
  gap: var(--cv-gap);
  align-items: start;
}

.cv-aside {
  position: sticky;
  top: calc(var(--site-header-height, 4.25rem) + clamp(1rem, 2vw, 1.75rem));
  align-self: start;
  min-width: 0;
  max-height: calc(100dvh - var(--site-header-height, 4.25rem) - clamp(2rem, 5vw, 4rem));
}

.photo-card {
  width: 100%;
  min-width: 0;
  max-height: inherit;
  margin: 0;
  padding: clamp(1rem, 2.2vw, 1.35rem);
  display: grid;
  grid-template-rows: minmax(0, auto) auto;
  gap: clamp(0.8rem, 1.6vw, 1rem);
  align-items: stretch;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
    rgba(0, 0, 0, 0.35);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius);
  box-shadow: var(--cv-shadow);
  overflow: hidden;
}

.mypicture {
  width: 100%;
  min-width: 0;
  max-width: none;
  aspect-ratio: 5 / 7;
  height: auto;
  object-fit: cover;
  object-position: 50% 35%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.9rem;
  box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.28);
}

.photo-caption {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 0.65rem;
}

.name-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.name-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.name {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.role {
  color: var(--cv-text-soft);
  font-size: clamp(0.92rem, 1.35vw, 1.05rem);
  line-height: 1.35;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 244, 239, 0.92);
  font-size: 0.9rem;
  line-height: 1.25;
}

.primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.primary-actions .single-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.6rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  padding: 0.55rem 0.75rem !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 0.65rem !important;
  background: transparent !important;
  color: #ffffff !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: none !important;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease !important;
}

.primary-actions .single-button:hover,
.primary-actions .single-button:focus-visible {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  transform: translateY(-1px) !important;
}

.primary-actions .single-button i {
  flex: 0 0 auto;
  opacity: 0.9;
}

.primary-actions .single-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.25rem);
}

.cv-section {
  padding: clamp(1rem, 2.6vw, 1.5rem);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius);
  background: var(--cv-surface);
  box-shadow: 0 0.6rem 1.35rem rgba(0, 0, 0, 0.18);
}

.cv-section h2 {
  margin: 0 0 clamp(0.9rem, 1.8vw, 1.25rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fffaf2;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.18;
}

.cv-section h2 i {
  opacity: 0.9;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0.55rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.timeline-item {
  position: relative;
  padding-left: 1.55rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.58rem;
  left: 0.1rem;
  width: 0.24rem;
  height: 0.24rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.item-header {
  display: grid;
  grid-template-columns: var(--cv-date-w) minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: start;
}

.date {
  min-width: var(--cv-date-w);
  color: var(--cv-text-soft);
  font-variant-numeric: tabular-nums;
}

.row {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.title-line {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.event {
  font-weight: 600;
}

.location-inline {
  color: var(--cv-text-soft);
}

.item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  margin-left: auto;
}

.ghost-link {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.ghost-link i {
  font-size: 0.85rem;
  opacity: 0.9;
}

.item-body {
  margin-top: 0.35rem;
  margin-left: calc(var(--cv-date-w) + 0.75rem);
}

.bullets {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.bullets li {
  position: relative;
  list-style: none;
  padding-left: 0.75rem;
  line-height: 1.55;
}

.bullets li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.cv-content a {
  color: inherit;
  text-decoration: none;
}

@media (orientation: landscape) and (max-height: 760px) {
  .cv-wrapper {
    --cv-aside-w: clamp(18rem, 28vw, 23rem);
  }

  .cv-aside {
    max-height: calc(100dvh - var(--site-header-height, 4.25rem) - 2rem);
  }

  .photo-card {
    grid-template-rows: minmax(7rem, 1fr) auto;
    gap: clamp(0.65rem, 1.1vw, 0.85rem);
    padding: clamp(0.8rem, 1.8vw, 1.05rem);
  }

  .mypicture {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .photo-caption {
    gap: 0.5rem;
  }

  .name {
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  }

  .role {
    font-size: clamp(0.82rem, 1.05vw, 0.96rem);
  }

  .chip {
    font-size: 0.78rem;
    padding: 0.2rem 0.45rem;
  }

  .primary-actions .single-button {
    min-height: 2.35rem !important;
    padding: 0.45rem 0.65rem !important;
  }
}

@media (max-width: 1080px) {
  .cv-wrapper {
    --cv-aside-w: clamp(17rem, 30vw, 21rem);
    width: min(100%, 76rem);
  }

  .role {
    font-size: clamp(0.86rem, 1.25vw, 1rem);
  }
}

@media (max-width: 900px), (orientation: portrait) {
  #main-content {
    padding-top: calc(var(--site-header-height, 4.25rem) + 0.75rem);
  }

  .cv-wrapper {
    width: min(100%, 44rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 4vw, 1.4rem);
    padding: clamp(0.8rem, 4vw, 1.15rem);
  }

  .cv-aside {
    position: relative;
    top: auto;
    width: 100%;
    max-height: none;
    justify-self: center;
  }

  .photo-card {
    width: 100%;
    max-height: none;
    padding: clamp(1rem, 4.5vw, 1.35rem);
    justify-items: center;
    text-align: center;
  }

  .mypicture {
    width: min(58vw, 14rem);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    object-position: 50% 30%;
  }

  .photo-caption {
    width: 100%;
    justify-items: center;
    text-align: center;
  }

  .name-row {
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .name-block {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .name {
    width: 100%;
    text-align: center;
    font-size: clamp(1.25rem, 6vw, 1.65rem);
  }

  .role {
    width: min(100%, 23rem);
    margin-inline: auto;
    text-align: center;
    font-size: clamp(0.9rem, 3.5vw, 1rem);
  }

  .stack-chips {
    justify-content: center;
  }

  .primary-actions {
    width: 100%;
    max-width: 24rem;
  }

  .timeline::before {
    left: 0.4rem;
  }

  .timeline-item {
    padding-left: 1.4rem;
  }

  .timeline-item::before {
    left: 0.06rem;
  }

  .item-header {
    grid-template-columns: 1fr;
  }

  .date {
    min-width: 0;
  }

  .item-body {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .cv-section {
    padding: clamp(0.9rem, 4.5vw, 1.15rem);
  }

  .cv-section h2 {
    font-size: clamp(1rem, 5vw, 1.22rem);
  }

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

  .title-line {
    display: grid;
    gap: 0.2rem;
  }

  .location-inline {
    line-height: 1.35;
  }

  .item-actions {
    margin-left: 0.3rem;
  }

  .primary-actions {
    grid-template-columns: 1fr;
  }

  .primary-actions .single-button {
    min-height: 2.55rem !important;
  }
}

@media (max-width: 380px) {
  .mypicture {
    width: min(62vw, 12rem);
  }

  .name {
    font-size: clamp(1.12rem, 6vw, 1.42rem);
  }

  .role {
    font-size: clamp(0.82rem, 3.8vw, 0.94rem);
  }

  .chip {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-actions .single-button,
  .ghost-link {
    transition: none !important;
  }

  .primary-actions .single-button:hover,
  .primary-actions .single-button:focus-visible,
  .ghost-link:hover,
  .ghost-link:focus-visible {
    transform: none !important;
  }
}