/* ==========================================
   MY ELECTRO — PREMIUM MINIMAL REDESIGN 2026
   ========================================== */

:root {
  /* === Color System — Single Accent === */
  --bg-deep: #060810;
  --bg-surface: #090c18;
  --bg-glass: rgba(9, 12, 24, 0.6);
  --bg-glass-light: rgba(255, 255, 255, 0.035);
  --bg-glass-hover: rgba(255, 255, 255, 0.07);

  /* Primary: Electric Blue (single accent) */
  --accent: #4f9eff;
  --accent-bright: #7ab8ff;
  --accent-dim: rgba(79, 158, 255, 0.12);
  --accent-glow: rgba(79, 158, 255, 0.3);
  --rgb-accent: 79, 158, 255;

  /* Keep old names as aliases so existing code doesn't break */
  --cyan: var(--accent);
  --cyan-dim: var(--accent-dim);
  --cyan-glow: var(--accent-glow);
  --rgb-cyan: var(--rgb-accent);
  --violet-bright: var(--accent);
  --violet-glow: var(--accent-glow);
  --rgb-violet: var(--rgb-accent);
  --gold: var(--accent-bright);
  --gold-dim: var(--accent-dim);
  --gold-glow: var(--accent-glow);

  /* Social action colors (kept intentionally for identity) */
  --rgb-shop: 52, 211, 153;
  --rgb-youtube: 239, 68, 68;
  --rgb-instagram: 236, 72, 153;
  --rgb-telegram: 38, 167, 223;

  /* Animation lerp values */
  --lerp-0: 1;
  --lerp-1: 0.5625;
  --lerp-2: 0.25;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-cyan: rgba(79, 158, 255, 0.2);
}

/* ==========================================
   RESET & BASE
   ========================================== */
html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  display: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow-y: scroll;
  background-color: var(--bg-deep);
  min-height: 100vh;
  color: #e2e8f0;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================
   BACKGROUND VIDEO
   ========================================== */
#bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.35) blur(1px) saturate(1.4);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(0, 212, 255, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(circle, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.75) 100%);
  z-index: -1;
}

/* ==========================================
   INTRO LOADER
   ========================================== */
#intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease-out;
  cursor: pointer;
}

#introVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   MAIN LOGO (transitions to header)
   ========================================== */
#main-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 250px;
  z-index: 5000;
  opacity: 0;
  transition: all 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  filter: drop-shadow(0 0 20px var(--cyan-glow));
}

#intro-loader[style*="opacity: 0"] ~ #main-logo {
  opacity: 1;
}

#main-logo.move-to-header {
  top: 12px;
  left: 30px;
  width: 56px;
  transform: translate(0, 0) scale(1);
  filter: drop-shadow(0 0 8px var(--cyan));
}

/* ==========================================
   SITE HEADER
   ========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(5, 8, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 4000;
  padding: 0 30px;
  display: flex;
  align-items: center;
  direction: ltr;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 1s ease-out;
}

/* Animated gradient bottom border */
.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.4) 30%,
    rgba(168, 85, 247, 0.4) 70%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.site-header.visible::after {
  opacity: 1;
}

.site-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.logo-text-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 4px;
}

#logo-placeholder {
  width: 65px;
  height: 56px;
  flex-shrink: 0;
}

.brand-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  z-index: 5001;
  display: flex;
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(79, 158, 255, 0.7),
    0 0 20px rgba(79, 158, 255, 0.3);
  position: relative;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.letter {
  display: inline-block;
  animation: wave-motion 4.5s ease-in-out infinite;
}

.char-1 {
  animation-delay: 0s;
}

.char-2 {
  animation-delay: 0.06s;
}

.char-3 {
  animation-delay: 0.12s;
}

.char-4 {
  animation-delay: 0.18s;
}

.char-5 {
  animation-delay: 0.24s;
}

.char-6 {
  animation-delay: 0.3s;
}

.char-7 {
  animation-delay: 0.36s;
}

.char-8 {
  animation-delay: 0.42s;
}

.char-9 {
  animation-delay: 0.48s;
}

@keyframes wave-motion {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* ==========================================
   HEADER NAV LINKS (mini social buttons)
   ========================================== */
.header-nav-links {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: all 0.5s ease;
}

.mini-btn {
  color: #fff;
  font-size: 1.1rem;
  background: var(--bg-glass-light);
  border: 1px solid var(--border-medium);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(8px);
}

.mini-btn:hover {
  transform: translateY(-3px) scale(1.1);
}

.mini-btn.shop:hover {
  background: rgba(var(--rgb-shop), 0.2);
  border-color: rgb(var(--rgb-shop));
  color: rgb(var(--rgb-shop));
  box-shadow: 0 0 20px rgba(var(--rgb-shop), 0.5);
}

.mini-btn.youtube:hover {
  background: rgba(var(--rgb-youtube), 0.2);
  border-color: rgb(var(--rgb-youtube));
  color: rgb(var(--rgb-youtube));
  box-shadow: 0 0 20px rgba(var(--rgb-youtube), 0.5);
}

.mini-btn.instagram:hover {
  background: rgba(var(--rgb-instagram), 0.2);
  border-color: rgb(var(--rgb-instagram));
  color: rgb(var(--rgb-instagram));
  box-shadow: 0 0 20px rgba(var(--rgb-instagram), 0.5);
}

body.scrolled .header-nav-links {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.header-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================
   MAIN CONTENT / HERO SECTION
   ========================================== */
.main-content {
  position: relative;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.main-content.visible {
  opacity: 1;
}

/* Canvas for particle system */
#particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.container {
  text-align: center;
  width: 90%;
  max-width: 650px;
  z-index: 10;
  position: relative;
}

/* ==========================================
   SLOGAN / TYPING TEXT
   ========================================== */
.slogan-container {
  position: absolute;
  right: 8%;
  top: 110px;
  width: 420px;
  z-index: 10;
  text-align: right;
}

.typing-text {
  margin-bottom: 18px;
  min-height: 45px;
  padding-left: 10px;
  border-left: 3px solid transparent;
}

#slogan-line1 {
  font-size: 2.1rem;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 30px rgba(var(--rgb-cyan), 0.5),
    0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  letter-spacing: 0.5px;
}

#slogan-line2 {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.typing-active {
  border-left: 3px solid var(--cyan);
  animation: blink-cursor 0.8s infinite;
}

@keyframes blink-cursor {
  0%,
  100% {
    border-color: transparent;
  }

  50% {
    border-color: var(--cyan);
  }
}

body.scrolled .slogan-container {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  pointer-events: none;
}

/* ==========================================
   DOCK MENU
   ========================================== */
.smarthome {
  --item-color: rgb(56, 189, 248); /* ترکیب پایه آبی */
  --item-rgb: 56, 189, 248;
}

/* اعمال یک حاشیه و هاله نوری تنفسی ترکیبی (آبی و زرد) برای کلید الکترو هوم */
.smarthome .dock-item {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.15), rgba(251, 191, 36, 0.1));
  border-color: rgba(56, 189, 248, 0.5);
  animation: blue-gold-breathing 3s infinite alternate ease-in-out;
}

/* ترکیب رنگ متن و آیکون */
.smarthome .dock-item span {
  color: #fff;
  text-shadow: -2px 0 8px rgba(56, 189, 248, 0.8), 2px 0 8px rgba(251, 191, 36, 0.8);
}

.smarthome .dock-item img.dock-icon-img {
  transform: scale(1.1); /* ۱۰ درصد بزرگ‌تر */
  filter: drop-shadow(-2px 0 6px rgba(56, 189, 248, 0.6)) drop-shadow(2px 0 6px rgba(251, 191, 36, 0.6));
}

/* متوقف کردن انیمیشن هنگام رفتن ماوس برای اجرای افکت پیش‌فرض هاور */
.dock-btn.smarthome:hover .dock-item {
  animation: none;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.25), rgba(251, 191, 36, 0.2));
  border-color: #fbbf24;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6), 
    inset 0 0 25px rgba(56, 189, 248, 0.5), 
    0 0 45px rgba(251, 191, 36, 0.7);
}

.dock-btn.smarthome:hover .dock-item img.dock-icon-img {
  transform: scale(1.26) translateY(-2px); /* هماهنگ کردن مقیاس بزرگ‌تر در هاور */
  filter: drop-shadow(-3px 0 10px rgba(56, 189, 248, 0.8)) drop-shadow(3px 0 10px rgba(251, 191, 36, 0.8));
}

@keyframes blue-gold-breathing {
  0% {
    box-shadow: -5px 5px 15px rgba(56, 189, 248, 0.15), 5px -5px 15px rgba(251, 191, 36, 0.15), inset 0 0 10px rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.5);
  }
  100% {
    box-shadow: -10px 10px 35px rgba(56, 189, 248, 0.6), 10px -10px 35px rgba(251, 191, 36, 0.6), inset 0 0 25px rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.9);
  }
}

/* کلاس‌های اختصاصی برای تغییر نرم و محو شونده لوگوی سیاه‌وسفید به رنگی */
.icon-crossfade {
  display: inline-grid;
  place-items: center;
}
.icon-crossfade .dock-icon-img {
  grid-area: 1 / 1;
  transition: transform 0.3s, filter 0.3s, opacity 0.4s ease !important;
}
.icon-crossfade .logo-hover {
  opacity: 0;
}
.dock-btn.smarthome:hover .icon-crossfade .logo-hover,
.dock-btn.smarthome:focus-visible .icon-crossfade .logo-hover {
  opacity: 1;
}
.dock-btn.smarthome:hover .icon-crossfade .logo-normal,
.dock-btn.smarthome:focus-visible .icon-crossfade .logo-normal {
  opacity: 0;
}

.shop {
  --item-color: rgb(var(--rgb-shop));
  --item-rgb: var(--rgb-shop);
}

.youtube {
  --item-color: rgb(var(--rgb-youtube));
  --item-rgb: var(--rgb-youtube);
}

.instagram {
  --item-color: rgb(var(--rgb-instagram));
  --item-rgb: var(--rgb-instagram);
}

.dock-menu {
  display: flex;
  list-style-type: none;
  padding: 32px 36px;
  border-radius: 28px;
  gap: 24px;
  background: rgba(8, 16, 36, 0.5);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  will-change: transform, opacity;
  transform: translateZ(0);
  border: 1px solid var(--border-cyan);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(var(--rgb-cyan), 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  align-items: center;
  justify-content: center;
  margin-top: clamp(80px, 18vh, 220px);
  position: relative;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* Animated glow ring around dock */
.dock-menu::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 29px;
  background: linear-gradient(
    135deg,
    rgba(79, 158, 255, 0.25) 0%,
    transparent 60%
  );
  opacity: 0.3;
  z-index: -1;
}

.dock-btn {
  width: 100px;
  height: 80px;
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
  outline: none;
  margin: 0;
}

.dock-item {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    background 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  transform-origin: bottom center;
  transform: translateY(calc(var(--lerp, 0) * -28px))
    scale(calc(1 + (var(--lerp, 0) * 0.06)));
  overflow: hidden;
  position: relative;
}

/* Shimmer sweep on hover */
.dock-item::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -60%;
  width: 40%;
  height: 300%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

.dock-btn:hover .dock-item::before {
  animation: shimmer-sweep 0.6s ease-in-out;
}

@keyframes shimmer-sweep {
  0% {
    left: -60%;
  }

  100% {
    left: 130%;
  }
}

.dock-item i {
  font-size: 1.65rem;
  color: #fff;
  transition:
    transform 0.3s,
    color 0.3s,
    text-shadow 0.3s;
}

.dock-item img.dock-icon-img {
  width: 28px;
  height: auto;
  transition:
    transform 0.3s,
    filter 0.3s;
  filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

.dock-item span {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition:
    opacity 0.3s,
    color 0.3s;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Dock hover physics */
:is(.dock-btn:hover, .dock-btn:focus-visible) {
  --lerp: var(--lerp-0);
  z-index: 5;
}

.dock-btn:has(+ :is(.dock-btn:hover, .dock-btn:focus-visible)),
:is(.dock-btn:hover, .dock-btn:focus-visible) + .dock-btn {
  --lerp: var(--lerp-1);
  z-index: 4;
}

.dock-btn:has(+ .dock-btn + :is(.dock-btn:hover, .dock-btn:focus-visible)),
:is(.dock-btn:hover, .dock-btn:focus-visible) + .dock-btn + .dock-btn {
  --lerp: var(--lerp-2);
  z-index: 3;
}

.dock-btn:hover .dock-item {
  background: rgba(var(--item-rgb), 0.18);
  border-color: var(--item-color);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 25px rgba(var(--item-rgb), 0.35),
    0 0 30px rgba(var(--item-rgb), 0.5);
}

.dock-btn:hover .dock-item i {
  color: var(--item-color);
  transform: scale(1.15) translateY(-2px);
  text-shadow:
    0 0 20px var(--item-color),
    0 0 40px var(--item-color);
}

.dock-btn:hover .dock-item img.dock-icon-img {
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 0 10px var(--item-color));
}

.dock-btn:hover .dock-item span {
  color: #fff;
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

body.scrolled .dock-menu {
  opacity: 0;
  transform: translateY(30px) scale(0.9) translateZ(0);
  pointer-events: none;
}

/* ==========================================
   SCROLL DOWN ARROW
   ========================================== */
.scroll-down-arrow {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  z-index: 20;
  animation: bounce-arrow 2.2s infinite;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-down-arrow:hover {
  color: rgba(79, 158, 255, 0.9);
  text-shadow: 0 0 15px var(--accent-glow);
  transform: translateX(-50%) scale(1.2);
}

@keyframes bounce-arrow {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-14px);
  }

  60% {
    transform: translateX(-50%) translateY(-7px);
  }
}

body.scrolled .scroll-down-arrow {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects-section {
  padding: 100px 5%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* Glass backdrop for projects section */
.projects-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.5);
  backdrop-filter: blur(4px);
  z-index: -1;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 60px;
  position: relative;
  background: linear-gradient(
    135deg,
    #fff 0%,
    var(--cyan) 50%,
    var(--violet-bright) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--accent);
  border-radius: 10px;
  opacity: 0.7;
}

/* 2-column grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* ==========================================
   PROJECT CARDS
   ========================================== */
.project-card {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border-medium);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 212, 255, 0.05);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(80px) scale(0.97);
  transition:
    opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

/* ==========================================
   FEATURED PROJECT (Electro Home)
   ========================================== */
.featured-project {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

.featured-project::before {
  background: linear-gradient(
    135deg,
    var(--gold) 0%,
    #fbbf24 50%,
    #d97706 100%
  );
  animation: border-rotate 3s linear infinite;
}

.featured-project.show-card:hover {
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(251, 191, 36, 0.2),
    0 0 80px rgba(251, 191, 36, 0.15);
}

.featured-project .card-content h3 {
  color: #fbbf24;
  font-size: 2rem;
  margin-bottom: 12px;
}

.featured-project.show-card:hover .card-content p {
  color: #fbbf24;
  font-size: 1rem;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.95rem;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card.show-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered entrance */
.project-card:nth-child(1) {
  transition-delay: 0.05s;
}

.project-card:nth-child(2) {
  transition-delay: 0.15s;
}

.project-card:nth-child(3) {
  transition-delay: 0.25s;
}

.project-card:nth-child(4) {
  transition-delay: 0.35s;
}

/* Gradient border animation on hover */
.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  background: linear-gradient(
    135deg,
    var(--cyan) 0%,
    var(--violet-bright) 50%,
    var(--gold) 100%
  );
  opacity: 0;
  z-index: 0;
  transition: opacity 0.4s ease;
  background-size: 200%;
  animation: border-rotate 3s linear infinite;
}

@keyframes border-rotate {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.project-card.show-card:hover::before {
  opacity: 0.6;
}

.project-card.show-card:hover {
  border-color: transparent;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(var(--rgb-cyan), 0.2),
    0 0 80px rgba(var(--rgb-violet), 0.1);
  transition-delay: 0s;
}

/* Project background image */
.project-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition:
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.5s ease;
  filter: brightness(0.95);
}

.project-card.show-card:hover .project-img {
  transform: scale(1.08);
  filter: brightness(0.7) saturate(1.2);
}

/* Overlay gradient */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(5, 8, 20, 0.97) 0%,
    rgba(5, 8, 20, 0.4) 45%,
    rgba(5, 8, 20, 0.05) 100%
  );
  z-index: 2;
  transition: background 0.5s ease;
}

.project-card.show-card:hover .card-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 70, 120, 0.92) 0%,
    rgba(0, 212, 255, 0.08) 50%,
    rgba(5, 8, 20, 0.05) 100%
  );
}

/* Card text content */
.card-content {
  padding: 25px 20px;
  z-index: 10;
  transform: translateZ(40px);
  transition: transform 0.4s ease;
  width: 100%;
  position: relative;
}

.card-content i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  transition: all 0.4s ease;
}

.card-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.card-content p {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.4s ease;
  letter-spacing: 1px;
  text-shadow: 0 0 15px var(--cyan-glow);
}

/* Arrow icon in "view" text */
.card-content p::after {
  content: " ←";
  opacity: 0.8;
}

.project-card.show-card:hover .card-content i {
  color: #fff;
  transform: scale(1.15) translateY(-5px);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.project-card.show-card:hover .card-content h3 {
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
}

.project-card.show-card:hover .card-content p {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   SITE FOOTER
   ========================================== */
.site-footer {
  background: rgba(5, 8, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 5% 24px;
  position: relative;
  z-index: 20;
  text-align: center;
  overflow: hidden;
}

/* Subtle top border */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(79, 158, 255, 0.4) 50%,
    transparent 100%
  );
}

/* Subtle glow orbs in footer bg */
.site-footer::after {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 120px;
  background: radial-gradient(
    ellipse,
    rgba(0, 212, 255, 0.04) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  padding-bottom: 10px;
}

/* Contact links */
.footer-right {
  display: flex;
  gap: 14px;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 1rem;
  background: var(--bg-glass-light);
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.footer-contact-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow:
    0 0 20px var(--cyan-glow),
    inset 0 0 20px rgba(var(--rgb-cyan), 0.05);
  transform: translateY(-4px);
}

.footer-contact-link i {
  font-size: 1.25rem;
}

/* Telegram-specific hover color */
.footer-contact-link:has(.fa-telegram):hover {
  color: rgb(var(--rgb-telegram));
  border-color: rgb(var(--rgb-telegram));
  background: rgba(var(--rgb-telegram), 0.1);
  box-shadow: 0 0 20px rgba(var(--rgb-telegram), 0.4);
}

/* Tech logos */
.footer-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tech-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.4;
  filter: grayscale(100%) brightness(1.2);
  transition: all 0.35s ease;
  user-select: none;
}

.tech-logo:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(1.1) drop-shadow(0 0 8px var(--cyan-glow));
  transform: scale(1.2) translateY(-4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  flex-wrap: wrap;
  gap: 15px;
}

.copyright {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.copyright span {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top-btn {
  background: var(--bg-glass-light);
  border: 1px solid var(--border-medium);
  color: rgba(255, 255, 255, 0.5);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.back-to-top-btn:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow:
    0 0 20px var(--cyan-glow),
    0 0 40px rgba(var(--rgb-cyan), 0.2);
  transform: translateY(-6px) scale(1.05);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .slogan-container {
    right: 3%;
    width: 350px;
  }

  #slogan-line1 {
    font-size: 1.75rem;
  }

  #slogan-line2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  #introVideo {
    width: 150%;
    height: auto;
  }

  .site-header {
    padding: 0 15px;
    height: 70px;
  }

  #main-logo.move-to-header {
    left: 15px;
    top: 12px;
    width: 42px;
  }

  #logo-placeholder {
    width: 42px;
    height: 46px;
  }

  .brand-text {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }

  .header-nav-links {
    gap: 8px;
  }

  .mini-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .slogan-container {
    right: 5%;
    top: 90px;
    width: auto;
    max-width: 85%;
  }

  #slogan-line1 {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  #slogan-line2 {
    font-size: 0.9rem;
  }

  .main-content {
    padding-top: 0;
  }

  .projects-section {
    padding: 80px 5%;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 40px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 500px;
  }

  .featured-project {
    grid-column: auto;
    aspect-ratio: 16 / 9;
  }
  .featured-project .card-content h3 {
    font-size: 1.5rem;
  }

  .scroll-down-arrow {
    font-size: 1.8rem;
    bottom: 60px;
  }

  .container {
    width: 100%;
    padding: 0 10px;
  }

  .dock-menu {
    flex-wrap: wrap;
    padding: 18px 14px;
    gap: 10px;
    margin-top: 120px;
    width: 100%;
    border-radius: 22px;
  }

  .dock-btn {
    width: calc(50% - 5px);
    height: 68px;
  }

  .dock-item {
    border-radius: 14px;
    gap: 5px;
    transform: none !important;
  }

  .dock-item i {
    font-size: 1.3rem;
  }

  .dock-item img.dock-icon-img {
    width: 22px;
  }

  .dock-item span {
    font-size: 0.75rem;
  }

  .footer-main {
    flex-direction: column;
    gap: 28px;
  }

  .footer-right {
    flex-direction: column;
    width: 100%;
  }

  .footer-contact-link {
    justify-content: center;
    width: 100%;
  }

  .footer-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
  }
}
