/* =============================================
   NEVSKY LINKS — DARK THEME (B&W ONLY)
   ============================================= */

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

:root {
  --bg:        #0a0a0a;
  --bg-2:      #111111;
  --bg-3:      #1a1a1a;
  --border:    #2a2a2a;
  --border-2:  #3a3a3a;
  --text-1:    #f5f5f5;
  --text-2:    #a8a8a8;
  --text-3:    #606060;
  --white:     #ffffff;
  --mid:       #787878;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* =============================================
   PARTICLES CANVAS
   ============================================= */

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* =============================================
   LAYOUT
   ============================================= */

.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* =============================================
   HEADER
   ============================================= */

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: fadeDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1.5px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: spinRing 12s linear infinite;
  box-shadow:
    0 0 0 1px var(--border),
    0 0 30px rgba(255,255,255,0.04);
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    transparent 0%,
    rgba(255,255,255,0.15) 30%,
    transparent 60%
  );
  animation: spinRing 4s linear infinite;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1.1;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
  max-width: 300px;
}

/* =============================================
   LINKS SECTION
   ============================================= */

.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* =============================================
   LINK CARD
   ============================================= */

.link-card {
  position: relative;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.3s, transform 0.3s;
  cursor: default;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }

.link-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
}

/* Glow overlay */
.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.04),
    transparent 50%
  );
}

.link-card:hover .card-glow {
  opacity: 1;
}

/* Inner layout */
.card-inner {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Icon */
.card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-icon--img {
  padding: 0;
  overflow: hidden;
}

.card-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}

.link-card:hover .card-icon {
  background: #202020;
  border-color: var(--border-2);
}

/* Content */
.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-description {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button */
.card-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.2s,
    box-shadow 0.25s;
  white-space: nowrap;
}

.card-button:hover {
  background: var(--white);
  border-color: var(--white);
  color: #0a0a0a;
  transform: scale(1.05);
  box-shadow: 0 4px 24px rgba(255,255,255,0.12);
}

.card-button:hover .button-arrow {
  transform: translateX(3px);
}

.button-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  font-size: 0.78rem;
  color: var(--text-3);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 480px) {
  .card-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .card-button {
    width: 100%;
    justify-content: center;
  }

  .card-description {
    display: none;
  }
}
