/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-text: #ffffff;
  --color-text-light: #999999;
  --color-text-lighter: #666666;
  --color-bg: #e5baf5;
  --color-border: #DEBCF1;
  --color-secondary: #dca9ef;
  --color-accent: #f04b23;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  --spacing-xxl: 8rem;
  --spacing-xxxl: 12rem;
  --border-radius: 24px;
  --border-radius-large: 32px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  cursor: image-set(url('cursor-80.png') 1x, url('cursor-160.png') 2x) 0 0, auto;
}

html,
body,
* {
  cursor: image-set(url('cursor-80.png') 1x, url('cursor-160.png') 2x) 0 0, auto;
}

a,
button,
.btn,
.btn-cv-pdf,
.case-button {
  cursor: image-set(url('cursor-80.png') 1x, url('cursor-160.png') 2x) 0 0, pointer;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(229, 186, 245, 0.08);
  position: fixed;
  z-index: 1000;
  height: 124px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(229, 186, 245, 0.12) 0%,
    rgba(229, 186, 245, 0.08) 55%,
    rgba(229, 186, 245, 0) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
}

.nav-left,
.nav-right {
  color: var(--color-text);
  flex: 1;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: rgba(220, 169, 239, 1);
  border-radius: 100px;
  padding: 16px 40px;
  height: 78px;
  /* Inner Shadow */
}

.nav-item {
  color: #ffffff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.nav-item:hover {
  opacity: 0.7;
}

/* Main Content */
.main {
  margin-top: px;
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 124px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px;
  position: relative;
}

.hero .container {
  padding-left: clamp(24px, calc(32vw - 223px), 200px);
  padding-right: clamp(24px, calc(32vw - 223px), 200px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  margin-top: 100px;
}

.hero-title {
  font-size: clamp(56px, 9vw, 88px);
  font-weight: 600;
  line-height: 1.0;
  margin-bottom: 0px;
  margin-top: 0px;
  max-width: 1200px;
  color: var(--color-text);
  letter-spacing: -0.03em;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero-avatar {
  display: inline-block;
  height: 0.9em;
  margin: 0 4px;
  width: auto;
  border-radius: 999px;
  object-fit: contain;
  vertical-align: baseline;
  position: relative;
  top: 4px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--spacing-xl);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn-primary:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.btn:hover {
  background-color: #1a1a1a;
  transform: translateY(-2px);
  border-color: var(--color-text);
}

.btn-cv-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 32rem;
  height: 64px;
  padding-left: 42px;
  padding-right: 42px;
  text-decoration: none;
  color: var(--color-text);
  background-color: #f04b23;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1);
  transform-origin: center;
  will-change: transform;
  margin-top: 0px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.btn-cv-pdf:hover,
.btn-cv-pdf:focus-visible {
  transform: scale(1.04) !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn-cv-pdf {
    transition: none;
  }
  
  .btn-cv-pdf:hover {
    transform: none;
  }
}


/* Sections */
.selected-work,
.about,
.contacts {
  padding: 100px 0;
}

#about {
  margin-top: 100px;
}

.selected-work .container {
  padding-left: 200px;
  padding-right: 200px;
}

#cases .container {
  padding-left: clamp(16px, 4.5vw, 60px);
  padding-right: clamp(16px, 4.5vw, 60px);
}

.about .container,
.contacts .container {
  padding-left: 200px;
  padding-right: 240px;
}

.section-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 600;
  margin-bottom: var(--spacing-xxl);
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.selected-work .section-title {
  margin-bottom: 0px;
}

#about .section-title {
  text-align: center;
}

#cases .section-title {
  text-align: center;
}

.about-text {
  text-align: center;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-top: 16px;
}

/* Animated Banner */
.animated-banner {
  width: 100%;
  overflow: visible;
  position: absolute;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  height: 160px;
}

.banner-strip {
  width: 100%;
  height: 80px;
  background-color: #f04b23;
  transform: none;
  transform-origin: center;
  will-change: transform;
  margin: 24px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.banner-strip.is-reversed {
  transform: none;
}

.banner-content {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  position: relative;
  left: 0;
}

.banner-strip.is-reversed .banner-content {
  animation-direction: reverse;
}

.banner-text-group {
  display: flex;
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-text {
  font-size: clamp(40px, 2.5vw, 28px);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  padding-right: 60px;
  margin: 0;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
}

@keyframes scroll-banner {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


.cases-container {
  width: 1320px;
  height: clamp(260px, 37.3vw, 492px);
  max-width: 100%;
  background-color: #ffffff;
  border-radius: clamp(48px, 7.6vw, 100px);
  overflow: hidden;
  margin: 16px auto 0;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cases-container:hover {
  transform: scale(1.02);
}

.case-card-title {
  font-size: 44px;
  font-weight: 200;
  color: #000000;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  padding-top: 70px;
  padding-left: 80px;
}

/* Case card layout */
.case-card {
  display: flex;
  align-items: stretch;
  padding: 0;
  position: relative;
}

.case-card-left {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 48px 56px 64px;
}

.case-card-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0;
}

.case-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 1.5px solid #cccccc;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 400;
  color: #111111;
  background: transparent;
  letter-spacing: -0.01em;
}

.case-card-right {
  flex: 0 0 55%;
  position: relative;
}

.case-card-image-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.case-card-image-bg::before {
  content: '';
  position: absolute;
  width: 85%;
  height: 220%;
  background: radial-gradient(ellipse at center, #edd8f9 30%, transparent 72%);
  border-radius: 50%;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  z-index: 0;
}

.case-card-image {
  position: absolute;
  top: 15%;
  left: 0;
  width: 105%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  z-index: 1;
}

.case-item {
  display: flex;
  justify-content: center;
}

.case-item {
  margin-top: 32px;
}

.case-meta {
  margin-top: 16px;
  text-align: left;
}

.case-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.case-subtitle {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 16px;
}

.case-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background-color: #111111;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform 220ms ease, background-color 220ms ease;
}

.case-button:hover {
  transform: translateY(-2px);
  background-color: #000000;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 32px;
}

.project-card {
  padding: 40px;
  border: none;
  border-radius: 60px;
  transition: var(--transition);
  background-color: rgba(255, 255, 255, 0.06);
  min-height: 334px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  /* Стиль пилюли */
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.project-card:hover {
  transform: translateY(-8px);
  opacity: 1;
}

.project-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-lg);
  display: block;
  line-height: 1;
  transition: var(--transition);
}

.project-card:hover .project-icon {
  transform: scale(1.05);
}

.project-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-description {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text-light);
  letter-spacing: -0.01em;
  flex-grow: 1;
}

/* About Section */
.about .section-title {
  margin-bottom: 16px;
}

.about-content {
  max-width: 800px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-text-light);
  letter-spacing: -0.01em;
}

/* Contacts Section */
.contacts-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
}

.contact-link {
  font-size: 20px;
  color: var(--color-text);
  text-decoration: none;
  padding: 0;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  letter-spacing: -0.01em;
  font-weight: 500;
}

.contact-link:hover {
  opacity: 0.6;
  transform: translateY(-2px);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .project-card {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    --spacing-xxxl: 6rem;
  }

  .container {
    padding: 0 20px;
  }

  .header {
    height: 124px;
    padding: 0 20px;
  }

  .hero {
    min-height: calc(100vh - 124px);
    padding: var(--spacing-xxl) 0;
  }

  .hero .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .selected-work .container,
  .about .container,
  .contacts .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .banner-strip {
    height: 60px;
    margin: 30px 0;
  }

  .banner-text {
    font-size: 20px;
    padding: 0 40px;
  }

  .hero-title {
    margin-bottom: var(--spacing-lg);
    font-size: clamp(36px, 10vw, 64px);
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .project-card {
    padding: var(--spacing-lg);
    min-height: 260px;
  }

  .nav {
    font-size: 14px;
  }

  .main {
    margin-top: 124px;
  }

  .section-title {
    font-size: clamp(28px, 8vw, 48px);
  }

  .about-content {
    font-size: 18px;
  }

  .contact-link {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .section-title {
    font-size: 32px;
  }

  .banner-strip {
    height: 50px;
    margin: 20px 0;
  }

  .banner-text {
    font-size: 18px;
    padding: 0 30px;
  }

  .project-card {
    padding: var(--spacing-md);
    min-height: 240px;
  }

  .project-icon {
    font-size: 40px;
  }

  .about-content {
    font-size: 16px;
  }
}

