/* Страница профиля. */

.profile {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 64px);
  padding: clamp(28px, 3vw, 60px) clamp(24px, 3vw, 70px);
  border-radius: clamp(28px, 2.6vw, 48px);
  border: 4px solid var(--ink);
  background: var(--wine);
  overflow: hidden;
}

.profile__photo {
  position: relative;
  width: min(100%, 324px);
  aspect-ratio: 324 / 498;
  border-radius: var(--radius-card);
  border: 5px solid var(--ink);
  background: var(--cream);
  overflow: hidden;
  transition: transform 0.3s;
  animation: zoom-in 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.profile__photo:hover {
  transform: scale(1.02) rotate(-1deg);
}

.profile__photo img {
  position: absolute;
  left: 50%;
  top: 16%;
  width: 105%;
  max-width: none;
  transform: translateX(-50%);
}

.profile__caption {
  position: absolute;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(17px, 5vw, 24px);
  text-align: center;
  text-wrap: balance;
}

.profile__title {
  margin-bottom: clamp(20px, 2.4vw, 40px);
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1;
  color: var(--cream);
}

.profile__form {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 637px;
}

.profile__field {
  display: block;
  padding: clamp(18px, 2vw, 28px) clamp(22px, 2.2vw, 32px);
  border-radius: var(--radius-card);
  border: 2px solid var(--ink);
  background: var(--cream);
}

.profile__field span {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wine);
}

.profile__field input {
  width: 100%;
  height: auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-body);
  font-size: clamp(18px, 1.4vw, 24px);
  outline: none;
}

.profile__form .form__error {
  color: var(--cream);
}

.profile__save {
  align-self: flex-start;
}

.my-ads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 2.6vw, 40px) clamp(24px, 3vw, 79px);
  border-radius: clamp(28px, 2.6vw, 48px);
  border: 5px solid var(--ink);
  background: var(--wine);
}

.my-ads__title {
  flex: 1;
  min-width: 260px;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1;
  color: var(--cream);
}

.my-ads__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  height: 62px;
  border-radius: 48px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: clamp(18px, 1.8vw, 28px);
  color: var(--ink);
  transition: background 0.2s, transform 0.2s;
}

.my-ads__all:hover {
  background: var(--blue);
  color: var(--ink);
  transform: scale(1.03);
}

.my-ads__add {
  position: relative;
  width: 120px;
  height: 62px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--ink);
  background: var(--cream);
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}

.my-ads__add:hover {
  background: var(--blue);
  transform: scale(1.03);
}

.my-ads__add img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.grid--my-ads {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 48px);
}

.my-ad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: clamp(280px, 24vw, 530px);
  padding: var(--pad-card);
  border-radius: clamp(28px, 2.6vw, 48px);
  border: 5px solid var(--ink);
  background: var(--cream);
  transition: transform 0.25s, box-shadow 0.25s;
  animation: zoom-in 0.7s cubic-bezier(0.22, 0.7, 0.2, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 45%;
}

.my-ad:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 10px 10px 0 var(--blue);
}

.my-ad__title {
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1.15;
}

.my-ad__text {
  font-size: var(--text);
  color: var(--gray);
}

.my-ad__meta {
  margin: auto 0 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--wine);
}

.my-ad--new {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(280px, 24vw, 530px);
  padding: clamp(24px, 3vw, 58px);
  border-radius: clamp(28px, 2.6vw, 48px);
  border: 5px solid var(--ink);
  background: var(--wine);
  overflow: hidden;
  text-align: left;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.my-ad--new:hover {
  background: var(--ink);
  transform: translateY(-8px) scale(1.01);
  box-shadow: 10px 10px 0 var(--blue);
}

.my-ad--new span {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.1;
  color: var(--cream);
}

.my-ad--new img {
  position: absolute;
  right: 12%;
  bottom: 12%;
  width: 22%;
  pointer-events: none;
}

.profile__account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 2px solid rgb(252 244 241 / 25%);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--cream);
}
