@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@600;700;800&display=swap');

:root {
  --bg: #050507;
  --surface: rgba(14, 15, 20, 0.82);
  --surface-hover: rgba(22, 24, 34, 0.92);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.24);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-dim: rgba(255, 255, 255, 0.38);
  --accent: #ffffff;
  --accent-soft: #cfd8ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === 3D Flower Field Canvas === */
#flower-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(5, 5, 7, 0.1) 0%, rgba(5, 5, 7, 0.55) 75%, rgba(5, 5, 7, 0.85) 100%);
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  padding: 14px 40px;
}

.brand {
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 1;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: #ffffff;
  border-radius: 2px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #050507;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pill-btn:hover {
  transform: translateY(-1px);
  background: #eef1ff;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 11, 16, 0.7);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.burger span {
  display: block;
  width: 18px;
  height: 1.8px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(6.8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-6.8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(5, 5, 7, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-menu a.active,
.mobile-menu a:hover {
  color: #ffffff;
}

.mobile-menu .pill-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  padding: 13px 28px;
  margin-top: 8px;
  color: #050507;
}

/* === Main Content Wrapper === */
main {
  position: relative;
  z-index: 10;
}

/* === Hero Section === */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 24px 60px;
  position: relative;
}

.hero-subpage {
  min-height: 46svh;
  padding: 130px 24px 40px;
}

.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2.1rem, 7.2vw, 5.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-shadow:
    0 6px 32px rgba(5, 5, 7, 0.92),
    0 0 60px rgba(190, 210, 255, 0.16);
  margin-bottom: 20px;
  user-select: none;
}

.hero-subtitle {
  max-width: 560px;
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 2px 18px rgba(5, 5, 7, 0.95);
  margin-bottom: 34px;
}

.scroll-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(5, 5, 7, 0.38);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.scroll-circle:hover {
  background: #ffffff;
  color: #050507;
  border-color: #ffffff;
  transform: translateY(3px) scale(1.06);
}

.scroll-circle svg {
  width: 20px;
  height: 20px;
}

.hero-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  user-select: none;
}

/* === Content Sections === */
.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 28px;
}

.section-compact {
  padding-top: 28px;
  padding-bottom: 84px;
}

.section-heading {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.85rem, 4.4vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-align: center;
  margin-bottom: 54px;
  color: #ffffff;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.section-heading-row .section-heading {
  text-align: left;
  margin-bottom: 0;
}

.section-note {
  max-width: 340px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* === App Cards (3D Fan Preview, inspired by "мои работы") === */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.app-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 22px 26px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, background 0.3s ease, box-shadow 0.35s ease;
  overflow: hidden;
  position: relative;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.6);
}

.app-card.featured {
  border-color: rgba(185, 198, 255, 0.25);
}

.app-card.featured:hover {
  border-color: rgba(215, 224, 255, 0.5);
  box-shadow: 0 24px 60px rgba(110, 128, 255, 0.16);
}

/* 3D Fan Preview Stage inside Card */
.fan-stage {
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.07) 0%, rgba(5, 5, 7, 0.3) 72%);
  overflow: hidden;
  perspective: 900px;
}

.fan-item {
  position: absolute;
  width: 132px;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, #171a26, #0b0d14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, border-color 0.35s ease;
}

.fan-left {
  transform: translateX(-44px) translateY(8px) rotate(-10deg) scale(0.88);
  opacity: 0.72;
  z-index: 1;
}

.fan-center {
  width: 152px;
  height: 108px;
  transform: translateY(0) scale(1);
  z-index: 3;
  border-color: rgba(255, 255, 255, 0.22);
}

.fan-right {
  transform: translateX(44px) translateY(8px) rotate(10deg) scale(0.88);
  opacity: 0.72;
  z-index: 2;
}

.app-card:hover .fan-left {
  transform: translateX(-76px) translateY(4px) rotate(-16deg) scale(0.92);
  opacity: 0.95;
}

.app-card:hover .fan-center {
  transform: translateY(-6px) scale(1.07);
  border-color: rgba(255, 255, 255, 0.45);
}

.app-card:hover .fan-right {
  transform: translateX(76px) translateY(4px) rotate(16deg) scale(0.92);
  opacity: 0.95;
}

/* Mockup styles inside fan items */
.mock-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #a5b4fc;
  text-align: left;
  width: 100%;
  line-height: 1.45;
}

.mock-badge {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.mock-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

.mock-neo-center {
  background: radial-gradient(circle at 50% 40%, #2a3154 0%, #0d101b 75%);
}

.mock-neo-logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 10%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mock-weather-center {
  background: radial-gradient(circle at 50% 30%, #1c3557 0%, #0b111e 75%);
}

.mock-devops-center {
  background: radial-gradient(circle at 50% 35%, #23263a 0%, #0c0d14 75%);
}

.mock-chat-bubble {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: rgba(165, 180, 252, 0.25);
  margin-bottom: 6px;
}

.mock-chat-bubble.short {
  width: 68%;
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.22);
}

.card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 500;
}

.card-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex-grow: 1;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  transition: gap 0.2s ease, color 0.2s ease;
}

.app-card:hover .card-action {
  gap: 10px;
  color: #ffffff;
}

/* === Minimalist Rows Section (inspired by the table section in video) === */
.rows-list {
  border-top: 1px solid var(--border);
  background: rgba(5, 5, 7, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
}

.row-item {
  display: grid;
  grid-template-columns: 240px 1fr 160px;
  align-items: center;
  gap: 24px;
  padding: 26px 24px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.row-item:last-child {
  border-bottom: none;
}

.row-item:hover {
  background: rgba(255, 255, 255, 0.045);
  padding-left: 32px;
}

.row-name {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.row-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.row-right {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.row-item:hover .row-right {
  color: #ffffff;
  transform: translateX(3px);
}

/* === CTA Box on Subpages === */
.cta-bar {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.cta-bar h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  margin-bottom: 6px;
}

.cta-bar p {
  font-size: 14px;
  color: var(--text-muted);
}

/* === Footer === */
.site-footer {
  position: relative;
  z-index: 10;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 28px 46px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* === Responsive (Tablet & Mobile) === */
@media (max-width: 960px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-item {
    grid-template-columns: 190px 1fr 130px;
    gap: 16px;
    padding: 22px 18px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }

  .site-header.scrolled {
    padding: 12px 20px;
  }

  .nav-wrap {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .hero {
    padding: 100px 20px 64px;
  }

  .hero-hint {
    font-size: 11px;
  }

  .section {
    padding: 64px 18px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fan-stage {
    height: 170px;
  }

  /* Slightly open fan on touch screens so it looks dynamic immediately */
  .fan-left {
    transform: translateX(-58px) translateY(6px) rotate(-13deg) scale(0.88);
    opacity: 0.85;
  }

  .fan-right {
    transform: translateX(58px) translateY(6px) rotate(13deg) scale(0.88);
    opacity: 0.85;
  }

  .row-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 18px;
  }

  .row-item:hover {
    padding-left: 22px;
  }

  .row-right {
    text-align: left;
    margin-top: 4px;
    color: var(--accent-soft);
  }

  .cta-bar {
    padding: 22px 20px;
  }

  .site-footer {
    padding: 24px 18px 36px;
    flex-direction: column;
    align-items: flex-start;
  }
}
