:root {
  --bg-base: #060709;
  --text: #f3f4f6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  block-size: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  inline-size: 100%;
  block-size: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(900px 700px at 82% 45%, rgba(28, 92, 66, 0.22), transparent 68%),
    radial-gradient(800px 640px at 18% 20%, rgba(42, 66, 150, 0.10), transparent 70%),
    linear-gradient(135deg, #090a0f 0%, #060709 52%, #070a09 100%);
}

.wave-canvas {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

/* 3D figure stage (tucked further left, clean original colors) */
.portrait-stage {
  position: absolute;
  inset-block-start: clamp(16px, 3dvh, 42px);
  inset-inline-start: clamp(-180px, -6.5vw, -36px);
  block-size: clamp(880px, 174dvh, 1960px);
  aspect-ratio: 1227 / 2231;
  pointer-events: none;
  perspective: 1250px;
  opacity: 0.36;
  z-index: 0;
}

@media (max-width: 768px) {
  .portrait-stage {
    inset-inline-start: -14vw;
    inset-block-start: 4dvh;
    block-size: 145dvh;
    opacity: 0.28;
  }
}

.portrait-rig {
  --rx: 0deg;
  --ry: 0deg;
  --px: 0px;
  --py: 0px;
  --float-y: 0px;

  position: relative;
  inline-size: 100%;
  block-size: 100%;
  transform-style: preserve-3d;
  transform-origin: 50% 24%;
  transform:
    translate3d(var(--px), calc(var(--py) + var(--float-y)), 0)
    rotateX(var(--rx))
    rotateY(var(--ry));
  will-change: transform;
}

/* Soft bottom-fade mask so the lower coat dissolves smoothly into the site background */
.portrait-layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 44%, rgba(0, 0, 0, 0.68) 56%, transparent 68%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 44%, rgba(0, 0, 0, 0.68) 56%, transparent 68%);
}

@supports (not (mask-image: linear-gradient(#000, #000))) and (not (-webkit-mask-image: linear-gradient(#000, #000))) {
  .portrait-layer {
    clip-path: inset(0 0 34% 0);
  }
}

.portrait-img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: contrast(1.04) brightness(0.95);
}

.portrait-core {
  transform: translateZ(0px);
}

@media (prefers-reduced-motion: reduce) {
  .portrait-rig {
    transform: none;
  }
}

/* Foreground editorial layout */
.content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  inline-size: 100%;
  block-size: 100%;
  padding: clamp(22px, 4.5vw, 56px) clamp(22px, 6vw, 84px);
  pointer-events: none;
}

.content a {
  pointer-events: auto;
}

/* Top bar */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--text);
}

.brand-dot {
  color: #46e0a2;
  font-weight: 600;
}

.brand-sep {
  color: rgba(243, 244, 246, 0.28);
  font-weight: 400;
}

.brand-sub {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(243, 244, 246, 0.68);
}

/* Hero */
.hero {
  max-inline-size: 760px;
  margin-block: auto;
  padding-block: 16px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 4.1rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text);
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
}

.hero-note {
  margin: 18px 0 0;
  font-size: clamp(0.96rem, 1.35vw, 1.15rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(243, 244, 246, 0.80);
}

@media (min-width: 769px) {
  .hero-note {
    white-space: nowrap;
  }
}

/* Compact minimalist WIP & Telegram bar */
.contact-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: clamp(22px, 3.2vh, 32px);
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: rgba(10, 14, 18, 0.56);
  border: 1px solid rgba(96, 186, 150, 0.16);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}

.contact-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(243, 244, 246, 0.68);
  letter-spacing: -0.01em;
}

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(46, 224, 152, 0.22) 0%, rgba(28, 148, 114, 0.16) 100%);
  border: 1px solid rgba(72, 232, 168, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 18px rgba(12, 52, 38, 0.40);
  color: #dffef1;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}

.tg-link:hover,
.tg-link:focus-visible {
  background: linear-gradient(135deg, rgba(46, 224, 152, 0.34) 0%, rgba(36, 182, 140, 0.24) 100%);
  border-color: rgba(132, 248, 204, 0.78);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(46, 224, 152, 0.26);
  outline: none;
}

.tg-icon {
  flex-shrink: 0;
  color: #5ef0b4;
}

.tg-arrow {
  font-size: 0.9rem;
  line-height: 1;
  color: rgba(168, 247, 214, 0.75);
  transition: transform 200ms ease, color 200ms ease;
}

.tg-link:hover .tg-arrow,
.tg-link:focus-visible .tg-arrow {
  transform: translate(2px, -2px);
  color: #ffffff;
}

@media (max-width: 600px) {
  .contact-bar {
    border-radius: 16px;
    padding: 12px 14px;
    inline-size: 100%;
    justify-content: space-between;
  }
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(243, 244, 246, 0.48);
}

.footer-credit a {
  color: rgba(132, 206, 176, 0.84);
  text-decoration: none;
  border-bottom: 1px solid rgba(132, 206, 176, 0.28);
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: #a8f7d6;
  border-bottom-color: rgba(168, 247, 214, 0.75);
  outline: none;
}

@media (max-height: 600px) {
  html,
  body {
    overflow-y: auto;
  }
  .stage {
    min-block-size: 100dvh;
    block-size: auto;
  }
}
