/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #141414;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 100px;
}

/* ===== NAV ===== */
.nav-wrap {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* Внешняя кнопка темы — только мобиле, на десктопе скрыта */
.theme-toggle.theme-toggle--mobile { display: none; }

/* Для кейс-страниц (без .nav-wrap) — таб сам себя позиционирует */
.tab-menu {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 32px;
  box-shadow: 0 0 8px rgba(39, 51, 75, 0.10), 0 4px 4px rgba(39, 51, 75, 0.07);
  white-space: nowrap;
  gap: 8px;
}

/* На главной — позиционирует .nav-wrap, таб статичный */
.nav-wrap .tab-menu {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  z-index: auto;
}

.nav-link {
  font-size: 15px;
  font-weight: 400;
  color: #435165;
  padding: 8px 12px;
  border-radius: 64px;
  line-height: 20px;
  transition: background 0.15s;
}
.nav-link:hover { background: rgba(67, 81, 101, 0.08); }

.nav-divider {
  width: 1px;
  height: 32px;
  background: rgba(130, 147, 171, 0.3);
  margin: 0 4px;
  flex-shrink: 0;
}

.nav-btn {
  font-size: 15px;
  font-weight: 400;
  color: #0a0c0f;
  padding: 12px 24px;
  border-radius: 52px;
  line-height: 20px;
  background: linear-gradient(90deg, #c9d1df 0%, #edf2f8 50%, #c9d1df 100%);
  transition: opacity 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.nav-btn:hover { opacity: 0.85; transform: scale(1.04); }

/* ===== BLOB ANIMATION ===== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  will-change: transform;
}

.blob--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(80, 110, 255, 0.95) 0%, transparent 70%);
  left: -80px;
  bottom: 30px;
  animation: blobMove1 8s ease-in-out infinite;
}

.blob--2 {
  width: 750px;
  height: 650px;
  background: radial-gradient(circle, rgba(120, 60, 240, 0.88) 0%, transparent 70%);
  left: 200px;
  top: -80px;
  animation: blobMove2 10s ease-in-out infinite;
}

.blob--3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(40, 120, 230, 0.80) 0%, transparent 70%);
  right: 50px;
  top: 80px;
  animation: blobMove3 9s ease-in-out infinite;
}

@keyframes blobMove1 {
  0%   { transform: translate(0, 0) scale(1);             opacity: 0.9; }
  14%  { transform: translate(340px, -220px) scale(1.22); opacity: 0.70; }
  28%  { transform: translate(560px, 160px) scale(0.82);  opacity: 0.88; }
  42%  { transform: translate(220px, 400px) scale(1.18);  opacity: 0.65; }
  57%  { transform: translate(-180px, 280px) scale(1.26); opacity: 0.92; }
  71%  { transform: translate(-320px, -120px) scale(0.78); opacity: 0.75; }
  85%  { transform: translate(120px, -300px) scale(1.14); opacity: 0.70; }
  100% { transform: translate(0, 0) scale(1);             opacity: 0.9; }
}
@keyframes blobMove2 {
  0%   { transform: translate(0, 0) scale(1);              opacity: 0.85; }
  11%  { transform: translate(-280px, 200px) scale(0.82);  opacity: 0.65; }
  24%  { transform: translate(-500px, -160px) scale(1.20); opacity: 0.80; }
  38%  { transform: translate(-200px, -360px) scale(0.86); opacity: 0.92; }
  52%  { transform: translate(260px, -240px) scale(1.24);  opacity: 0.68; }
  65%  { transform: translate(400px, 180px) scale(0.78);   opacity: 0.88; }
  78%  { transform: translate(160px, 340px) scale(1.16);   opacity: 0.72; }
  90%  { transform: translate(-140px, 200px) scale(0.88);  opacity: 0.85; }
  100% { transform: translate(0, 0) scale(1);              opacity: 0.85; }
}
@keyframes blobMove3 {
  0%   { transform: translate(0, 0) scale(1);               opacity: 0.80; }
  16%  { transform: translate(-400px, 180px) scale(1.22);   opacity: 0.62; }
  30%  { transform: translate(-620px, -140px) scale(0.82);  opacity: 0.85; }
  45%  { transform: translate(-360px, -400px) scale(1.18);  opacity: 0.68; }
  59%  { transform: translate(140px, -280px) scale(0.84);   opacity: 0.90; }
  73%  { transform: translate(320px, 220px) scale(1.24);    opacity: 0.70; }
  87%  { transform: translate(-80px, 340px) scale(0.88);    opacity: 0.82; }
  100% { transform: translate(0, 0) scale(1);               opacity: 0.80; }
}

/* CTA section blobs */
.cta-blob--1 {
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(80, 110, 255, 0.95) 0%, transparent 70%);
  right: -60px;
  bottom: 0;
  animation: blobMove1 12s ease-in-out infinite reverse;
}

.cta-blob--2 {
  width: 750px;
  height: 650px;
  background: radial-gradient(circle, rgba(120, 60, 240, 0.88) 0%, transparent 70%);
  left: -40px;
  top: 20px;
  animation: blobMove2 14s ease-in-out infinite;
}

.cta-blob--3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(40, 120, 230, 0.80) 0%, transparent 70%);
  left: 50%;
  top: -40px;
  transform: translateX(-50%);
  animation: blobMove3 10s ease-in-out infinite reverse;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  min-height: 80svh;
  background: #0f1440;
  border-radius: 0 0 44px 44px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(90vw, 1400px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.hero-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  justify-content: center;
  white-space: nowrap;
}

.hero-text {
  font-size: 72px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-emoji {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
}

.hero-title-pill {
  background: #c0ace0;
  border-radius: 60px;
  padding: 8px 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-title-pill span {
  font-size: 72px;
  font-weight: 500;
  color: #141414;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-emoji-dash {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.hero-desc {
  font-size: 17px;
  font-weight: 400;
  color: rgba(235, 235, 235, 0.68);
  line-height: 1.6;
  max-width: 680px;
}

.hero-location {
  position: absolute;
  bottom: 32px;
  left: clamp(20px, 3vw, 39px);
  font-size: 12px;
  font-weight: 400;
  color: #afafaf;
  letter-spacing: -0.24px;
  z-index: 1;
}

/* ===== SHARED SECTION ===== */
.section {
  padding: 80px 0;
}

.section-intro { margin-bottom: 64px; }
.skills-section .section-intro { margin-bottom: 32px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.label-dot {
  width: 6px; height: 6px;
  background: #7151ff;
  border-radius: 3px;
  flex-shrink: 0;
}

.label-text {
  font-size: 11px;
  font-weight: 500;
  color: #4b4b4b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading {
  font-size: 48px;
  font-weight: 600;
  color: #141414;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-heading--col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.heading-text {
  font-size: 48px;
  font-weight: 600;
  color: #141414;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

.heading-text--block {
  display: block;
}

.heading-pill {
  font-size: 48px;
  font-weight: 600;
  color: #141414;
  letter-spacing: -0.03em;
  background: #f2edfd;
  border-radius: 60px;
  padding: 2px 20px;
  line-height: 1.1;
  white-space: nowrap;
}

.section-desc {
  font-size: 15px;
  font-weight: 400;
  color: #737373;
  line-height: 1.6;
  letter-spacing: -0.28px;
  max-width: 560px;
  margin-top: 16px;
}

/* ===== FADE-IN ===== */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: no-JS or reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Stagger for cards-grid children */
.cards-grid .case-card {
  transition-delay: 0.1s;
}
.cards-grid > a:nth-child(even) .case-card {
  transition-delay: 0.22s;
}

/* ===== CASE CARDS ===== */

/* Featured card — natural flex flow, no text/image overlap */
.case-card--featured {
  background: #f2edfd;
  border: 1px solid #e8e3f3;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.case-card--featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.05);
}

.featured-img-area {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 40px 40px 0;
}

.featured-img-area img {
  width: 100%;
  max-width: 720px;
  height: auto;
  aspect-ratio: 720 / 337;
  object-fit: cover;
  border-radius: 6px;
}

/* Card link wrappers */
a.card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

/* Small cards */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.case-card {
  flex: 1;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e8e3f3;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.05);
}

.featured-img-area img,
.abs-img,
.plant-img {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.float-img--1 {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.float-img--2 {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-card--featured:hover .featured-img-area img,
.case-card:hover .abs-img,
.case-card:hover .plant-img {
  transform: scale(1.05);
}
.case-card:hover .pix-img-1 { transform: translateX(-50%) scale(1.05); }
.case-card:hover .pix-img-2 { transform: translateX(-50%) scale(1.05); }

.card-wrapper:hover .float-img--1 {
  transform: scale(1.05);
}

.card-wrapper:hover .float-img--2 {
  transform: scale(1.05) rotate(-11.33deg);
}

.case-card--blue  { background: #edf6fd; }
.case-card--green { background: #FEF8EC; }

/* Card wrapper for floating images */
.card-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}
.card-wrapper .case-card {
  width: 100%;
  height: 100%;
}

/* PIX Academy card images */
.pix-img-1 {
  left: 52%; top: 40px;
  transform: translateX(-50%);
  width: auto; height: auto;
  max-width: 85%; max-height: calc(100% - 40px);
  object-fit: initial;
  border-radius: 0;
  z-index: 1;
}
.pix-img-2 {
  left: 36%; top: 16px;
  transform: translateX(-50%);
  width: auto; height: auto;
  max-width: 60%; max-height: calc(100% - 16px);
  object-fit: initial;
  border-radius: 0;
  z-index: 2;
}

/* Image areas */
.card-img-area {
  flex-shrink: 0;
  position: relative;
  min-height: 210px;
}

/* Dashboard images */
.card-img-area--dashboard {
  height: 220px;
}
.abs-img { position: absolute; object-fit: cover; }
.dash-img-1 {
  left: 41px; top: 30px;
  width: min(254px, 60%); height: auto;
  aspect-ratio: 254/148;
  border-radius: 8px;
}
.dash-img-2 {
  left: max(200px, 45%); top: 60px;
  width: min(228px, 55%); height: auto;
  aspect-ratio: 228/133;
  border-radius: 8px;
}

/* PIX Academy image area */
.card-img-area--pix { height: 210px; position: relative; overflow: hidden; }

/* Mobile/Bookmarks images */
.card-img-area--mobile { height: 220px; }
.mob-img-1 {
  left: 110px; top: 22px;
  width: 70px; height: 170px;
  border-radius: 3px;
  border: 1px solid #f3f3f3;
}
.mob-img-2 {
  left: 190px; top: 16px;
  width: 214px; height: auto;
  aspect-ratio: 199/191;
  border-radius: 9px;
  border: 1px solid #f3f3f3;
}

/* Plant pal images */
.card-img-area--plant {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 30px 20px 10px;
}
.plant-img {
  object-fit: contain;
  height: 183px;
  width: 84px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.plant-img--2 { width: 88px; }

/* Card content */
.card-content {
  flex: 1;
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.meta-company, .meta-role {
  font-size: 12px;
  font-weight: 400;
  color: #afafaf;
  letter-spacing: -0.24px;
  white-space: nowrap;
}
.meta-sep {
  width: 4px; height: 4px;
  background: #afafaf;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Card body */
.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-title {
  font-size: 22px;
  font-weight: 500;
  color: #141414;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.card-desc {
  font-size: 15px;
  font-weight: 400;
  color: #737373;
  line-height: 1.6;
  letter-spacing: -0.28px;
}

/* Tags */
.card-tags, .skill-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-tags {
  flex-wrap: nowrap;
}

.skill-tags .tag {
  font-size: 11px;
  padding: 4px 8px;
}

.tag {
  font-size: 12px;
  font-weight: 400;
  color: #737373;
  letter-spacing: -0.24px;
  padding: 4px 10px;
  border: 1px solid #ded9e9;
  border-radius: 999px;
  white-space: nowrap;
}
.tag--purple {
  color: #9e72ff;
  background: #f6f2ff;
  border-color: #d6c3ff;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: flex;
}

.skill-col {
  flex: 1;
  min-width: 0;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skill-col--bordered {
  position: relative;
}
.skill-col--bordered::before,
.skill-col--bordered::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: rgba(130, 147, 171, 0.3);
}
.skill-col--bordered::before { left: 0; }
.skill-col--bordered::after  { right: 0; }

.skill-title {
  font-size: 22px;
  font-weight: 500;
  color: #141414;
  letter-spacing: -0.03em;
}
.skill-desc {
  font-size: 15px;
  font-weight: 400;
  color: #737373;
  letter-spacing: -0.28px;
  line-height: 1.6;
}

/* ===== EXPERIENCE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  padding: 24px 0;
}

.timeline-date {
  font-size: 12px;
  font-weight: 400;
  color: #afafaf;
  letter-spacing: -0.24px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 160px;
  padding-top: 6px;
}

.timeline-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-company {
  font-size: 26px;
  font-weight: 600;
  color: #141414;
  letter-spacing: -0.03em;
}

.timeline-role {
  font-size: 11px;
  font-weight: 500;
  color: #141414;
  letter-spacing: 0.02em;
  background: rgba(130, 147, 171, 0.15);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-role--edu {
  color: #737373;
  background: rgba(130, 147, 171, 0.08);
}

.timeline-text {
  font-size: 15px;
  font-weight: 400;
  color: #737373;
  letter-spacing: -0.24px;
  line-height: 1.5;
}

.timeline-divider {
  height: 1px;
  background: rgba(130, 147, 171, 0.3);
}

/* ===== CTA SECTION ===== */
.cta-section {
  position: relative;
  width: 100%;
  min-height: 677px;
  background: #0f1440;
  border-radius: 44px 44px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.cta-inner {
  position: relative;
  z-index: 1;
  width: min(815px, 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.cta-heading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cta-title-text {
  font-size: 56px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cta-title-pill {
  background: #c0ace0;
  border-radius: 60px;
  padding: 8px 40px;
  font-size: 56px;
  font-weight: 500;
  color: #141414;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.cta-desc {
  font-size: 17px;
  font-weight: 400;
  color: rgba(235, 235, 235, 0.68);
  line-height: 1.6;
  max-width: 571px;
}
.cta-desc s { text-decoration-skip-ink: none; }

.cta-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: linear-gradient(90deg, #c9d1df 0%, #edf2f8 50%, #c9d1df 100%);
  border-radius: 52px;
  font-size: 15px;
  font-weight: 400;
  color: #0a0c0f;
  line-height: 20px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-btn:hover { opacity: 0.85; transform: scale(1.04); }
.btn-arrow {
  width: 12px;
  height: 12px;
  rotate: 45deg;
  translate: 0 0;
  transition: translate 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.cta-btn:hover .btn-arrow { translate: 3px 0; }

.cta-email {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  padding: 12px 24px;
  height: auto;
  display: flex;
  align-items: center;
  border: 0.7px solid rgba(255, 255, 255, 0.18);
  border-radius: 702px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-email:hover { transform: scale(1.04); }

/* ===== PAGE BOTTOM ===== */
.page-bottom {
  background: #ffffff;
  padding: 20px 0;
}

.page-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  font-size: 14px;
  font-weight: 400;
  color: #6c7585;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  gap: 12px;
}
.footer-link {
  font-size: 14px;
  font-weight: 400;
  color: #6c7585;
  transition: color 0.15s;
}
.footer-link:hover { color: #141414; }

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
  .container { padding: 0 40px; }

  .section { padding: 48px 0; }

  .tab-menu { gap: 2px; }
  .nav-link { padding: 8px 4px; font-size: 13px; }

  /* Hero */
  .hero-text,
  .hero-title-pill span { font-size: 56px; }
  .hero-title-pill { padding: 6px 22px; }
  .hero-emoji { width: 56px; height: 56px; }
  .hero-desc { font-size: 16px; }

  /* Section headings */
  .section-heading,
  .heading-text,
  .heading-pill { font-size: 38px; }
  .section-desc { font-size: 14px; }

  /* Cards: single column */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .case-card { min-height: auto; }
  .card-wrapper { min-height: 0; }
  .card-title { font-size: 18px; }
  .card-desc { font-size: 14px; }

  /* Skills */
  .skill-title { font-size: 18px; }
  .skill-desc { font-size: 14px; }

  /* Timeline */
  .timeline-company { font-size: 20px; }
  .timeline-item { gap: 32px; }

  /* CTA */
  .cta-title-text { font-size: 40px; }
  .cta-title-pill { font-size: 40px; padding: 6px 28px; }
  .cta-desc { font-size: 16px; }

  /* PIX Academy: tablet — cards go full-width so clamp image widths */
  .card-img-area--pix { height: 180px; }
  .pix-img-1 { width: auto; left: 50%; transform: translateX(-50%); }
  .pix-img-2 { width: min(430px, calc(100% - 32px)); top: 20px; left: 50%; transform: translateX(-50%); }
}

@media (max-width: 768px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  .container { padding: 0 24px; }

  /* Таб на кейс-страницах и nav-wrap на главной — оба внизу */
  .tab-menu {
    top: auto;
    bottom: 12px;
    gap: 4px;
    padding: 8px;
  }

  /* nav-wrap на главной */
  .nav-wrap {
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    align-items: center;
  }

  /* Show only Кейсы, CV, Контакты; скрыть десктопный toggle */
  .nav-link { display: none; }
  .nav-link--mobile { display: flex; }
  .nav-divider { display: none; }
  .tab-menu .theme-toggle { display: none; }

  /* Отдельный пилл переключения темы — показываем только на мобиле */
  .theme-toggle.theme-toggle--mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 22px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    box-shadow: 0 0 8px rgba(39, 51, 75, 0.10), 0 4px 4px rgba(39, 51, 75, 0.07);
    border: none;
    cursor: pointer;
    color: #4b4b4b;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
  }
  .theme-toggle.theme-toggle--mobile:hover { background: rgba(240, 240, 245, 0.95); }

  .nav-link--mobile { padding: 12px 16px; font-size: 15px; }
  .nav-btn { padding: 12px 20px; }

  .hero { border-radius: 0; min-height: 38svh; }
  .hero-location { display: none; }

  /* Hero typography */
  .hero-header-row { justify-content: center; }
  .hero-emoji-dash { display: none; }
  .hero-text,
  .hero-title-pill span { font-size: 32px; }
  .hero-title-pill { padding: 4px 16px; align-self: center; }
  .hero-emoji { width: 32px; height: 32px; }
  .hero-desc { font-size: 13px; }
  .hero-content { gap: 12px; }

  .section { padding: 40px 0; }
  .section-intro { margin-bottom: 24px; }

  /* Section headings — выровнять pill с текстом */
  .section-heading,
  .heading-text,
  .heading-pill { font-size: 28px; line-height: 1.15; }
  .heading-pill { padding: 1px 14px; }
  .heading-row { gap: 6px; align-items: baseline; }
  .section-desc { font-size: 14px; }

  /* Cards */
  .card-title { font-size: 16px; }
  .card-desc { font-size: 14px; }

  /* Skills: stack vertically */
  .skills-section .section-intro { margin-bottom: 24px; }
  .skills-grid { flex-direction: column; gap: 0; }
  .skill-col { padding: 20px 0; }
  .skill-col:first-child { padding-top: 0; }
  .skill-col:last-child { padding-bottom: 0; }
  .skill-col--bordered::before,
  .skill-col--bordered::after { display: none; }
  .skill-col--bordered {
    border-top: 1px solid rgba(130, 147, 171, 0.3);
    border-bottom: 1px solid rgba(130, 147, 171, 0.3);
  }
  .skill-tags { flex-wrap: wrap; }
  .skill-title { font-size: 16px; }
  .skill-desc { font-size: 14px; }

  /* Timeline */
  .timeline-company { font-size: 17px; }
  .timeline-item { gap: 16px; }

  /* CTA */
  .cta-section { border-radius: 0; min-height: auto; padding: 48px 20px; }
  .cta-title-text { font-size: 28px; }
  .cta-title-pill { font-size: 28px; padding: 4px 18px; }
  .cta-desc { font-size: 13px; }

  /* Page bottom */
  .page-bottom-inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  /* Featured card: full-bleed image on mobile */
  .featured-img-area {
    padding: 0;
  }
  .featured-img-area img {
    border-radius: 0;
    width: 50%;
    margin-top: 24px;
  }

  /* Dashboard images: flex layout on mobile */
  .card-img-area--dashboard {
    height: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 16px 16px 0;
  }
  .card-img-area--dashboard .abs-img {
    position: relative;
    left: auto;
    top: auto;
  }
  .card-img-area--dashboard .dash-img-1 {
    width: 48%;
    height: auto;
  }
  .card-img-area--dashboard .dash-img-2 {
    width: 45%;
    height: auto;
  }

  /* PIX Academy: mobile */
  .card-img-area--pix { height: 140px; }
  .pix-img-1 { width: auto; max-height: 98px; height: auto; top: 50px; left: 62%; transform: translateX(-50%); }
  .pix-img-2 {
    width: auto;
    height: calc(100% - 20px);
    top: 20px;
    left: 40%;
    transform: translateX(-50%);
  }

  /* Bookmarks images: flex layout on mobile */
  .card-img-area--mobile {
    height: auto;
    min-height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    padding: 16px 16px 0;
  }
  .card-img-area--mobile .abs-img {
    position: relative;
    left: auto;
    top: auto;
  }
  .card-img-area--mobile .mob-img-1 {
    width: 30%;
    max-width: 90px;
    height: auto;
    object-fit: contain;
    align-self: flex-end;
  }
  .card-img-area--mobile .mob-img-2 {
    width: 55%;
    height: auto;
    object-fit: contain;
    align-self: flex-end;
  }
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b4b4b;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(67, 81, 101, 0.08); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle { color: #c0b8d8; }

/* ===== DARK THEME ===== */
[data-theme="dark"] body {
  background: #111318;
  color: #f0f0f2;
}

/* Nav */
[data-theme="dark"] .tab-menu {
  background: rgba(20, 22, 32, 0.92);
  box-shadow: 0 0 8px rgba(0,0,0,0.4), 0 4px 4px rgba(0,0,0,0.3);
}
[data-theme="dark"] .nav-link { color: #c0b8d8; }
[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .nav-divider { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .nav-btn {
  color: #0a0c0f;
}

/* Headings & text */
[data-theme="dark"] .section-heading,
[data-theme="dark"] .heading-text,
[data-theme="dark"] .card-title,
[data-theme="dark"] .skill-title,
[data-theme="dark"] .timeline-company { color: #f0f0f2; }

[data-theme="dark"] .heading-pill {
  background: #2a1e4a;
  color: #f0f0f2;
}

[data-theme="dark"] .label-text { color: #6a6a7a; }

[data-theme="dark"] .section-desc,
[data-theme="dark"] .card-desc,
[data-theme="dark"] .skill-desc,
[data-theme="dark"] .timeline-text { color: #8a8a9a; }

[data-theme="dark"] .timeline-role {
  color: #c0b8d8;
  background: rgba(130, 147, 171, 0.12);
}
[data-theme="dark"] .timeline-role--edu {
  color: #8a8a9a;
  background: rgba(130, 147, 171, 0.07);
}

[data-theme="dark"] .timeline-date { color: #6a6a7a; }

/* Cards */
[data-theme="dark"] .case-card--featured {
  background: #1e1b2e;
  border-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .case-card {
  border-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .case-card--blue  { background: #131e2a; }
[data-theme="dark"] .case-card--green { background: #131e18; }

[data-theme="dark"] .meta-company,
[data-theme="dark"] .meta-role { color: #5a5a6a; }
[data-theme="dark"] .meta-sep { background: #5a5a6a; }

/* Tags */
[data-theme="dark"] .tag {
  color: #8a8a9a;
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .tag--purple {
  color: #b899ff;
  background: #221a3a;
  border-color: #4a3a7a;
}

/* Skills grid */
[data-theme="dark"] .skill-col--bordered::before,
[data-theme="dark"] .skill-col--bordered::after {
  background: rgba(255,255,255,0.08);
}

/* Timeline */
[data-theme="dark"] .timeline-divider { background: rgba(255,255,255,0.07); }

/* Page bottom / footer */
[data-theme="dark"] .page-bottom { background: #111318; }
[data-theme="dark"] .footer-copy  { color: #5a5a6a; }
[data-theme="dark"] .footer-link  { color: #5a5a6a; }
[data-theme="dark"] .footer-link:hover { color: #f0f0f2; }

/* Hero & CTA dark mode */
[data-theme="dark"] .hero,
[data-theme="dark"] .cta-section {
  background: #06081a;
}

[data-theme="dark"] .blob--1,
[data-theme="dark"] .cta-blob--1 {
  background: radial-gradient(circle, rgba(110, 60, 255, 0.90) 0%, transparent 70%);
}
[data-theme="dark"] .blob--2,
[data-theme="dark"] .cta-blob--2 {
  background: radial-gradient(circle, rgba(180, 60, 230, 0.80) 0%, transparent 70%);
}
[data-theme="dark"] .blob--3,
[data-theme="dark"] .cta-blob--3 {
  background: radial-gradient(circle, rgba(40, 160, 255, 0.75) 0%, transparent 70%);
}

/* Card hover in dark */
[data-theme="dark"] .case-card:hover,
[data-theme="dark"] .case-card--featured:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
}

/* PIX Academy dark theme */
[data-theme="dark"] .mob-img-1,
[data-theme="dark"] .mob-img-2,
[data-theme="dark"] .plant-img { border-color: rgba(255,255,255,0.12); }

/* Responsive dark override for stacked skill borders */
@media (max-width: 768px) {
[data-theme="dark"] .theme-toggle.theme-toggle--mobile {
  background: rgba(20, 22, 32, 0.92);
  box-shadow: 0 0 8px rgba(0,0,0,0.4), 0 4px 4px rgba(0,0,0,0.3);
  color: #c0b8d8;
}
}

@media (max-width: 768px) {
  [data-theme="dark"] .skill-col--bordered {
    border-top-color: rgba(255,255,255,0.08);
    border-bottom-color: rgba(255,255,255,0.08);
  }

}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  /* Hero */
  .hero-text,
  .hero-title-pill span { font-size: 26px; }
  .hero-header-row { gap: 6px; }

  /* Section headings */
  .section-heading,
  .heading-text,
  .heading-pill { font-size: 24px; }

  /* CTA */
  .cta-title-text { font-size: 24px; }
  .cta-title-pill { font-size: 24px; padding: 3px 14px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-btn, .cta-email { justify-content: center; }

  /* Plant images */
  .plant-img { height: 140px; width: 70px; }
  .plant-img--2 { width: 74px; }
}
