/* ===================================================================
   SEMIROR_78 - Interactive Material Dark Violet Showcase
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&display=swap');

:root {
  /* Color Palette: Deep Violet / Material Dark */
  --bg-deep: #080512;
  --bg-surface: #120c22;
  --bg-card: rgba(22, 14, 38, 0.82);
  --bg-card-hover: rgba(30, 20, 52, 0.92);
  --bg-pill: rgba(38, 24, 66, 0.7);
  --bg-pill-active: rgba(124, 58, 237, 0.28);

  /* Primary Accent & Neons */
  --accent-primary: #a855f7;
  --accent-secondary: #c084fc;
  --accent-deep: #7c3aed;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --accent-cyan: #38bdf8;
  --accent-pink: #f472b6;

  /* Text & Hierarchy */
  --text-main: #f5f2ff;
  --text-secondary: #c4b5fd;
  --text-muted: #8b7ca8;
  --text-disabled: #54496d;

  /* Borders & Glass */
  --border-subtle: rgba(168, 85, 247, 0.18);
  --border-glow: rgba(192, 132, 252, 0.45);
  --glass-blur: blur(28px) saturate(180%);

  /* Physics & Transitions */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Canvas Background */
#psp-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
}

/* App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 16px 28px 20px 28px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
  overflow: hidden;
}

/* ===================================================================
   Top Bar (Header & Language Switcher)
   =================================================================== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 12px auto;
  position: relative;
  min-height: 48px;
}

.top-bar-spacer {
  width: 110px;
  flex-shrink: 0;
}

/* St. Petersburg Time & Time of Day Informer */
.spb-time-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(24, 16, 42, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
  user-select: none;
  cursor: default;
}

.spb-time-widget:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.25);
  color: #ffffff;
}

.spb-time-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spb-time-widget:hover .spb-time-icon {
  transform: rotate(18deg) scale(1.15);
}

.spb-time-clock {
  color: #ffffff;
  letter-spacing: 0.5px;
}

.spb-time-city {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--accent-secondary);
  font-weight: 700;
}

.brand-wrapper {
  flex: 1;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  z-index: 2;
  pointer-events: auto;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 0 24px rgba(192, 132, 252, 0.35), 0 2px 6px rgba(0, 0, 0, 0.6);
  display: inline-flex;
  align-items: center;
  cursor: default !important; /* Keep default cursor */
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-title:active {
  transform: scale(0.98);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(24, 16, 42, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 3;
}

.lang-switcher:hover {
  border-color: var(--border-glow);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lang-btn .lang-flag {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  color: #ffffff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.lang-btn.active .lang-flag {
  transform: scale(1.18) rotate(4deg);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(168, 85, 247, 0.12);
}

/* Smooth text crossfade during language switch */
.lang-morphing {
  animation: langMorphFade 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes langMorphFade {
  0% {
    opacity: 0.55;
    filter: blur(2px);
    transform: translateY(-2px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* ===================================================================
   Main Console Window Layout
   =================================================================== */
.main-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
  gap: 16px;
  position: relative;
}

/* Left Navigation Dock */
.nav-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 180px;
  flex-shrink: 0;
  padding-top: 36px; /* align nicely under the top tab */
}

@keyframes activeOutlinePop {
  0% {
    transform: scale(0.97);
    box-shadow: 0 0 0 0px rgba(192, 132, 252, 0.8), 0 2px 8px rgba(168, 85, 247, 0.2);
  }
  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 4.5px rgba(192, 132, 252, 0.7), 0 10px 28px rgba(168, 85, 247, 0.45);
  }
  100% {
    transform: scale(1.025);
    box-shadow: 0 0 0 2.5px rgba(192, 132, 252, 0.5), 0 8px 24px rgba(168, 85, 247, 0.3);
  }
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--border-subtle);
  background: rgba(20, 13, 36, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: transform 0.25s var(--ease-spring), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.nav-tab-btn:hover:not(.active) {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.2);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(168, 85, 247, 0.18));
  color: #ffffff;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2.5px rgba(192, 132, 252, 0.5), 0 8px 24px rgba(168, 85, 247, 0.3);
  transform: scale(1.025);
  animation: activeOutlinePop 0.32s var(--ease-spring) both;
}

.nav-tab-btn .tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  transition: transform 0.25s var(--ease-spring);
}

.nav-tab-btn:hover .tab-icon {
  transform: scale(1.15);
}

/* ===================================================================
   Console Window Container & Animated Top Tab
   =================================================================== */
.console-window-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* Dynamic Top Header Tab ("При смене категории, заголовок отпускается и поднимается") */
.top-window-tab-wrapper {
  display: flex;
  justify-content: flex-start;
  padding-left: 28px;
  height: 38px;
  position: relative;
  z-index: 1;
}

.top-window-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 36px;
  background: rgba(24, 15, 42, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-glow);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 -4px 18px rgba(168, 85, 247, 0.22);
  transform-origin: bottom center;
  transform: translateY(0);
  transition: transform 0.28s var(--ease-smooth), opacity 0.2s ease;
  position: relative;
  z-index: 1;
}

/* Animated Dip Down State: drops DOWN BEHIND the main console window */
.top-window-tab.dip-down {
  transform: translateY(115%);
  opacity: 0;
}

/* Main Display Window Body: translucent frosted glass with diffused background waves */
.console-window {
  flex: 1;
  background: rgba(18, 11, 34, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-glow);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 36px rgba(168, 85, 247, 0.16);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
}

/* Inner Scrollable Container */
.console-scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px 36px;
  scroll-behavior: smooth;
  user-select: text;
}

/* Custom Sleek Scrollbar */
.console-scroll-content::-webkit-scrollbar {
  width: 7px;
}
.console-scroll-content::-webkit-scrollbar-track {
  background: rgba(14, 9, 26, 0.6);
  border-radius: 8px;
}
.console-scroll-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-deep), var(--accent-primary));
  border-radius: 8px;
  box-shadow: 0 0 10px var(--accent-glow);
}
.console-scroll-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Sections Viewport */
.content-section {
  display: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-smooth);
}

.content-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   SECTION 1: Главная (Home)
   =================================================================== */
.hero-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(32, 20, 56, 0.75), rgba(20, 13, 36, 0.6));
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.avatar-container {
  position: relative;
  width: 105px;
  height: 105px;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.avatar-pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(192, 132, 252, 0.4);
  animation: rotateRing 20s linear infinite;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-meta {
  flex: 1;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.hero-headline {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Bio Box */
.bio-card {
  background: rgba(25, 17, 44, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 24px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* Skills/Tags */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.skill-tag {
  padding: 6px 14px;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  font-weight: 600;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
}

/* Social Grid */
.section-subhead {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(24, 16, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s var(--ease-smooth);
}

.social-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.social-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-secondary);
  transition: transform 0.25s var(--ease-spring);
}

.social-card:hover .social-icon-box {
  transform: scale(1.12);
}

.social-info {
  flex: 1;
  min-width: 0;
}

.social-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ===================================================================
   SECTION 2: Приложения (Apps & Subdomains)
   =================================================================== */
.section-header-banner {
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.app-card {
  background: rgba(25, 17, 44, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s var(--ease-smooth);
}

.app-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.15));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
}

.app-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.app-badge.accent {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-secondary);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.app-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.app-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.22s var(--ease-smooth);
}

.btn-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55);
}

/* Coming Soon Empty State (for Apps) */
.empty-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: rgba(22, 14, 38, 0.5);
  border: 1.5px dashed var(--border-subtle);
  border-radius: 20px;
}

.radar-pulse-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  margin-bottom: 18px;
  animation: pulseRadar 2.4s infinite;
}

@keyframes pulseRadar {
  0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5); }
  70% { box-shadow: 0 0 0 20px rgba(168, 85, 247, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

.empty-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 420px;
}

/* ===================================================================
   SECTION 3: Портфолио (Portfolio)
   =================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.portfolio-card {
  background: rgba(25, 17, 44, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s var(--ease-smooth);
}

.portfolio-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.portfolio-cover-wrap {
  width: 100%;
  height: 175px;
  position: relative;
  overflow: hidden;
  background: #110920;
}

.portfolio-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-smooth);
}

.portfolio-card:hover .portfolio-cover {
  transform: scale(1.06);
}

.portfolio-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.portfolio-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.portfolio-tag {
  padding: 3px 10px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* ===================================================================
   SECTION: Аниме (Anime Showcase)
   =================================================================== */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.anime-card {
  background: rgba(25, 17, 44, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s var(--ease-smooth);
}

.anime-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(168, 85, 247, 0.15);
}

.anime-cover-wrap {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  background: #10081e;
}

.anime-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-smooth);
}

.anime-card:hover .anime-cover {
  transform: scale(1.06);
}

.anime-score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18, 10, 32, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.anime-episodes-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(18, 10, 32, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
}

.anime-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.anime-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.anime-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.anime-status-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: var(--accent-secondary);
  font-size: 0.72rem;
  font-weight: 600;
}

.anime-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.anime-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-anime-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  margin-top: auto;
}

.btn-anime-link:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* ===================================================================
   SECTION: Галерея (Photo & Art Gallery)
   =================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.gallery-card {
  background: rgba(22, 14, 38, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.28s var(--ease-smooth);
}

.gallery-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(168, 85, 247, 0.2);
}

.gallery-thumb-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #110920;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-smooth);
}

.gallery-card:hover .gallery-thumb {
  transform: scale(1.08);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, rgba(10, 5, 20, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-zoom-badge {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 11, 34, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  transition: transform 0.25s var(--ease-spring);
}

.gallery-card:hover .gallery-zoom-badge {
  transform: scale(1.15);
  color: #ffffff;
}

.gallery-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.gallery-thumb-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-thumb-desc {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* Reactions Bar on Photo Cards */
.gallery-card-reactions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(14, 8, 26, 0.92);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 5;
}

.btn-gallery-react {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  user-select: none;
}

.btn-gallery-react:hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-gallery-react.fire { color: #f97316; }
.btn-gallery-react.fire:hover { border-color: #f97316; background: rgba(249, 115, 22, 0.2); }

.btn-gallery-react.heart { color: #c084fc; }
.btn-gallery-react.heart:hover { border-color: #c084fc; background: rgba(192, 132, 252, 0.2); }

.btn-gallery-react.poop { color: #d97706; }
.react-emoji {
  font-size: 0.92rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
}

.btn-gallery-react.reacted {
  background: rgba(255, 255, 255, 0.18);
  border-color: currentColor;
  box-shadow: 0 0 10px currentColor;
  transform: scale(1.06);
}

/* Reactions Bar in Gallery Lightbox Modal */
.gallery-modal-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.gallery-react-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
}

.gallery-react-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-gallery-modal-react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(28, 18, 52, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
}

.btn-gallery-modal-react .react-emoji {
  font-size: 1.15rem;
}

.btn-gallery-modal-react:hover {
  transform: translateY(-2px) scale(1.1);
  color: #ffffff;
}

.btn-gallery-modal-react.fire { color: #fb923c; }
.btn-gallery-modal-react.fire:hover { border-color: #f97316; background: rgba(249, 115, 22, 0.25); box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35); }

.btn-gallery-modal-react.heart { color: #c084fc; }
.btn-gallery-modal-react.heart:hover { border-color: #c084fc; background: rgba(192, 132, 252, 0.25); box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35); }

.btn-gallery-modal-react.poop { color: #f59e0b; }
.btn-gallery-modal-react.poop:hover { border-color: #d97706; background: rgba(217, 119, 6, 0.25); box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35); }

.btn-gallery-modal-react.reacted {
  background: rgba(168, 85, 247, 0.28);
  border-color: currentColor;
  box-shadow: 0 0 14px currentColor;
  transform: scale(1.08);
}

/* 3D Tilt Effect on PC (Cards tilt slightly with glass glare sheen) */
@media (hover: hover) and (pointer: fine) {
  .portfolio-card, .gallery-card {
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
  }

  .tilt-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 20;
    mix-blend-mode: screen;
  }
}

/* ===================================================================
   SECTION 6: Донат (Donate)
   =================================================================== */
.donate-message-card {
  background: linear-gradient(135deg, rgba(32, 20, 56, 0.7), rgba(18, 12, 32, 0.75));
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.donate-msg-text {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.65;
}

.donate-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.donate-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.donate-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.donate-card {
  background: rgba(25, 17, 44, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
}

.donate-card.highlight {
  border-color: rgba(241, 95, 44, 0.5);
  box-shadow: 0 6px 24px rgba(241, 95, 44, 0.12);
}

.donate-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.donate-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.donate-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.donate-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-donate {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s var(--ease-smooth);
  border: none;
}

.btn-donate.boosty {
  background: linear-gradient(135deg, #f15f2c, #ff7a45);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(241, 95, 44, 0.4);
}

.btn-donate.boosty:hover {
  box-shadow: 0 6px 24px rgba(241, 95, 44, 0.6);
  transform: translateY(-2px);
}

.btn-donate.da {
  background: linear-gradient(135deg, #ff8c00, #ffa500);
  color: #120924;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.35);
}

.btn-donate.da:hover {
  box-shadow: 0 6px 24px rgba(255, 140, 0, 0.55);
  transform: translateY(-2px);
}

/* Crypto Wallets */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.crypto-card {
  background: rgba(22, 15, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crypto-info {
  min-width: 0;
  flex: 1;
}

.crypto-currency {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.crypto-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.btn-copy {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--border-subtle);
  color: var(--accent-secondary);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* ===================================================================
   SECTION 5: Контакты (Contacts)
   =================================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.contact-card {
  background: rgba(25, 17, 44, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s var(--ease-smooth);
}

.contact-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.contact-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-secondary);
}

.contact-channel {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.contact-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.btn-contact-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-contact-action:hover {
  background: var(--accent-deep);
  border-color: var(--accent-secondary);
  color: #ffffff;
}

.contact-note-card {
  background: rgba(22, 14, 38, 0.55);
  border: 1px dashed var(--border-subtle);
  border-radius: 16px;
  padding: 18px 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ===================================================================
   Contact Message CTA Button
   =================================================================== */
.contact-cta-wrapper {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.btn-write-message {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  color: #ffffff;
  border: 1px solid var(--accent-secondary);
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: all 0.25s var(--ease-smooth);
}

.btn-write-message:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.55);
}

/* ===================================================================
   Universal Modal Overlay & Dialogs
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 3, 14, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-smooth), visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: rgba(22, 14, 40, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1.5px solid var(--border-glow);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 36px rgba(168, 85, 247, 0.2);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.28s var(--ease-spring);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-dialog,
.modal-overlay.active .gallery-modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
  transform: rotate(90deg);
}

/* Contact Modal Dialog */
.contact-modal-dialog {
  width: 100%;
  max-width: 520px;
  padding: 28px 32px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-form .form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-form .form-input, .modal-form .form-textarea {
  background: rgba(14, 8, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.modal-form .form-input:focus, .modal-form .form-textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 14px var(--accent-glow);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  border: none;
  color: #ffffff;
  padding: 11px 22px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.22s var(--ease-smooth);
}

.btn-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

/* ===================================================================
   Gallery Lightbox Modal
   Left: photo + zoom controls, Right: title + description sidebar
   =================================================================== */
.gallery-modal-dialog {
  background: rgba(20, 12, 36, 0.96);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1.5px solid var(--border-glow);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 48px rgba(168, 85, 247, 0.25);
  width: 94vw;
  max-width: 1120px;
  height: 86vh;
  max-height: 760px;
  display: flex;
  position: relative;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.28s var(--ease-spring);
}

.gallery-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
  background: rgba(14, 8, 26, 0.8);
  border: 1px solid var(--border-glow);
}

.gallery-lightbox-content {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Left Photo Column */
.gallery-photo-column {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080410;
  overflow: hidden;
  user-select: none;
}

.gallery-img-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.gallery-img-container.can-pan {
  cursor: grab;
}

.gallery-img-container.is-panning {
  cursor: grabbing;
}

.gallery-modal-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.15s ease-out;
  transform-origin: center center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* Zoom Toolbar */
.gallery-zoom-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 14, 40, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  padding: 5px 12px;
  z-index: 30;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.gallery-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
}

.gallery-tool-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #ffffff;
}

.gallery-zoom-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-secondary);
  min-width: 48px;
  text-align: center;
}

/* Arrow Navigation Buttons */
.gallery-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 10, 32, 0.8);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-glow);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.gallery-arrow-btn.prev {
  left: 18px;
}

.gallery-arrow-btn.next {
  right: 18px;
}

.gallery-arrow-btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-secondary);
  transform: translateY(-50%) scale(1.1);
}

/* Right Info Sidebar */
.gallery-info-column {
  width: 320px;
  flex-shrink: 0;
  background: rgba(18, 11, 32, 0.95);
  border-left: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.gallery-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  padding-right: 48px; /* Avoid collision with absolute close button */
  border-bottom: 1px solid var(--border-subtle);
  min-height: 38px;
}

.gallery-item-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.gallery-item-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gallery-info-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  overflow-y: auto;
}

.gallery-info-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.gallery-info-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.gallery-info-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}



/* ===================================================================
   Bottom Sound Control Pill
   =================================================================== */
.sound-widget-container {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 100;
}

.sound-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(22, 14, 40, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
  transition: all 0.25s var(--ease-smooth);
}

.sound-toggle-btn:hover {
  border-color: var(--accent-secondary);
  color: #ffffff;
  box-shadow: 0 8px 28px var(--accent-glow);
  transform: translateY(-2px);
}

.sound-toggle-btn.playing {
  border-color: var(--accent-secondary);
  color: #ffffff;
  background: rgba(35, 20, 65, 0.9);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Mini Equalizer animation */
.sound-eq {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-eq-bar {
  width: 3px;
  height: 4px;
  background: var(--accent-secondary);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.sound-eq.active .sound-eq-bar:nth-child(1) {
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}
.sound-eq.active .sound-eq-bar:nth-child(2) {
  animation: eqBounce 1.2s ease-in-out 0.2s infinite alternate;
}
.sound-eq.active .sound-eq-bar:nth-child(3) {
  animation: eqBounce 0.8s ease-in-out 0.4s infinite alternate;
}

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* ===================================================================
   Notification Toast (e.g. Copied to Clipboard)
   =================================================================== */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(28, 18, 52, 0.96);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--accent-secondary);
  border-radius: 999px;
  padding: 10px 24px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-spring);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===================================================================
   Responsive Mobile & Tablet Adjustments (Touch & Modern Mobile Viewports)
   =================================================================== */
@media (max-width: 860px) {
  .app-wrapper {
    padding: 10px 12px 14px 12px;
    padding-top: max(10px, env(safe-area-inset-top, 10px));
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    padding-left: max(12px, env(safe-area-inset-left, 12px));
    padding-right: max(12px, env(safe-area-inset-right, 12px));
    height: 100dvh;
    overflow: hidden;
  }

  /* Top Bar with centered brand and balanced spacer */
  .top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 6px;
    min-height: 40px;
    width: 100%;
  }

  .top-bar-spacer {
    display: block;
    width: 84px;
    flex-shrink: 0;
  }

  .spb-time-widget {
    padding: 4px 8px;
    font-size: 0.74rem;
    gap: 5px;
    flex-shrink: 0;
  }

  .spb-time-icon svg {
    width: 14px;
    height: 14px;
  }

  .brand-wrapper {
    position: static;
    transform: none;
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }

  .brand-title {
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default !important;
  }

  .lang-switcher {
    flex-shrink: 0;
    padding: 2px;
  }

  .lang-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .lang-btn .flag-svg {
    width: 15px;
    height: 11px;
  }

  /* Main window and dock vertical stack */
  .main-layout {
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    flex: 1;
  }

  /* Horizontal swipeable pill navigation */
  .nav-dock {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding: 2px 2px 6px 2px;
    gap: 6px;
    flex-shrink: 0;
  }

  .nav-dock::-webkit-scrollbar {
    display: none;
  }

  .nav-tab-btn {
    flex-shrink: 0;
    width: auto;
    padding: 8px 14px;
    font-size: 0.84rem;
    border-radius: 999px;
    white-space: nowrap;
    scroll-snap-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    gap: 7px;
  }

  .nav-tab-btn .tab-icon svg {
    width: 17px;
    height: 17px;
  }

  .nav-tab-btn:hover {
    transform: none;
  }

  .nav-tab-btn.active {
    box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.5), 0 3px 12px rgba(168, 85, 247, 0.35);
    transform: scale(1.02);
  }

  /* Animated Top Header Tab */
  .top-window-tab-wrapper {
    display: flex;
    justify-content: flex-start;
    padding-left: 20px;
    height: 28px;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .top-window-tab {
    padding: 4px 20px;
    font-size: 0.84rem;
    border-radius: 12px 12px 0 0;
  }

  .top-window-tab.dip-down {
    transform: translateY(115%);
    opacity: 0;
  }

  /* Main Console Window & Scroll Content */
  .console-window-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .console-window {
    border-radius: 20px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .console-scroll-content {
    padding: 14px 12px 76px 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    flex: 1;
  }

  /* Section Headers */
  .section-header-banner {
    margin-bottom: 16px;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 4px;
  }

  .section-subtitle {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .section-subhead {
    font-size: 0.94rem;
    margin-top: 20px;
    margin-bottom: 12px;
    gap: 6px;
  }

  /* Section 1: Главная (Home) */
  .hero-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 18px 14px;
    margin-bottom: 16px;
    border-radius: 18px;
  }

  .avatar-container {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }

  .hero-name {
    font-size: 1.5rem;
  }

  .hero-headline {
    font-size: 0.88rem;
  }

  .bio-card {
    padding: 14px 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 18px;
    border-radius: 16px;
  }

  .tags-row {
    gap: 6px;
    margin-bottom: 20px;
  }

  .skill-tag {
    padding: 4px 10px;
    font-size: 0.74rem;
  }

  .social-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .social-card {
    padding: 11px 13px;
    border-radius: 14px;
  }

  .social-icon-box {
    width: 38px;
    height: 38px;
  }

  .social-name {
    font-size: 0.94rem;
  }

  /* Section 2: Приложения (Apps) */
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-card {
    padding: 16px;
    border-radius: 16px;
  }

  .app-title {
    font-size: 1.08rem;
  }

  .app-desc {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .btn-open {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.88rem;
    justify-content: center;
  }

  .empty-coming-soon {
    padding: 28px 16px;
  }

  /* Section 3: Портфолио (Portfolio) */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .portfolio-card {
    border-radius: 16px;
  }

  .portfolio-cover-wrap {
    height: 155px;
  }

  .portfolio-body {
    padding: 16px;
  }

  .portfolio-title {
    font-size: 1.12rem;
  }

  .portfolio-desc {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .portfolio-tags {
    gap: 5px;
    margin-bottom: 14px;
  }

  .portfolio-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
  }

  /* Section 4: Аниме (Anime) */
  .anime-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .anime-card {
    border-radius: 16px;
  }

  .anime-cover-wrap {
    height: 200px;
  }

  .anime-body {
    padding: 14px 16px;
  }

  .anime-title {
    font-size: 1.08rem;
    margin-bottom: 6px;
  }

  .anime-desc {
    font-size: 0.84rem;
    margin-bottom: 12px;
    -webkit-line-clamp: 3;
  }

  /* Section 5: Галерея (Gallery) */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-card {
    border-radius: 14px;
  }

  .gallery-thumb-wrap {
    height: 135px;
  }

  .gallery-zoom-badge {
    width: 28px;
    height: 28px;
  }

  .gallery-thumb-title {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .gallery-thumb-desc {
    font-size: 0.72rem;
    -webkit-line-clamp: 1;
  }

  /* Section 6: Донат (Donate) */
  .donate-message-card {
    padding: 16px 14px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-size: 0.88rem;
  }

  .donate-services-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .donate-card {
    padding: 16px;
    border-radius: 16px;
  }

  .crypto-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .crypto-card {
    padding: 12px 14px;
    border-radius: 12px;
  }

  /* Section 7: Контакты (Contacts) */
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .contact-card {
    padding: 14px;
    border-radius: 14px;
  }

  .contact-actions {
    flex-direction: row;
    gap: 8px;
  }

  .btn-contact-action {
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  .contact-cta-wrapper {
    margin: 16px 0;
  }

  .btn-write-message {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.92rem;
  }

  .contact-note-card {
    padding: 14px 16px;
    font-size: 0.85rem;
    border-radius: 14px;
  }

  /* Floating Sound Pill */
  .sound-widget-container {
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    z-index: 100;
  }

  .sound-toggle-btn {
    padding: 8px 12px;
    font-size: 0.78rem;
    gap: 6px;
    border-radius: 999px;
  }

  .sound-label {
    display: none;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 12px;
  }

  .contact-modal-dialog {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    border-radius: 18px;
    max-height: 92vh;
  }

  .modal-title {
    font-size: 1.18rem;
  }

  .modal-subtitle {
    font-size: 0.82rem;
  }

  .modal-form {
    gap: 12px;
  }

  .modal-form .form-input, .modal-form .form-textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .modal-actions {
    flex-direction: row;
    gap: 8px;
    margin-top: 6px;
  }

  .btn-modal-cancel, .btn-modal-submit {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  /* Lightbox Modal on Mobile */
  .gallery-modal-dialog {
    width: 96vw;
    height: 88vh;
    max-height: 88vh;
    border-radius: 18px;
    flex-direction: column;
  }

  .gallery-lightbox-content {
    flex-direction: column;
    width: 100%;
    height: 100%;
  }

  .gallery-photo-column {
    flex: 1.3;
    min-height: 200px;
    position: relative;
  }

  .gallery-arrow-btn {
    width: 36px;
    height: 36px;
  }

  .gallery-arrow-btn svg {
    width: 20px;
    height: 20px;
  }

  .gallery-arrow-btn.prev {
    left: 8px;
  }

  .gallery-arrow-btn.next {
    right: 8px;
  }

  .gallery-zoom-toolbar {
    bottom: 8px;
    padding: 3px 8px;
    gap: 4px;
  }

  .gallery-tool-btn {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .gallery-tool-btn svg {
    width: 15px;
    height: 15px;
  }

  .gallery-zoom-indicator {
    font-size: 0.72rem;
    min-width: 36px;
  }

  .gallery-info-column {
    width: 100%;
    flex: 0.7;
    max-height: 200px;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding: 12px 14px;
    overflow-y: auto;
  }

  .gallery-info-header {
    margin-bottom: 6px;
    padding-bottom: 6px;
    padding-right: 0;
    min-height: auto;
  }

  .gallery-info-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  .gallery-info-desc {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .gallery-info-hint {
    display: none;
  }

  .gallery-close-btn {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    z-index: 60;
  }
}

/* Extra small mobile screens (<= 380px, e.g. iPhone SE / compact devices) */
@media (max-width: 380px) {
  .app-wrapper {
    padding: 8px 8px 12px 8px;
  }

  .top-bar-spacer {
    width: 68px;
  }

  .spb-time-widget {
    padding: 3px 6px;
    font-size: 0.72rem;
    gap: 3px;
  }

  .spb-time-city {
    display: none;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .lang-btn {
    padding: 3px 6px;
    font-size: 0.7rem;
    gap: 3px;
  }

  .nav-tab-btn {
    padding: 7px 11px;
    font-size: 0.8rem;
    gap: 5px;
  }

  .console-scroll-content {
    padding: 12px 8px 76px 8px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-thumb-wrap {
    height: 170px;
  }

  .contact-actions {
    flex-direction: column;
  }
}

/* Ultra small devices (<= 340px) */
@media (max-width: 340px) {
  .top-bar-spacer {
    display: none;
  }

  .top-bar {
    justify-content: space-between;
  }

  .brand-wrapper {
    text-align: left;
    justify-content: flex-start;
  }

  .brand-title {
    font-size: 1.08rem;
  }
}

