@property --accent-light {
  syntax: '<color>';
  inherits: true;
  initial-value: #defdff;
}

@property --accent-dark {
  syntax: '<color>';
  inherits: true;
  initial-value: #28e0ec;
}

:root {
  --black: #000000;
  --gray: #b8b8b8;
  --white: #ffffff;

  --accent-light: #defdff;
  --accent-dark: #28e0ec;

  --page-padding: clamp(24px, 2.5vw, 36px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Suisse Intl', Arial, sans-serif;
  color: var(--black);
  background: linear-gradient(
    180deg,
    var(--accent-light) 0%,
    var(--white) 20%,
    var(--white) 100%
  );
  animation: topColorFlow 28s ease-in-out infinite;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-light);
  color: var(--black);
}

::-moz-selection {
  background: var(--accent-light);
  color: var(--black);
}

.project-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;

  padding: 7px 14px;
  border-radius: 999px;

  background: var(--accent-light);
  color: var(--accent-dark);

  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;

  pointer-events: none;
  opacity: 0;

  transform: translate(10px, 10px);
  transition: opacity 0.2s ease;
}

.project-cursor.is-visible {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* MENU */

.menu {
  width: min(100% - var(--page-padding) * 2, 1376px);
  margin: 34px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-left a {
  font-size: 24px;
  line-height: 1;
  color: var(--gray);
  transition: color 0.2s ease;
  margin-right: 3vw;
}

.menu-left a:hover {
  color: var(--accent-dark);
}

.menu-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang a {
  font-size: 24px;
  line-height: 1;
  color: var(--gray);
  transition: color 0.2s ease;
}

.lang a:hover {
  color: var(--accent-dark);
}

.lang a.active {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang a.active:hover {
  color: var(--accent-dark);
}

.contact-button {
  width: 127px;
  height: 43px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 8px;
  background: var(--black);
  color: var(--white);

  font-family: 'Suisse Intl', sans-serif;
  font-size: 16px;
  line-height: 1;
  font-style: normal;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.contact-button span {
  position: relative;
  display: block;

  font-family: 'Suisse Intl', sans-serif;
  font-style: normal;

  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-button span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 180%;
  width: 100%;

  font-family: 'Suisse Intl', sans-serif;
  font-style: normal;
}

.contact-button:hover {
  background: var(--accent-dark);
  color: var(--white);
}

.contact-button:hover span {
  transform: translateY(-180%);
}

/* ––––––––––––––––––– */
/* MAIN PAGE */
/* ––––––––––––––––––– */

.main {
  width: min(100% - var(--page-padding) * 2, 1376px);
  margin: 150px auto 34px;
}

.main h3 {
  max-width: 1200px;
  margin: 0;

  font-size: clamp(42px, 4.3vw, 62px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.06em;

  color: var(--gray);
}

.main h3 span {
  color: var(--black);
}

/* PORTFOLIO PREVIEW */
.portfolio {
  width: 100%;
  margin-top: 34px;
  padding-left: var(--page-padding);

  overflow: hidden;
}

.portfolio-track {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}

.project-card {
  position: relative;
  flex: 0 0 clamp(520px, 42svw, 830px);
  height: clamp(280px, 27vw, 390px);

  border-radius: 6px;
  background: #d9d9d9;
  overflow: hidden;
}

/* ACTIVE MENU */

.menu-left a:first-child {
  color: var(--gray);
  text-decoration: none;
}

.menu-left a[href='portfolio.html'] {
  color: var(--gray);
}

.menu-left a:hover,
.lang a:hover {
  color: var(--accent-dark);
}

/* ––––––––––––––––––– */
/* ABOUT */
/* ––––––––––––––––––– */

.about {
  width: min(100% - var(--page-padding) * 2, 1376px);
  margin: 62px auto 0;

  display: grid;
  grid-template-columns: 350px 140px 600px;
  column-gap: clamp(70px, 8vw, 135px);
  align-items: start;

  color: var(--black);
}

/* LEFT */

.about-left,
.about-mid {
  position: sticky;
  top: 110px;
  align-self: start;
}

.about-photo {
  position: relative;
  width: 333px;
  height: 333px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.about-photo img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: translateZ(0);
  will-change: opacity;
}

.about-photo__bw {
  opacity: 1;
}

.about-photo__color {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.about-photo:hover .about-photo__color {
  opacity: 1;
}

.tags {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;

  background: var(--accent-light);
  color: var(--accent-dark);

  font-size: 20px;
  line-height: 1.15;
}

/* MID */

.about-mid {
  padding-top: 46px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-mid a {
  color: var(--gray);
  font-size: 24px;
  line-height: 1.15;
  transition: color 0.2s ease;
}

.about-mid a:hover {
  color: var(--accent-dark);
}

/* RIGHT */

.about-right {
  width: 585px;
  max-width: 100%;
}

.title h1 {
  margin: 10px 0 30px;
  font-size: 60px;
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.06em;
  color: var(--black);
}

.title h1 span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  letter-spacing: -0.04em;
}

.title p {
  max-width: 560px;
  margin: 0 0 42px;

  color: var(--gray);
  font-size: 24px;
  line-height: 1.12;
}

/* CV */

.cv-section {
  margin: 0;
  padding: 0;
}

.cv-section h2 {
  margin: 0 0 20px;

  color: var(--gray);
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
}

.cv-item {
  margin-bottom: 18px;
}

.cv-item:last-child {
  margin-bottom: 0;
}

.cv-item h3 {
  margin: 0 0 7px;

  color: var(--black);
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.cv-item p {
  margin: 0;

  color: var(--gray);
  font-size: 16px;
  line-height: 1;
}

/* HR */

.cv hr {
  margin: 34px 0 32px;
  border: 0;
  height: 1px;

  background-image: repeating-linear-gradient(
    90deg,
    var(--accent-dark) 0 12px,
    transparent 12px 24px
  );
}

/* SKILLS */

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-wrap: wrap;
  gap: 8px 9px;
}

.skills-list li {
  padding: 8px 15px;

  border: 1px solid var(--black);
  border-radius: 999px;

  color: var(--black);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

footer {
  margin-top: 2vw;
  padding: var(--page-padding);
  width: 100%;
  display: flex;
  justify-content: space-between;
}

footer p,
a {
  color: var(--black);
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.07em;
}
footer p span,
a span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  letter-spacing: -0.04em;
}

footer a:hover {
  color: var(--accent-dark);
}

/* ––––––––––––––––––– */
/* PORTFOLIO */
/* ––––––––––––––––––– */

.portfolio-page {
  width: min(100% - var(--page-padding) * 2, 1376px);
  margin: 90px auto 0;
}

.case-card {
  position: sticky;
  top: 120px;

  min-height: calc(100vh - 120px);
  padding-bottom: 80px;

  display: grid;
  grid-template-columns: minmax(520px, 680px) minmax(420px, 1fr);
  gap: clamp(80px, 10vw, 170px);
  align-items: start;

  background: var(--white);
}

.case-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1.18 / 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.case-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.case-info {
  padding-top: 12px;
  text-align: center;
}

.case-info h1 {
  margin: 0 0 72px;

  font-size: clamp(42px, 4.1vw, 60px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.06em;
}
.case-info span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  letter-spacing: -0.04em;
}

.case-mini {
  width: 190px;
  height: 190px;
  margin: 0 auto 32px;
  object-fit: cover;
  border-radius: 6px;
}

.case-link {
  display: inline-block;
  margin-bottom: 72px;

  color: var(--black);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s ease;
}

.case-link:hover {
  color: var(--accent-dark);
}

.case-info p {
  max-width: 460px;
  margin: 0 auto;

  color: var(--gray);
  font-size: 20px;
  line-height: 1.12;
}

.image-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;

  width: 52px;
  height: 52px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255);
  color: var(--black);

  font-size: 24px;
  line-height: 1;

  pointer-events: none;
  opacity: 0;
  transform: translate(-10px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.image-cursor.is-visible {
  opacity: 1;
}

.case-image-wrap:hover .image-cursor {
  opacity: 1;
}

/* разные высоты градиента */

.page-home {
  background: linear-gradient(
    180deg,
    var(--accent-light) 0%,
    var(--white) 24%,
    var(--white) 100%
  );
}

.page-about,
.page-portfolio {
  background: linear-gradient(
    180deg,
    var(--accent-light) 0%,
    var(--white) 8%,
    var(--white) 100%
  );
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100vh;
}

/* фиксированное меню только на portfolio */

.menu--fixed {
  position: fixed;
  top: 34px;
  left: 50%;
  z-index: 1000;

  margin: 0;
  transform: translateX(-50%);
}

.page-portfolio .portfolio-page {
  margin-top: 150px;
}
