.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
  padding-top: 8rem;
  padding-bottom: 2rem;
}

.hero-text .topline {
  font-size: 1.25rem;
  color: var(--text-l1);
  font-weight: 500;
}

.hero-text h1 {
  font-size: 3rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-l0);
  margin-top: 0.5rem;
  font-weight: 400;
}

.contact-grid {
  display: inline-grid;
  grid-template-columns: auto 1.5px auto;
  column-gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-grid::before {
  content: '';
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--text-l2);
  border-radius: 999px;
  margin: 0.5rem 0;
}

.contact-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--text-l1);
  font-weight: 400;
  white-space: nowrap;
}

.contact-cell:nth-child(odd) { grid-column: 1; }
.contact-cell:nth-child(even) { grid-column: 3; }

.contact-cell img,
.contact-cell svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.contact-cell a:hover {
  color: var(--primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-image-block {
  display: flex;
  flex-direction: column;
  width: 320px;
  gap: 0.75rem;
}

.image-card {
  width: 320px;
  height: 320px;
  border-radius: var(--radius-card);
  border: 2px solid var(--border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-card img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  display: block;
}

.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.social-link {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-anchor);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

.social-link img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.social-link.cv {
  font-size: 2rem;
  color: var(--cv-color);
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
  .hero {
    gap: 3rem;
  }
  .hero-text h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 1.5rem;
  }

  .hero-image-block {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    order: -1;
  }

  .image-card {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .topline {
    font-size: 1.125rem;
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 0;
    width: 100%;
  }

  .contact-grid::before {
    display: none;
  }

  .contact-cell,
  .contact-cell:nth-child(odd),
  .contact-cell:nth-child(even) {
    grid-column: 1;
    font-size: 1.125rem;
    padding: 0.75rem 0;
    white-space: normal;
    border-bottom: 1.5px solid var(--text-l2);
  }

  .contact-cell:last-child {
    border-bottom: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
