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

body {
  margin: 0;
  background: black;
  overflow: hidden; 
  font-family: monospace;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

#matrix {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  display: block;
}

.scroll-container {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.screen {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #00ff66;               /* более яркий зелёный */
}

/* ---------- МЕНЮ ---------- */
.matrix-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  max-width: 110px;
  max-height: 50px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid #00ff66;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 255, 102, 0.4);
  padding: 10px 20px;
  transition: max-width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: pointer;
  white-space: nowrap;
}

.fixed-menu {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.matrix-card:hover {
  max-width: 700px;
}

.card-trigger {
  font-size: 1.8rem;
  font-weight: bold;
  color: #00ff66;
  flex-shrink: 0;
  margin: 0 auto;
  transition: margin 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  text-shadow: 0 0 10px #00ff66;
}

.card-menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.matrix-card:hover .card-trigger {
  margin-left: 0;
  margin-right: 40px;
}

.matrix-card:hover .card-menu {
  opacity: 1;
  transform: translateX(0);
}

.matrix-card:hover .card-item {
  opacity: 1;
  transform: translateX(0);
}

.card-item {
  position: relative;
  color: #00ff66;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 10px;
  border-radius: 8px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, color 0.2s;
  cursor: pointer;
}

/* Стили фокуса для пунктов меню */
.card-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 15px #00ff66;
  background: rgba(0, 255, 102, 0.2);
  color: #fff;
}

.card-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.card-item:hover::after,
.card-item:focus-visible::after {
  transform: scaleX(1);
}

.card-item:hover {
  background: rgba(0, 255, 102, 0.2);
  color: #fff;
}

.card-item:nth-child(1) { transition-delay: 0.1s; }
.card-item:nth-child(2) { transition-delay: 0.15s; }
.card-item:nth-child(3) { transition-delay: 0.2s; }
.card-item:nth-child(4) { transition-delay: 0.25s; }

.screen--hero {
  justify-content: flex-start;
  padding-top: 80px;
}

.card-item.active {
  background: rgba(0, 255, 102, 0.25);
  color: #fff;
  font-weight: bold;
}

.card-item.active::after {
  transform: scaleX(1);
  background: #fff;
  box-shadow: 0 0 12px #fff;
}

/* ---------- ТЕРМИНАЛ ---------- */
.terminal {
  width: min(90%, 700px);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid #00ff66;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 255, 102, 0.5);
  overflow: hidden;
  font-family: 'Courier New', monospace;
  color: #00ff66;
  margin-top: 100px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: rgba(0, 255, 102, 0.1);
  border-bottom: 1px solid #00ff66;
}

.terminal-header .btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00ff66;
  opacity: 0.8;
}

.terminal-header .title {
  margin-left: auto;
  font-size: 0.9rem;
  color: #00ff66;
  opacity: 0.9;
}

.terminal-body {
  padding: 20px;
  min-height: 200px;
  font-size: 1.05rem;          /* чуть крупнее */
  line-height: 1.7;
  white-space: pre-wrap;
  text-shadow: 0 0 3px rgba(0,255,102,0.4);  /* мягкая подсветка */
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #00ff66;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- ПРОЕКТЫ ---------- */
.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #00ff66;
  text-shadow: 0 0 15px #00ff66, 0 0 30px #00ff66;
  margin-bottom: 40px;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  width: 90%;
  max-width: 1200px;
  padding: 0 20px 40px;
}

.project-card {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid #00ff66;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.35);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(0, 255, 102, 0.7);
  border-color: #fff;
}

/* Фокус для всей карточки (ссылка внутри) – добавим на саму ссылку, но карточка может быть не фокусируемой.
   Поэтому обводку дадим на .project-card если внутри активная ссылка в фокусе, но проще дать стиль :focus-visible на .glitch-link */
.project-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease, transform 0.4s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 255, 102, 0.2) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-thumb:hover .project-overlay {
  opacity: 1;
}

.project-thumb:hover img {
  filter: brightness(0.5) saturate(0.7);
  transform: scale(1.03);
}

.project-overlay h3 {
  color: #00ff66;
  text-shadow: 0 0 12px #00ff66;
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: bold;
}

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

.project-tags span {
  padding: 4px 12px;
  border: 1px solid #00ff66;
  border-radius: 4px;
  color: #ffffff;                /* белый текст на тёмном фоне */
  background: rgba(0, 255, 102, 0.15);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.5);
}

.project-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  background: rgba(0, 255, 102, 0.05);
  border-top: 1px solid rgba(0, 255, 102, 0.3);
}

.glitch-link {
  color: #00ff66;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 15px;
  border: 1px solid #00ff66;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.glitch-link:hover {
  background: #00ff66;
  color: #000;
  box-shadow: 0 0 20px #00ff66;
}

/* Фокус на ссылки */
.glitch-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 15px #00ff66, 0 0 5px #00ff66 inset;
  background: rgba(0, 255, 102, 0.2);
  color: #fff;
}

/* ---------- КОНТАКТЫ (голограммы) ---------- */
.hologram-grid {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.hologram-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Стили фокуса для интерактивных голограмм */
.hologram-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
  border-radius: 8px;
}

/* Для карточки Email (div) добавим role и tabindex, а также стиль фокуса */
.hologram-card[data-copy]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

.hologram-icon {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.holo-symbol {
  font-size: 3rem;
  font-weight: bold;
  color: #00ff66;
  text-shadow: 0 0 15px #00ff66, 0 0 30px #00ff66;
  z-index: 2;
  transition: transform 0.3s, color 0.3s;
}

.holo-ring {
  position: absolute;
  inset: 0;
  border: 2px solid #00ff66;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0,255,102,0.5);
  animation: spin 10s linear infinite;
}

.holo-ring--inner {
  inset: 10px;
  border-width: 1px;
  opacity: 0.7;
  animation-direction: reverse;
  animation-duration: 7s;
}

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

.holo-noise {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,102,0.15) 0%, transparent 70%);
  opacity: 0;
  animation: noise 0.15s infinite;
  pointer-events: none;
}

@keyframes noise {
  0% { transform: translate(0, 0); opacity: 0.3; }
  25% { transform: translate(1px, -1px); opacity: 0.5; }
  50% { transform: translate(-1px, 1px); opacity: 0.2; }
  75% { transform: translate(-1px, -1px); opacity: 0.4; }
  100% { transform: translate(1px, 1px); opacity: 0.3; }
}

.holo-label {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #00ff66;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0,255,102,0.8);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.holo-hint {
  font-size: 0.8rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
  position: absolute;
  bottom: -30px;
  white-space: nowrap;
  text-shadow: 0 0 5px black;
}

.hologram-card:hover .holo-symbol {
  transform: scale(1.2);
  color: #fff;
  text-shadow: 0 0 25px #fff, 0 0 50px #00ff66;
}

.hologram-card:hover .holo-ring {
  box-shadow: 0 0 30px rgba(0,255,102,0.9);
}

.hologram-card:hover .holo-noise {
  opacity: 1;
}

.hologram-card:hover .holo-label {
  opacity: 1;
}

.hologram-card:hover .holo-hint {
  opacity: 1;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}