/* Головна (особиста сторінка Андрія): те, чого немає в site.css */

.section--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

.btn--ghost {
  --bg: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.btn--ghost:hover {
  --bg: #24243a;
  box-shadow: inset 0 0 0 1px rgba(13, 153, 255, 0.6);
}

/* ---------- Навігація у верхній панелі ---------- */

.topnav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.topnav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.topnav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

/* ---------- Перший екран ---------- */

.me-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.me-hero .hero__inner {
  container-type: inline-size;
}

/* «Шапаренко» найдовше слово: кегль від ширини колонки, щоб воно не вилазило */
.me-title {
  font-size: min(11cqi, 116px);
}

/* місце для бреве над «Й», яке інакше зрізає overflow рядка */
.me-title .line:first-child {
  padding-top: 0.2em;
  margin-top: -0.2em;
}

/* три кнопки першого екрана тримаються купкою, без широкого проміжку з site.css */
.me-hero .hero__cta {
  gap: 12px;
}

.me-hero .hero__lead {
  max-width: 38ch;
}

.me-hero .hero__lead em {
  font-style: normal;
  color: var(--green);
}

.me-facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.me-facts li {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 20, 28, 0.6);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.me-facts b {
  font: 700 24px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
}

.me-facts li:nth-child(2) b {
  color: var(--green);
}

/* фото як фрейм на полотні: його можна потягнути */
.me-photo {
  justify-self: center;
  width: min(100%, 380px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.5s forwards;
}

.me-photo.is-dragging {
  cursor: grabbing;
}

.me-photo [data-drag-layer] {
  will-change: transform;
}

.me-photo .frame-label {
  margin: 0 0 10px 4px;
}

.float {
  animation: float 7s ease-in-out infinite;
}

.is-dragging .float {
  animation-play-state: paused;
}

.me-photo__img {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(44, 91, 255, 0.35), rgba(162, 89, 255, 0.25));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
  rotate: -2deg;
  transition: rotate 0.6s var(--ease-spring);
}

.me-photo:hover .me-photo__img {
  rotate: 0deg;
}

.me-photo__img img {
  width: 100%;
  pointer-events: none;
}

/* ---------- Навчання: дві картки курсів ---------- */

.courses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.courses > li {
  display: grid;
}

.course {
  --g1: #3dff8f;
  --g2: #5cc8ff;
  display: grid;
  grid-template-rows: auto 1fr;
  color: inherit;
  text-decoration: none;
}

.course--nl {
  --g1: #0d99ff;
  --g2: #a259ff;
}

.course > .frame-label {
  margin: 0 0 10px 2px;
}

/* картка курсу: назва пігулкою замість заголовка, ледь помітне світло кольорів курсу */
.course__body {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 28px;
  border-radius: 22px;
  background:
    radial-gradient(60% 80% at 0% 0%, color-mix(in srgb, var(--g1) 14%, transparent), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, color-mix(in srgb, var(--g2) 12%, transparent), transparent 70%),
    var(--panel);
  border: 1px solid var(--line-2);
  transition: border-color 0.3s;
}

.course__pill {
  justify-self: start;
  margin: 0;
  padding: 0.12em 0.5em 0.16em;
  border-radius: 999px;
  font: 700 clamp(26px, 3vw, 40px)/1 var(--font-display);
  letter-spacing: -0.03em;
  color: #06110a;
  background: linear-gradient(100deg, color-mix(in srgb, var(--g1) 70%, #fff), var(--g1) 40%, var(--g2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 18px 44px -14px color-mix(in srgb, var(--g1) 70%, transparent);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-spring);
}

.course--nl .course__pill {
  color: #fff;
}

.course__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.course__price {
  margin: 0;
  font: 700 28px/1 var(--font-display);
  letter-spacing: -0.02em;
}

.course__price s {
  margin-left: 6px;
  font: 500 13px/1 var(--font-mono);
  color: var(--muted);
  letter-spacing: 0;
  vertical-align: middle;
}

.course__price small {
  display: block;
  margin-top: 8px;
  font: 500 13px/1.3 var(--font-body);
  color: var(--muted);
  letter-spacing: 0;
}

.course__go {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cta);
  color: #fff;
  transition: transform 0.4s var(--ease-spring), background-color 0.2s;
}

.course__go svg {
  width: 20px;
  height: 20px;
}

.course:hover .course__body {
  border-color: rgba(13, 153, 255, 0.5);
}

.course:hover .course__pill {
  transform: scale(1.03) rotate(-1.5deg);
}

.course:hover .course__go {
  background: var(--cta-hover);
  transform: translateX(4px);
}

/* теги: спокійні сірі мітки, без кольорових акцентів */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font: 500 12px/1.1 var(--font-mono);
  color: #c4c4d4;
  white-space: nowrap;
}

/* ---------- Наставництво ---------- */

.mentor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 28px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(162, 89, 255, 0.28), transparent 70%),
    radial-gradient(60% 80% at 0% 100%, rgba(44, 91, 255, 0.18), transparent 70%),
    var(--panel);
  border: 1px solid var(--line-2);
}

.mentor-card__text {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.mentor-card__lead {
  margin: 0;
  color: #d6d6e2;
  font-size: 18px;
}

.mentor-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.mentor-card__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #c9c9d6;
  font-size: 15px;
}

.mentor-card__list svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--purple);
}

.mentor-card__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 6px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.link-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease-spring);
}

.link-more:hover svg {
  transform: translateX(4px);
}

.mentor-card__call {
  margin: 0;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.mentor-card__call.is-dragging {
  cursor: grabbing;
}

.mentor-card__call .frame-label {
  margin: 0 0 10px 4px;
}

.mentor-card__screen {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  rotate: 1.5deg;
}

.mentor-card__screen img {
  width: 100%;
  pointer-events: none;
}

.mentor-card__live {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(11, 11, 16, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font: 500 12px/1 var(--font-mono);
}

.mentor-card__live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.4s steps(2, start) infinite;
}

/* ---------- Проєкти ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.project {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 24px;
  border: 1px solid var(--line-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s;
}

.project--pf {
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255, 79, 176, 0.22), transparent 70%),
    var(--panel);
}

.project--food {
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(61, 255, 143, 0.16), transparent 70%),
    var(--panel);
}

a.project:hover {
  border-color: rgba(13, 153, 255, 0.5);
}

.project__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 600 clamp(24px, 2.4vw, 30px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.project__title svg {
  width: 0.75em;
  height: 0.75em;
  transition: transform 0.35s var(--ease-spring);
}

a.project:hover .project__title svg {
  transform: translateX(5px);
}

.project > p {
  margin: 0;
  color: var(--muted);
}

/* кнопки магазинів застосунків */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--line-2);
  text-decoration: none;
  font: 600 16px/1.05 var(--font-body);
  transition: border-color 0.2s;
}

.store svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.store small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}

.store:hover {
  border-color: rgba(13, 153, 255, 0.6);
}

/* ---------- Банер з Telegram ---------- */

.ask {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px clamp(18px, 3vw, 32px);
  padding: clamp(22px, 3vw, 32px);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(34, 158, 217, 0.14), rgba(162, 89, 255, 0.1) 60%, transparent),
    var(--panel);
  border: 1px solid var(--line-2);
}

.ask__photo {
  position: relative;
  width: 76px;
}

.ask__photo img {
  border-radius: 24px;
}

.ask__text {
  display: grid;
  gap: 6px;
}

.ask .h2 {
  font-size: clamp(24px, 2.6vw, 34px);
}

.ask__text p {
  margin: 0;
  color: var(--muted);
}

/* три дії в ряд під текстом: головна дзвінок, далі портфоліо і навчання */
.ask__cta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Адаптивність ---------- */

@media (max-width: 1024px) {
  .topnav {
    display: none;
  }

  .mentor-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .courses,
  .projects {
    grid-template-columns: 1fr;
  }

  .me-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }
}

@media (max-width: 720px) {
  .me-hero__grid {
    grid-template-columns: 1fr;
  }

  .me-photo {
    width: min(70%, 280px);
    justify-self: start;
  }

  .ask__cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .me-hero .cursor--mentor {
    display: none;
  }

  .me-hero {
    padding-bottom: 24px;
  }

  /* дзвінок на всю ширину, портфоліо і навчання поруч під ним */
  .me-hero .hero__cta,
  .ask__cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .me-hero .hero__cta > .btn:first-child,
  .ask__cta > .btn:first-child {
    grid-column: 1 / -1;
  }

  .me-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .me-facts li {
    padding: 12px;
    font-size: 12px;
  }

  .me-facts b {
    font-size: 20px;
  }

  .course__body {
    padding: 20px;
  }
}

@media (hover: none) {
  .course:hover .course__pill,
  .course:hover .course__go,
  .link-more:hover svg,
  a.project:hover .project__title svg {
    transform: none;
  }

  .me-photo:hover .me-photo__img {
    rotate: -2deg;
  }
}
