/* 
   1:1 Replica of parthh.in Design System 
   Theme: High-End Minimalist Dark 
*/

:root {
  --bg-black: #000000;
  --bg-card: #0a0a0a;
  --border-dim: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --accent-purple: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --transition-smooth: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  --nav-height: 4.5rem;
  --section-px: 2rem;
  --section-py: 8rem;
  --container-width: 1250px;
  --cursor-size: 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Cursor */
.custom-cursor {
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: white;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.2s ease-out, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.custom-cursor.hovered {
  width: 60px;
  height: 60px;
  background: var(--accent-purple);
  mix-blend-mode: normal;
  opacity: 0.15;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, var(--accent-purple), #c084fc);
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Noise Overlay for Texture */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9998;
}

/* Light mode variables */
.light-mode {
  --bg-black: #f7f7fa;
  --bg-card: #fff;
  --border-dim: rgba(0, 0, 0, 0.08);
  --text-main: #18181b;
  --text-muted: #52525b;
  --accent-purple: #7c3aed;
  --accent-glow: rgba(124, 58, 237, 0.10);
}

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

body {
  background-color: var(--bg-black);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--section-px);
  width: 100%;
}

/* --- Navigation & Header --- */
header {
  position: fixed;
  top: 1.5rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  top: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-dim);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

.logo-ps {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.logo-dot {
  color: var(--accent-purple);
  font-size: 2.2rem;
  line-height: 0;
  text-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
}

.logo-ps:hover {
  color: var(--accent-purple);
}

.nav-pill {
  background: rgba(15, 15, 15, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-dim);
  padding: 0.5rem 0.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-pill a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  transition: var(--transition-smooth);
}

.nav-pill a:hover,
.nav-pill a.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Ensure touch targets are accessible (min 44px for nav/buttons on mobile) */
@media (max-width: 480px) {
  .nav-pill a {
    padding: 0.75rem 1rem !important;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .cv-btn, .book-call-btn, .social-card {
    min-height: 44px;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.youtube-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-nav:hover {
  color: #fff;
}

.book-call-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.book-call-btn:hover {
  border-color: var(--text-main);
  background: #111;
}

/* --- Hero Section Enhanced --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: glowPulse 8s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.1) translate(-50px, 50px);
    opacity: 0.8;
  }
}

.hero-container-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
  min-height: 80vh;
}

/* --- About Section Specifics --- */
.about-grid {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.about-text {
  flex: 1.2;
}

.about-image {
  flex: 0.8;
}

.image-rounded {
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid var(--border-dim);
}

.image-rounded img {
  width: 100%;
  display: block;
}

/* --- Responsive Rules --- */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .hero-container-layout {
    gap: 2rem;
  }

  .project-block {
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 8rem;
  }

  .project-content h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-container-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding-top: 6rem;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-visual {
    height: 12rem;
  }

  .container,
  .nav-container {
    padding: 0 1.25rem;
  }

  :root {
    --section-px: 1.25rem;
    --section-py: 4rem;
  }

  .nav-actions {
    display: none;
  }

  .about-section .container {
    flex-direction: column !important;
    text-align: center;
    gap: 3rem !important;
  }

  .project-block,
  .project-block[style*="direction: rtl"] {
    display: flex;
    flex-direction: column !important;
    direction: ltr !important;
    gap: 2.5rem;
    margin-bottom: 6rem;
  }

  .project-content {
    direction: ltr !important;
    text-align: left;
  }

  .project-content h2 {
    font-size: 2rem;
  }

  .mobile-img {
    width: 140px;
  }

  .feature-list {
    margin-bottom: 2rem;
  }

  .experience-section .container>div {
    grid-template-columns: 1fr !important;
    gap: 4rem !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .mobile-img {
    width: 110px;
  }

  .nav-pill {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .nav-pill a {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }

  :root {
    --section-py: 3rem;
  }

  .project-content h2 {
    font-size: 1.8rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 100%;
}

.hero-btns {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 2.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.highlight {
  color: var(--accent-purple);
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}


/* Download CV Button (now the only hero button) */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent-purple);
  background: rgba(139, 92, 246, 0.10);
  color: var(--accent-purple);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 0 18px 0 var(--accent-glow);
  cursor: pointer;
  gap: 0.5rem;
  outline: none;
  position: relative;
  z-index: 1;
}

.cv-btn:hover,
.cv-btn:focus {
  background: rgba(139, 92, 246, 0.18);
  color: #fff;
  border-color: var(--accent-purple);
  box-shadow: 0 0 32px 0 var(--accent-glow);
  transform: translateY(-2px) scale(1.03);
}

.cv-btn:active {
  transform: scale(0.98);
}

/* Dark/Light Mode Toggle Button */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent-purple);
  background: var(--bg-card);
  color: var(--accent-purple);
  font-size: 1.35rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-left: 1rem;
  box-shadow: 0 0 10px var(--accent-glow);
}

.mode-toggle:hover,
.mode-toggle:focus {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

/* Hero Section Buttons */


/* Enhanced CV Button */

.cv-btn {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.cv-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-purple);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

/* Floating Shapes */
.hero-visual {
  position: relative;
  height: 400px;
}

.floating-shape {
  position: absolute;
  border-radius: 30%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(139, 92, 246, 0.05);
  backdrop-filter: blur(10px);
  z-index: -1;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  right: 20%;
  animation: drift 15s infinite alternate ease-in-out;
}

.shape-2 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  right: 40%;
  animation: drift 20s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-40px) rotate(15deg);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-dim);
  border-radius: 12px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent-purple);
  border-radius: 2px;
  animation: scrollMouse 2s infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes scrollMouse {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 15px);
    opacity: 0;
  }
}

/* --- Work / Project Section --- */
.work-section {
  padding: var(--section-py) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 8rem;
}

.section-tag {
  color: var(--accent-purple);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  display: inline-block;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.section-header h2 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}


.project-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  margin-bottom: 12rem;
  align-items: center;
}

.project-content h2 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-content .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 3rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.feature-list .plus {
  color: var(--accent-purple);
  font-size: 1.4rem;
  font-weight: 400;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.tech-pill img {
  width: 16px;
  height: 16px;
  filter: grayscale(1) invert(1);
  opacity: 0.7;
}

.tech-pill:hover {
  border-color: var(--accent-purple);
  color: var(--text-main);
}

/* --- Project Visuals --- */
.project-images {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.main-image {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border-dim);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.mobile-images {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 2;
}

.mobile-img {
  width: 180px;
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.glow-bg {
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* --- About Section (Simple) --- */
.about-section {
  padding: var(--section-py) 0;
  text-align: left;
}

.about-section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2rem;
}

.skills-group {
  display: flex;
  flex-direction: column;
}

.skill-card {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 500;
  opacity: 0.8;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 1.25rem;
}

.skill-card::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-purple);
  font-weight: bold;
}

.skill-card:hover {
  opacity: 1;
  transform: translateX(5px);
  color: var(--accent-purple);
}

/* --- Contact Section --- */
.contact-section {
  padding: var(--section-py) 0;
  text-align: center;
}

/* --- Social Grid & Cards --- */
.social-grid {
  margin-top: 6rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(8px);
}

.social-card svg {
  transition: transform 0.3s ease;
}

.social-card:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.social-card:hover svg {
  transform: scale(1.1);
}

/* Specific Brand Colors on Hover */
#github-link:hover {
  border-color: #f0f6fc;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#linkedin-link:hover {
  border-color: #0077b5;
  color: #0077b5;
  box-shadow: 0 0 20px rgba(0, 119, 181, 0.2);
}

#discord-link:hover {
  border-color: #5865f2;
  color: #5865f2;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.2);
}

#email-link:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

#youtube-link:hover {
  border-color: #ff0000;
  color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

/* Light Mode Social Cards */
.light-mode .social-card {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-muted);
}

.light-mode .social-card:hover {
  background: rgba(0, 0, 0, 0.05);
}

.contact-section h2 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .project-block {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .mobile-images {
    position: static;
    flex-direction: row;
    transform: none;
    margin-top: 1.5rem;
    justify-content: center;
  }
}

/* --- Slideshow --- */
.slideshow {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  z-index: 1;
}

.slideshow-track {
  position: relative;
  width: 100%;
}

.slide {
  display: none;
  animation: slideFadeIn 0.5s ease forwards;
}

.slide.active {
  display: block;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  font-size: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s;
  z-index: 10;
}

.slideshow:hover .slide-btn {
  opacity: 1;
}

.slide-prev {
  left: 0.75rem;
}

.slide-next {
  right: 0.75rem;
}

.slide-btn:hover {
  background: rgba(139, 92, 246, 0.5);
  border-color: var(--accent-purple);
}

.slide-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: var(--accent-purple);
  transform: scale(1.3);
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  transition-delay: 0.1s;
}

.reveal-stagger:nth-child(2) {
  transition-delay: 0.2s;
}

.reveal-stagger:nth-child(3) {
  transition-delay: 0.3s;
}

.reveal-stagger:nth-child(4) {
  transition-delay: 0.4s;
}

/* --- Usability Enhancements --- */

/* Focus Styles for Keyboard Accessibility */
:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 4px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: #fff;
}