*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --text: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #ff3333;
  --accent-glow: rgba(255, 51, 51, 0.3);
  --border: #222222;
  --border-hover: #333333;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('media/fon.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.cursor {
  width: 20px;
  height: 20px;
  border: 1px solid var(--text);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor.hover {
  transform: scale(2);
  background: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s;
}

.header.scrolled {
  border-color: var(--border);
}

.header.hidden {
  transform: translateY(-100%);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link--highlight {
  color: var(--accent);
}

.nav-link--highlight:hover {
  color: #ff6666;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}

.hero-content {
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.tag-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-bottom: 32px;
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 3s infinite;
  color: var(--accent);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 3s infinite;
  color: #00ffff;
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 2px); }
  94% { transform: translate(2px, -2px); }
  96% { transform: translate(-1px, 1px); }
}

@keyframes glitch-2 {
  0%, 90%, 100% { transform: translate(0); }
  91% { transform: translate(2px, -2px); }
  93% { transform: translate(-2px, 2px); }
  95% { transform: translate(1px, -1px); }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 48px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 32px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.meta-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-scroll {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

section {
  padding: 120px 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 64px;
}

.section-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.portfolio {
  background: transparent;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.game-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.game-card:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.game-logo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-logo {
  transform: scale(0.8) translateY(-20px);
}

.game-logo-img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
  transition: filter 0.3s;
}

.game-card:hover .game-logo-img {
  filter: drop-shadow(0 0 30px var(--accent-glow));
}

.game-logo--rounded {
  border-radius: 24px;
}

.game-logo--spy {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.game-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.game-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.game-status-badge--active {
  color: #00ff88;
  border-color: #00ff88;
}

.game-status-badge--archive {
  color: var(--text-muted);
  border-color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.game-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(10, 10, 10, 0.95) 60%, transparent 100%);
  padding: 40px 24px 24px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-info {
  transform: translateY(0);
}

.game-info-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.game-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.game-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text);
  background: var(--accent);
  border: none;
  transition: all 0.3s;
  width: fit-content;
}

.game-link:hover {
  background: #ff6666;
  gap: 12px;
}

.game-link--archive {
  background: transparent;
  border: 1px solid var(--border);
}

.game-link--archive:hover {
  border-color: var(--text);
  background: transparent;
}

.portfolio-more {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  text-align: center;
}

.portfolio-more p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.discord-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.discord-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  color: #5865F2;
  background: rgba(88, 101, 242, 0.1);
  padding: 8px 16px;
  border-radius: 4px;
}

.channel-icon {
  width: 16px;
  height: 16px;
}

.team {
  background: var(--bg-secondary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.team-card {
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.team-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.team-role {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.role-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.role-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member {
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: 4px;
}

.tag-beta {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

.footer {
  padding: 64px 0 32px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.3s;
}

.footer-link--support {
  color: var(--accent);
}

.footer-link--support:hover {
  color: #ff6666;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-made {
  font-family: 'Space Grotesk', sans-serif;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 968px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project--featured {
    grid-template-columns: 1fr;
  }

  .project-visual {
    order: -1;
  }

  .games-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  
  .game-logo-text {
    font-size: 3rem;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .hero-meta {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .meta-divider {
    display: none;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }
  
  .cursor {
    display: none;
  }
}
