@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg: #05060b;
  --bg-soft: #0c0e1a;
  --card: rgba(14, 17, 32, 0.7);
  --card-hover: rgba(22, 27, 50, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f1f3f9;
  --muted: #8e95b2;
  --accent: #7c5cff;
  --radius: 20px;
  --maxw: 1200px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* glow background */
.bgglow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}
.bgglow::before,
.bgglow::after {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.14;
  pointer-events: none;
}
.bgglow::before {
  background: var(--accent);
  left: -200px;
  top: -200px;
  animation: floatMesh1 25s ease-in-out infinite alternate;
}
.bgglow::after {
  background: #27c79a;
  right: -200px;
  bottom: -200px;
  animation: floatMesh2 30s ease-in-out infinite alternate;
}
@keyframes floatMesh1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(180px, 100px) scale(1.15); }
  100% { transform: translate(-60px, 250px) scale(0.9); }
}
@keyframes floatMesh2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-200px, -120px) scale(0.85); }
  100% { transform: translate(60px, -240px) scale(1.1); }
}
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    650px circle at var(--mx, -1000px) var(--my, -1000px),
    rgba(124, 92, 255, 0.08),
    transparent 65%
  );
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 6, 11, 0.75);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px 4px var(--accent);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  align-items: center;
}
.nav-links a:hover {
  color: var(--text);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.lang-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  transition: var(--transition);
}
.lang-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.2);
}
/* Toggle button style */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}
.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

@media (max-width: 640px){
  .menu-toggle {
    display: flex;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(8, 9, 19, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 60px 40px;
    gap: 32px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }
  .nav-links a:last-of-type {
    border-bottom: none;
  }
  .nav-links .lang-btn {
    display: inline-block;
    margin-top: 16px;
  }
}

/* ---------- Dashboard Layout ---------- */
.dashboard-section {
  padding: 20px 0 32px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background: rgba(10, 12, 22, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 24px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dashboard-header .db-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}
.dashboard-header .db-title-bar .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27c79a;
  box-shadow: 0 0 8px #27c79a;
  animation: ledPulse 2s ease-out infinite;
}
.dashboard-header .db-meta-bar {
  display: flex;
  gap: 20px;
}
.dashboard-header .db-meta-item .label {
  color: var(--accent);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 12, 0.2);
  padding: 24px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Reusable Dashboard Card */
.db-card {
  background: rgba(10, 12, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.db-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--c-mx, 50%) var(--c-my, 50%), rgba(124, 92, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}
.db-card:hover {
  border-color: rgba(124, 92, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(124, 92, 255, 0.03);
}

/* Card 1: Profile card specific styling */
.profile-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.profile-card h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 20ch;
  margin-top: 10px;
}
.profile-card h1 .grad {
  background: linear-gradient(100deg, #7c5cff, #27c79a 50%, #5cd0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.profile-card p.lead {
  color: #c2c7da;
  font-size: 15.5px;
  max-width: 50ch;
  margin-top: 18px;
  line-height: 1.6;
}
.profile-card .cta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.btn svg {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}
.btn:hover svg.arrow {
  transform: translateX(4px);
}
.btn:hover svg.tg-icon {
  transform: scale(1.08) rotate(4deg);
}
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(124, 92, 255, 0.5);
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.02);
}
.btn.ghost:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.05);
  color: #fff;
}

/* бейдж доступности над заголовком */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 13px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: rgba(39, 199, 154, 0.08);
  border: 1px solid rgba(39, 199, 154, 0.3);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6fe3c0;
}
.hero-badge .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c79a;
  animation: ledPulse 2s ease-out infinite;
}
@keyframes ledPulse {
  0% { box-shadow: 0 0 0 0 rgba(39, 199, 154, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(39, 199, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 199, 154, 0); }
}

/* Card 2: Holographic HUD Avatar Card */
.holo-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.holo-card .holo-widget {
  max-width: 290px;
  height: 310px;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.holo-card .holo-avatar-wrap {
  width: 190px;
  height: 190px;
}
.holo-card .hud-ring.rotating-clockwise {
  width: 240px;
  height: 240px;
}
.holo-card .hud-ring.rotating-counter {
  width: 210px;
  height: 210px;
}
.holo-data-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.holo-data-compact .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: statusPulse 1.8s infinite ease-in-out;
}

/* Card 3: Terminal Card styling */
.terminal-card {
  padding: 0;
  border: none;
  background: transparent;
}
.terminal-card .terminal-window {
  height: 380px;
}

/* Card 4: Metrics/Activity Log Card */
.metrics-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 380px;
  padding: 28px 32px;
}
.metrics-header .metrics-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.metrics-header .metrics-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}
.metrics-card #stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: auto 0;
}
.metrics-card .stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metrics-card .stat-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.metrics-card .stat .n {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, #fff 40%, var(--muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metrics-card .stat .l {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.metrics-card .stat-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
}
.metrics-card .stat-bar {
  height: 100%;
  border-radius: 2px;
  box-shadow: 0 0 8px currentColor;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.metrics-card .metrics-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}
.metrics-card .metrics-footer .led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.chip {
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  user-select: none;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
.chip.active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.4);
}

.dashboard-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  background: rgba(10, 12, 22, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.dashboard-pane {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  background: rgba(10, 12, 22, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 28px 32px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.section-subtitle {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  max-width: 65ch;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  padding-bottom: 80px;
  margin-top: 16px;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.grid.filtering {
  opacity: 0;
  transform: translateY(15px) scale(0.99);
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: perspective(1200px) translateY(64px) rotateX(-9deg) scale(0.94);
  transform-origin: 50% 100%;
  filter: blur(6px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}
.card-body .card-head {
  padding: 0;
  margin-bottom: 6px;
}

/* featured / флагман — на всю ширину, горизонтальный */
.card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.card.featured .cover {
  height: auto;
  width: 48%;
  min-height: 380px;
  flex-shrink: 0;
}
.card.featured .card-body {
  padding: 36px 40px;
  justify-content: center;
}
.card.featured h3 {
  font-size: 32px;
  margin-top: 8px;
}
.card.featured .desc {
  font-size: 16px;
  max-width: 62ch;
}
.card.featured .hl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
@media (max-width: 860px) {
  .card.featured {
    flex-direction: column;
  }
  .card.featured .cover {
    width: 100%;
    min-height: 0;
    height: 240px;
  }
  .card.featured .hl {
    grid-template-columns: 1fr;
  }
  .card.featured .card-body {
    padding: 24px;
  }
}

.flag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--ac) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent);
}
.flag svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* covers / illustrations */
.cover {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #080911;
  border-bottom: 1px solid var(--border);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .cover img {
  transform: scale(1.04);
}
.cover.gen {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(200px 150px at 30% 20%, color-mix(in srgb, var(--ac) 35%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--ac) 15%, #080911), #080911 80%);
}
.cover.gen::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.6;
}
.cover.gen .gen-label {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ac) 85%, #ffffff);
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 1;
}

.brand-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 6, 11, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px circle at var(--c-mx, 50%) var(--c-my, 50%),
    color-mix(in srgb, var(--ac, var(--accent)) 10%, transparent),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  background: var(--card-hover);
  transform: translateY(-8px) scale(1.005);
  border-color: color-mix(in srgb, var(--ac, var(--accent)) 45%, transparent);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 25px 0 color-mix(in srgb, var(--ac, var(--accent)) 15%, transparent),
    0 0 0 1px color-mix(in srgb, var(--ac, var(--accent)) 30%, transparent);
}

.card .cat {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
}
.card .year {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.card .desc {
  color: #d1d5db;
  font-size: 14.5px;
  margin: 8px 0 18px;
  flex: 1;
}
.card .hl {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.card .hl li {
  font-size: 13.5px;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}
.card .hl li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ac, var(--accent));
  box-shadow: 0 0 8px 1px var(--ac, var(--accent));
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.card-head {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}

/* Card Links Block */
.card-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 18px;
}
.card-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}
.card-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.card-link:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--ac) 45%, transparent);
  background: color-mix(in srgb, var(--ac) 10%, rgba(255, 255, 255, 0.03));
  box-shadow: 0 4px 15px -5px color-mix(in srgb, var(--ac) 30%, transparent);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 22, 0.3);
  padding: 40px 0 60px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}
.footer-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
@media (min-width: 768px) {
  .footer-in {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  color: var(--muted);
}
.footer-status .pulse-gray {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  animation: grayPulse 2.5s infinite ease-in-out;
}
@keyframes grayPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
.footer-copyright {
  font-family: 'Outfit', sans-serif;
}
.footer-in a {
  color: var(--text);
  transition: var(--transition);
}
.footer-in a:hover {
  color: var(--accent);
}

::selection {
  background: rgba(124, 92, 255, 0.4);
}

/* Core Expertise / Skills list below the grid */
.dashboard-skills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.dashboard-skills-row .skills-col {
  background: rgba(10, 12, 22, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px 28px;
  transition: var(--transition);
}
.dashboard-skills-row .skills-col:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}
.dashboard-skills-row .skills-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}
.skills-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Interactive Additions ---------- */
.active-tag-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 30px 0;
  color: var(--text);
  backdrop-filter: blur(8px);
  animation: cardRise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.active-tag-filter .close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: var(--transition);
}
.active-tag-filter .close-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

#stackTags .tag {
  cursor: pointer;
  transition: var(--transition);
}
#stackTags .tag:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.15);
}

.card-link {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ac) 12%, transparent);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.card-link:hover::after {
  transform: translateY(0);
}

/* ==========================================================================
   FUTURISTIC & CYBERPUNK WIDGETS
   ========================================================================== */

/* ---------- Responsive Grid Adjustments ---------- */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
  }
  .dashboard-header .db-meta-bar {
    width: 100%;
    justify-content: space-between;
  }
  .holo-card {
    order: -1; /* Hologram avatar at the very top of mobile grid */
  }
  .metrics-card {
    height: auto;
  }
  .dashboard-skills-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---------- Holo Widget (Cyberpunk HUD Avatar) ---------- */
.holo-widget {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 360px;
  background: rgba(10, 12, 22, 0.65);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    inset 0 0 20px rgba(124, 92, 255, 0.15),
    0 0 30px rgba(124, 92, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.holo-widget:hover {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 
    0 30px 60px -10px rgba(124, 92, 255, 0.15),
    inset 0 0 30px rgba(124, 92, 255, 0.25),
    0 0 40px rgba(124, 92, 255, 0.1);
}
.holo-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(124, 92, 255, 0.08) 50%,
    rgba(124, 92, 255, 0.08) 52%,
    transparent 52%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}
.holo-widget::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.6), transparent);
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.6);
  top: -10%;
  animation: scanMove 4.5s linear infinite;
  z-index: 6;
  pointer-events: none;
}
@keyframes scanMove {
  0% { top: -10%; }
  100% { top: 110%; }
}
.holo-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.3) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 1;
  pointer-events: none;
}
.holo-avatar-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  padding: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.05) 60%, rgba(124, 92, 255, 0.15) 100%);
}
.holo-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 92, 255, 0.3);
  filter: grayscale(20%) contrast(110%) brightness(95%);
  box-shadow: 0 0 25px rgba(124, 92, 255, 0.2);
  transition: var(--transition);
}
.holo-widget:hover .holo-avatar {
  filter: grayscale(0%) contrast(115%) brightness(100%);
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 35px rgba(124, 92, 255, 0.4);
}

.hud-ring {
  position: absolute;
  border: 1px dashed rgba(124, 92, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.hud-ring.rotating-clockwise {
  width: 240px;
  height: 240px;
  border-width: 1px;
  border-style: double;
  border-color: rgba(124, 92, 255, 0.2) transparent;
  animation: rotClockwise 20s linear infinite;
}
.hud-ring.rotating-counter {
  width: 210px;
  height: 210px;
  border-width: 1px;
  border-style: dashed;
  border-color: transparent rgba(39, 199, 154, 0.3) rgba(39, 199, 154, 0.3);
  animation: rotCounter 15s linear infinite;
}
@keyframes rotClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rotCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.holo-data {
  margin-top: 24px;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  text-align: center;
  z-index: 3;
}
.diagnostic-line {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.diagnostic-line .pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c79a;
  box-shadow: 0 0 10px #27c79a;
  animation: statusPulse 1.8s infinite ease-in-out;
}
@keyframes statusPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 14px #27c79a; }
}
.holo-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  letter-spacing: 0.05em;
  margin-top: 3px;
  text-transform: uppercase;
}

/* ---------- Terminal Console Simulator ---------- */
.terminal-window {
  background: #080913;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(124, 92, 255, 0.03);
  overflow: hidden;
  font-family: 'Space Mono', 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  height: 380px;
  transition: var(--transition);
}
.terminal-window:hover {
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: 
    0 25px 45px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(124, 92, 255, 0.06);
}
.terminal-header {
  background: #111322;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.terminal-buttons {
  display: flex;
  gap: 7px;
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.term-dot.close { background: #ff5f56; }
.term-dot.minimize { background: #ffbd2e; }
.term-dot.maximize { background: #27c93f; }
.terminal-title {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  font-weight: 500;
}
.terminal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  color: #38ef7d; /* Neon green text */
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}
.terminal-body::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}
.terminal-line {
  margin-bottom: 2px;
  word-break: break-word;
  white-space: pre-wrap;
}
.terminal-line.cmd {
  color: #fff;
  font-weight: 600;
}
.terminal-line.info {
  color: #5cd0ff;
}
.terminal-line.success {
  color: #27c79a;
}
.terminal-line.comment {
  color: #6272a4;
  font-style: italic;
}
.terminal-input-line {
  padding: 10px 20px;
  background: #05060c;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #fff;
}
.terminal-input-line .prompt {
  color: #7c5cff;
  font-weight: bold;
}
.terminal-input-line .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #38ef7d;
  animation: cursorBlink 1s infinite step-start;
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}
.terminal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: #090a14;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.term-btn {
  font-family: monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.term-btn:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.15);
}
.term-btn.clear-btn {
  margin-left: auto;
}
.term-btn.clear-btn:hover {
  background: rgba(255, 95, 86, 0.15);
  border-color: #ff5f56;
  color: #ff5f56;
  box-shadow: 0 4px 12px rgba(255, 95, 86, 0.15);
}

/* ---------- Card reveal + hover ---------- */
.card {
  will-change: transform, opacity, filter;
}
/* каскадное появление: задержка по индексу карточки (--i), но не дольше ~0.5с */
.card.visible {
  opacity: 1;
  filter: blur(0);
  transform: perspective(1200px) translateY(0) rotateX(0) scale(1);
  transition-delay: calc(min(var(--i, 0), 8) * 65ms);
}
/* hover без смещения — карточка стоит на месте, реагирует только цветом/тенью/рамкой */
.card.visible:hover {
  transition-delay: 0s;
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--ac, var(--accent)) 40%, transparent);
  box-shadow:
    0 18px 40px -18px rgba(0, 0, 0, 0.65),
    0 0 26px -8px color-mix(in srgb, var(--ac, var(--accent)) 20%, transparent);
}
/* featured-карточка появляется без 3D-наклона (она широкая) */
.card.featured {
  transform: perspective(1400px) translateY(64px) scale(0.96);
}
.card.featured.visible {
  transform: perspective(1400px) translateY(0) scale(1);
}

/* бегущий блик по карточке при наведении */
.card .sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.07) 48%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover .sheen {
  opacity: 1;
  animation: sheenSweep 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sheenSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

/* верхняя акцентная полоса — растёт из центра при наведении */
.card .accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 4;
  background: linear-gradient(90deg, transparent, var(--ac, var(--accent)), transparent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.card:hover .accent-bar {
  transform: scaleX(1);
}

/* Неоновые угловые скобки (HUD-рамка) — рисуются 8 градиентами, по 2 на угол.
   Надёжно и чётко при любом размере карточки, в отличие от clip-path. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  --t: 2px;     /* толщина линии */
  --len: 20px;  /* длина «уса» */
  --in: 8px;    /* отступ от края внутрь */
  --c: var(--ac, var(--accent));
  background-image:
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),  /* TL: гориз + верт */
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),  /* TR */
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),  /* BL */
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c));  /* BR */
  background-repeat: no-repeat;
  background-size:
    var(--len) var(--t), var(--t) var(--len),
    var(--len) var(--t), var(--t) var(--len),
    var(--len) var(--t), var(--t) var(--len),
    var(--len) var(--t), var(--t) var(--len);
  background-position:
    var(--in) var(--in), var(--in) var(--in),
    calc(100% - var(--in)) var(--in), calc(100% - var(--in)) var(--in),
    var(--in) calc(100% - var(--in)), var(--in) calc(100% - var(--in)),
    calc(100% - var(--in)) calc(100% - var(--in)), calc(100% - var(--in)) calc(100% - var(--in));
  opacity: 0;
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.card:hover::after {
  opacity: 1;
  filter: drop-shadow(0 0 5px var(--c)) drop-shadow(0 0 2px var(--c));
}

/* Cover Image smooth zoom */
.cover img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .cover img {
  transform: scale(1.03);
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Card polish: cover scrim, tags, links ---------- */
/* затемняющий градиент снизу обложки — для глубины и читаемости бейджа */
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 6, 11, 0.55) 100%);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.4s ease;
}
.card:hover .cover::after { opacity: 0.7; }
.card:hover .cover img { transform: scale(1.025); }

/* иконка на сгенерированной обложке — без смещения, только лёгкая подсветка */
.cover.gen .gen-label {
  transition: letter-spacing 0.4s ease, color 0.4s ease;
}
.card:hover .cover.gen .gen-label {
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--ac) 70%, #ffffff);
}

/* полупрозрачная плашка категории на обложке (единая для всех карточек) */
.cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 6, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.6);
}
/* акцентная точка перед категорией */
.cover-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--ac, var(--accent));
  box-shadow: 0 0 8px 1px var(--ac, var(--accent));
}

/* бренд проекта в шапке тела карточки */
.card-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ac, var(--accent)) 55%, #ffffff);
}

/* кнопка-ссылка в углу обложки (единый паттерн для всех карточек) */
.cover-link {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: rgba(5, 6, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.cover-link svg {
  width: 16px;
  height: 16px;
}
.cover-link:hover {
  color: #fff;
  background: var(--ac, var(--accent));
  border-color: transparent;
}

/* теги — последний элемент карточки: без лишнего нижнего отступа */
.card-body .tags { margin-bottom: 0; }

/* теги: подсветка по наведению */
.card .tag {
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.card .tag:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ac, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--ac, var(--accent)) 12%, rgba(255, 255, 255, 0.03));
}

/* заголовок карточки слегка подсвечивается акцентом при наведении */
.card h3 {
  transition: color 0.3s ease;
}
.card:hover h3 {
  color: color-mix(in srgb, var(--ac, var(--accent)) 35%, #ffffff);
}

/* стрелка-аффорданс у ссылок */
.card-link svg { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.card-link:hover svg { transform: translateX(3px) translateY(-3px); }

/* ---------- Доступность: уважать reduce-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card, .card.visible,
  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
  .card .sheen, .card .accent-bar { display: none; }
}

/* ---------- Mobile Responsiveness Adjustments ---------- */
@media (max-width: 600px) {
  .dashboard-section {
    padding: 30px 0 40px;
  }
  .terminal-body {
    padding: 14px;
    font-size: 12px;
  }
  .terminal-input-line {
    padding: 8px 14px;
    font-size: 12px;
  }
  .terminal-controls {
    padding: 10px 14px;
  }
  .term-btn {
    font-size: 10px;
    padding: 5px 10px;
  }
}

@media (max-width: 360px) {
  .holo-widget {
    height: 340px;
    padding: 16px;
  }
  .holo-avatar-wrap {
    width: 150px;
    height: 150px;
  }
  .hud-ring.rotating-clockwise {
    width: 200px;
    height: 200px;
  }
  .hud-ring.rotating-counter {
    width: 170px;
    height: 170px;
  }
}

/* ---------- Cyber Background Grid ---------- */
.cyber-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(124, 92, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.012) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -2;
  opacity: 0.8;
}

/* ---------- 3D Tilt Effect ---------- */
.card, .holo-widget {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) scale3d(var(--scale, 1), var(--scale, 1), var(--scale, 1));
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.card:hover {
  --scale: 1.02;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(124, 92, 255, 0.15);
  cursor: pointer;
}

.card-body, .cover {
  transform: translateZ(20px);
}

/* ---------- Cyber Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: #05060b;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.preloader-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.12) 0%, transparent 70%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.preloader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.preloader-hud {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hud-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(124, 92, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(124, 92, 255, 0.1);
}

.hud-mid {
  position: absolute;
  width: 82%;
  height: 82%;
  border: 2px dotted rgba(39, 199, 154, 0.5);
  border-radius: 50%;
}

.hud-inner {
  position: absolute;
  width: 65%;
  height: 65%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(14, 17, 32, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(124, 92, 255, 0.2);
}

.hud-percent {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  letter-spacing: -0.05em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.rotating-clockwise {
  animation: rotateCW 12s linear infinite;
}

.rotating-counter {
  animation: rotateCCW 8s linear infinite;
}

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

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

.preloader-log-window {
  width: 100%;
  background: rgba(7, 9, 21, 0.85);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(124, 92, 255, 0.05);
  backdrop-filter: blur(8px);
}

.log-title {
  color: rgba(124, 92, 255, 0.8);
  font-weight: bold;
  border-bottom: 1px solid rgba(124, 92, 255, 0.15);
  padding-bottom: 6px;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.log-body {
  height: 120px;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
  text-align: left;
}

.log-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.log-line.success {
  color: #27c79a;
}

.log-line.info {
  color: #ffa04d;
}

.log-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #27c79a;
  animation: blink 0.8s infinite;
  margin-top: 4px;
}

@keyframes blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.bypass-btn {
  position: absolute;
  bottom: 30px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  padding: 8px 16px;
  transition: all 0.3s;
}

.bypass-btn:hover {
  color: var(--text);
  text-shadow: 0 0 8px var(--text);
}

.preloader-controls {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-controls .enter-btn {
  animation: pulseEnterButton 2s infinite alternate;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.3);
}

@keyframes pulseEnterButton {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(124, 92, 255, 0.3); }
  100% { transform: scale(1.05); box-shadow: 0 0 30px rgba(124, 92, 255, 0.6); }
}

/* ---------- Filters Container Layout ---------- */
.filters-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

/* ---------- Search Bar ---------- */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 240px;
  display: flex;
  align-items: center;
}

.project-search {
  width: 100%;
  background: rgba(14, 17, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px 8px 36px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition);
}

.project-search:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(22, 27, 50, 0.8);
  box-shadow: 0 0 15px rgba(124, 92, 255, 0.2);
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
  transition: var(--transition);
}

.project-search:focus + .search-icon,
.search-wrap:hover .search-icon {
  color: var(--accent);
}

/* ---------- Blog Nav Status ---------- */
.blog-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.blog-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffa04d;
  background: rgba(255, 160, 77, 0.1);
  border: 1px solid rgba(255, 160, 77, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  transition: var(--transition);
}

.blog-nav-link:hover .blog-badge {
  background: rgba(255, 160, 77, 0.2);
  box-shadow: 0 0 8px rgba(255, 160, 77, 0.2);
}

/* ---------- Project Details Modal ---------- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-window {
  position: relative;
  width: 100%;
  max-width: 950px;
  max-height: 90vh;
  background: rgba(14, 17, 32, 0.8);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(124, 92, 255, 0.15);
  z-index: 2;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.3) transparent;
  animation: modalScaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-window::-webkit-scrollbar {
  width: 6px;
}

.modal-window::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.3);
  border-radius: 99px;
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-container {
  display: grid;
  grid-template-columns: 1.15fr 1.25fr;
  gap: 40px;
  padding: 40px;
}

@media (max-width: 800px) {
  .modal-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 24px;
  }
  .modal-window {
    max-height: 95vh;
  }
}

.modal-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-image-wrapper {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(7, 9, 21, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/10;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-actions {
  display: flex;
  gap: 16px;
}

.modal-actions .btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.modal-year-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.modal-year {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #27c79a;
  background: rgba(39, 199, 154, 0.1);
  border: 1px solid rgba(39, 199, 154, 0.2);
  padding: 2px 10px;
  border-radius: 99px;
}

.modal-category {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-right h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-body h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

#modalDescription {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  opacity: 0.85;
}

.modal-challenges-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.modal-challenges-list li {
  line-height: 1.5;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-tags .tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .search-wrap {
    max-width: 100%;
  }
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}


