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

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:       #09090f;
  --border:   rgba(255,255,255,0.08);
  --border-h: rgba(255,255,255,0.20);
  --white:    #f5f0ff;
  --font:     'Montserrat', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; }
button { font-family: var(--font); cursor: pointer; }

/* ── Layout ────────────────────────────────────────────── */
.container { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ── Sticky bar ────────────────────────────────────────── */
#sticky-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 10px 0;
  background: rgba(9,9,15,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transform: translateY(-110%); opacity: 0;
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.38s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
#sticky-bar.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.sticky-inner { display: flex; align-items: center; gap: 10px; }
.sticky-logo { height: 28px; width: 28px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sticky-name { font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; color: var(--white); line-height: 1; white-space: nowrap; }
.sticky-dev {
  background: linear-gradient(90deg,#a78bfa,#e879f9,#38bdf8,#f472b6,#a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer-gradient 5s ease infinite;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.5);
  font-family: var(--font); font-weight: 700; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: color .2s, border-color .2s, background .2s; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:hover { color: var(--white); border-color: var(--border-h); background: rgba(255,255,255,0.09); }
.btn--accent { background: #229ED9; border-color: #229ED9; color: #fff; box-shadow: 0 4px 20px rgba(34,158,217,.18); }
.btn--accent:hover { background: #1a8bc0; border-color: #1a8bc0; color: #fff; }
.btn--sm { padding: 7px 14px; font-size: 0.7rem; }
.playmarket-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 0.58rem; font-weight: 900; font-style: italic;
  background: #01875f; color: #fff;
  padding: 2px 5px; border-radius: 3px;
  letter-spacing: 0.03em; line-height: 1;
  text-transform: none; white-space: nowrap; flex-shrink: 0;
}

/* itch.io nav logo */
.itchio-nav-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; filter: invert(1) opacity(0.5); }

/* itch.io brand badge — sharp at any size */
.itchio-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 0.58rem; font-weight: 900; font-style: italic;
  background: #fa5c5c; color: #fff;
  padding: 2px 5px; border-radius: 3px;
  letter-spacing: 0.03em; line-height: 1;
  text-transform: none; white-space: nowrap; flex-shrink: 0;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero { position: relative; padding: 72px 0 60px; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(9,9,15,0.55); pointer-events: none; z-index: 0; }

/* Slime blobs */
@keyframes slime-1 { 0%,100%{transform:translate(0,0) scale(1)} 25%{transform:translate(60px,-40px) scale(1.15)} 50%{transform:translate(-30px,60px) scale(.9)} 75%{transform:translate(80px,30px) scale(1.05)} }
@keyframes slime-2 { 0%,100%{transform:translate(0,0) scale(1)} 30%{transform:translate(-70px,40px) scale(1.2)} 60%{transform:translate(50px,-50px) scale(.85)} 80%{transform:translate(-40px,-20px) scale(1.1)} }
@keyframes slime-3 { 0%,100%{transform:translate(0,0) scale(1)} 20%{transform:translate(40px,60px) scale(1.1)} 55%{transform:translate(-60px,-40px) scale(.95)} 80%{transform:translate(20px,50px) scale(1.15)} }
@keyframes slime-4 { 0%,100%{transform:translate(0,0) scale(1)} 35%{transform:translate(-50px,-60px) scale(.9)} 65%{transform:translate(70px,30px) scale(1.2)} 85%{transform:translate(-20px,50px) scale(1.05)} }

.slime-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; filter: blur(55px) contrast(1.1); opacity: 0.3; }
.slime-blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.slime-blob-1 { width:480px; height:380px; background:radial-gradient(ellipse at center,#7c3aed 0%,#a855f7 40%,transparent 70%); top:-80px; left:5%; animation:slime-1 11s ease-in-out infinite; }
.slime-blob-2 { width:380px; height:340px; background:radial-gradient(ellipse at center,#e879f9 0%,#c026d3 35%,transparent 70%); top:-40px; right:15%; animation:slime-2 9s ease-in-out infinite; }
.slime-blob-3 { width:340px; height:300px; background:radial-gradient(ellipse at center,#22d3ee 0%,#0891b2 40%,transparent 70%); bottom:-60px; left:35%; animation:slime-3 13s ease-in-out infinite; }
.slime-blob-4 { width:300px; height:260px; background:radial-gradient(ellipse at center,#4ade80 0%,#16a34a 40%,transparent 70%); top:20px; right:40%; animation:slime-4 10s ease-in-out infinite; }

.hero-inner { display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 2; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.social-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; flex-shrink: 0; }

/* Logo image in title */
.logo-img {
  display: inline-block; height: 0.85em; width: auto; aspect-ratio: 1;
  object-fit: cover; border-radius: 0.1em;
  vertical-align: middle; margin-right: 0.15em; position: relative; top: -0.04em;
}

@keyframes shimmer-gradient { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

/* ── Logo title — пропорциональное масштабирование ────── */
.logo-title {
  font-family: var(--font);
  font-size: clamp(1.2rem, 8.5vw, 5.2rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.logo-title .name { color: var(--white); }
.logo-title .dev {
  background: linear-gradient(90deg,#a78bfa,#e879f9,#38bdf8,#f472b6,#a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer-gradient 5s ease infinite;
}

.tagline { font-size: clamp(0.85rem,2vw,1rem); font-weight: 500; color: rgba(255,255,255,0.4); max-width: 340px; line-height: 1.7; }

/* ── Section heading ───────────────────────────────────── */
.projects-section { padding: 36px 0 56px; }
.creative-section  { padding: 0 0 72px; }

.section-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.section-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.22em; color: rgba(255,255,255,0.3); white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── Badges ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge--done    { background: rgba(52,211,153,0.12);  color: #34d399;  min-width: 100px; justify-content: center; }
.badge--frozen  { background: rgba(96,165,250,0.12);  color: #93c5fd;  min-width: 100px; justify-content: center; }
.badge--active  { background: rgba(167,139,250,0.15); color: #c4b5fd;  min-width: 100px; justify-content: center; }
.badge--removed { background: rgba(239,68,68,0.14);   color: #f87171;  min-width: 100px; justify-content: center; }

.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot-pulse 1.8s ease-in-out infinite; flex-shrink: 0; }
@keyframes dot-pulse { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ── Pills ─────────────────────────────────────────────── */
.pill { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 4px; border: 1px solid; white-space: nowrap; }

/* ── Project list ──────────────────────────────────────── */
.proj-list { display: flex; flex-direction: column; gap: 6px; }

.proj-item { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: rgba(255,255,255,0.025); transition: border-color .25s; }
.proj-item:has(.proj-row.open),
.proj-item:hover { border-color: rgba(255,255,255,0.14); }

/* Compact row (always visible) */
.proj-row {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: none; border: none; text-align: left;
  overflow: hidden; cursor: pointer;
  transition: background .2s;
}
.proj-row:hover { background: rgba(255,255,255,0.03); }
.proj-row.open  { background: rgba(255,255,255,0.04); }

/* Background image at ~20% opacity */
.proj-row-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.18; filter: blur(1px) saturate(0.6);
  pointer-events: none; transition: opacity .3s;
}
.proj-row:hover .proj-row-bg { opacity: 0.26; }
.proj-row.open  .proj-row-bg { opacity: 0.30; }

.proj-row-left { flex: 1; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; min-width: 0; }
.proj-row-title { font-size: 0.95rem; font-weight: 800; color: var(--white); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-row-desc  { font-size: 0.72rem; font-weight: 500; color: rgba(255,255,255,0.38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.proj-row-right { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; flex-shrink: 0; }

.proj-chevron { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: rgba(255,255,255,0.35); flex-shrink: 0; transition: transform .32s cubic-bezier(0.4,0,0.2,1), color .2s; }
.proj-chevron svg { width: 16px; height: 16px; }
.proj-row.open .proj-chevron { transform: rotate(180deg); color: rgba(255,255,255,0.7); }

/* Panel (expandable) */
.proj-panel { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s cubic-bezier(0.4,0,0.2,1), opacity .35s ease; }
.proj-panel.open { opacity: 1; }
.proj-panel-inner { border-radius: 0; border: none; background: none; }

/* ── Card (inside panel) ───────────────────────────────── */
.card { display: flex; flex-direction: column; overflow: hidden; }
.card-accent-bar { height: 1px; width: 100%; flex-shrink: 0; }

/* ── Slideshow ─────────────────────────────────────────── */
.slideshow { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #0a0a12; flex-shrink: 0; }
.slideshow-inner { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.slide.active { opacity: 1; }
.slide-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity .3s; }
.slide-placeholder.hidden { opacity: 0; pointer-events: none; }
.slide-placeholder span { font-size: 1.1rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; opacity: 0.2; }

.img-progress { position: absolute; bottom: 0; left: 0; right: 0; z-index: 5; padding: 22px 14px 10px; background: linear-gradient(to top,rgba(0,0,0,0.72),transparent); }
.img-progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.img-progress-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); }
.img-progress-pct { font-size: 0.62rem; font-weight: 800; }
.img-progress-track { height: 3px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; }
.img-progress-fill { height: 100%; border-radius: 99px; width: 0%; transition: width 1s ease-out; }

.slide-dots { position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 6; }
.slide-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); border: none; cursor: pointer; transition: background .3s, transform .3s; padding: 0; }
.slide-dot.active { background: var(--dot-color,#fff); transform: scale(1.3); }

/* ── Card desktop: image left, text right ──────────────── */
@media (min-width: 700px) {
  .card { flex-direction: row; align-items: stretch; position: relative; }
  .card-accent-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
  .slideshow { width: 40%; max-width: 360px; flex-shrink: 0; aspect-ratio: unset; height: auto; min-height: 200px; }
  .card-body { flex: 1; }
}

/* ── Card body ─────────────────────────────────────────── */
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-date { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.25); }
.card-title { font-size: 1rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.platform-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.card-desc { font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.4); line-height: 1.6; flex: 1; }
.card-footer { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.card-soon { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.18); }
.card-removed-note { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(248,113,113,0.5); }

/* ── Creative section ──────────────────────────────────── */
/* ── Music card ─────────────────────────────────────────── */
.music-card {
  position: relative; overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(167,139,250,0.22);
  background: rgba(167,139,250,0.03);
  box-shadow: 0 0 60px rgba(167,139,250,0.07), inset 0 0 40px rgba(167,139,250,0.03);
}
.music-card-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 100% at 90% 50%, rgba(167,139,250,0.14) 0%, rgba(236,72,153,0.07) 55%, transparent 80%);
}
.music-card-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, #a78bfa, #e879f9, #38bdf8, #a78bfa);
  background-size: 300% 100%;
  animation: music-bar-shimmer 5s linear infinite;
}
@keyframes music-bar-shimmer { 0%{background-position:0% 0} 100%{background-position:300% 0} }

.music-card-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 0;
  padding: 40px 44px; min-height: 240px;
}
.music-card-left {
  display: flex; flex-direction: column; gap: 4px;
  flex: 0 0 260px; padding-right: 44px;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.music-eyebrow {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(167,139,250,0.7);
}
.music-title {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 900;
  line-height: 1.15; letter-spacing: -0.01em; text-transform: uppercase;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 60%, #f0abfc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.music-meta {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.25); margin-top: 6px; text-transform: uppercase;
}
.music-viz-wrap {
  flex: 1; display: flex; align-items: flex-end;
  padding-left: 44px; padding-bottom: 4px; height: 140px;
}
.music-viz {
  width: 100%; height: 100%;
  display: flex; align-items: flex-end; gap: 4px;
}
.music-viz span {
  flex: 1; border-radius: 3px 3px 0 0; min-height: 4px;
  background: linear-gradient(to top, rgba(167,139,250,0.9), rgba(236,72,153,0.5), rgba(56,189,248,0.3));
  animation: viz-bar 1.8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  height: calc(var(--h, 30) * 1%);
}
@keyframes viz-bar {
  0%,100% { transform: scaleY(0.2); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.music-viz span { transform-origin: bottom; }

@media (max-width: 680px) {
  .music-card-content { flex-direction: column; padding: 24px 20px; min-height: unset; gap: 20px; }
  .music-card-left { flex: unset; width: 100%; padding-right: 0; padding-bottom: 0; border-right: none; }
  .music-viz-wrap { padding-left: 0; padding-bottom: 0; width: 100%; height: 80px; flex-shrink: 0; }
  .music-viz { gap: 3px; overflow: hidden; }
  .music-viz span:nth-child(even) { display: none; }
}

/* ── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.store-row { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.18); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 56px 0 48px; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .proj-row-right .pill { display: none; }
}

/* ── Page load animations ──────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.anim-hero-title {
  opacity: 0;
  animation: fade-up 0.55s cubic-bezier(.22,.68,0,1.1) 0.05s both;
}
.anim-hero-row {
  opacity: 0;
  animation: fade-up 0.55s cubic-bezier(.22,.68,0,1.1) 0.18s both;
}
.anim-slime {
  opacity: 0;
  animation: fade-in 1.4s ease 0.9s both;
}
.anim-card {
  opacity: 0;
  animation: fade-up 0.45s cubic-bezier(.22,.68,0,1.1) both;
}
