/* =============================================
   MODERN PORTFOLIO COMPONENTS
   Dark theme with animations and modern design
   ============================================= */

/* Custom Scrollbar - Pure Floating Thumb */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.5);
  border-radius: 4px;
  border: none;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 40px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.7);
  box-shadow: 
    0 4px 12px rgba(124, 58, 237, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(124, 58, 237, 0.9);
  transform: scale(1.1);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-button {
  display: none;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.5) transparent;
}

/* Base Body Styling */
body {
  font-family: var(--font-sans);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  overflow-x: hidden;
  position: relative;
}

/* Ensure scroll progress bars stay at top */
*[style*="position: fixed"][style*="top: 0"],
.scroll-progress {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

/* Container */
.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 1536px) {
  .container {
    max-width: var(--container-2xl);
  }
}

/* =============================================
   BACKGROUND ELEMENTS
   ============================================= */

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(5deg); }
  66% { transform: translateY(10px) rotate(-5deg); }
}

.grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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: 50px 50px;
  opacity: 0.5;
}

/* =============================================
   LEFT SIDEBAR NAVIGATION
   ============================================= */

.left-sidebar {
  position: fixed;
  top: 50%;
  left: var(--space-6);
  transform: translateY(-50%);
  width: auto;
  height: auto;
  background: rgba(15, 15, 23, 0.92);
  backdrop-filter: blur(24px);
  border: 2px solid rgba(124, 58, 237, 0.4);
  border-radius: 1.5rem;
  z-index: 1000;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.left-sidebar:hover {
  background: rgba(15, 15, 23, 0.97);
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 58, 237, 0.2);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
}

.sidebar-icon:hover {
  color: var(--color-text-primary);
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.5);
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(124, 58, 237, 0.2);
}

.sidebar-icon.active {
  color: white;
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.7);
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Tooltip effect */
.sidebar-icon::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1001;
}

.sidebar-icon:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px);
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-20) 0;
}

.hero-section .container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-content {
  max-width: 800px;
  text-align: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-online);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

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

.status-text {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.highlight-name {
  color: white;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.3);
  position: relative;
}

.hero-subtitle {
  display: block;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-display);
  margin-top: var(--space-4);
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: var(--transition-base);
  border: 1px solid transparent;
}

.action-btn.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-lg);
}

.action-btn.secondary {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border-color: var(--color-border-primary);
  backdrop-filter: blur(10px);
}

.action-btn.secondary:hover {
  background: var(--color-bg-tertiary);
  transform: translateY(-2px);
}

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

/* =============================================
   PROJECTS SECTION
   ============================================= */

.projects-section {
  min-height: 100vh;
  position: relative;
}

#projects {
  position: relative;
  scroll-snap-align: start;
  min-height: 100vh;
  padding: 0 2rem;
  box-sizing: border-box;
}

#projects .container {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
}



#projects > * {
  margin-top: 0;
  margin-bottom: 0;
}




.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  text-align: center;
  margin-bottom: var(--space-16);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.project-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-primary);
  transition: var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-border-accent);
}

.project-images {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.project-description {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tech-tag {
  background: rgba(124, 58, 237, 0.1);
  color: var(--color-primary-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* =============================================
   ABOUT SECTION
   ============================================= */

.about-section {
  padding: var(--space-24) 0;
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-12);
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-text {
  max-width: 600px;
}

.about-text p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-6);
}

.about-image {
  position: relative;
}

.profile-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-3xl);
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-glow);
}

/* =============================================
   CONTACT SECTION
   ============================================= */

.contact-section {
  padding: var(--space-24) 0;
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin: var(--space-6) 0 var(--space-8);
}

.contact-actions {
  display: flex;
  justify-content: center;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-xl);
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
  transition: var(--transition-base);
  box-shadow: var(--shadow-glow);
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-lg);
}

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

@media (max-width: 768px) {
  .left-sidebar {
    bottom: var(--space-6);
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .left-sidebar:hover {
    background: rgba(0, 0, 0, 0.9);
  }
  
  .sidebar-nav {
    flex-direction: row;
    justify-content: center;
    padding: var(--space-3);
    gap: var(--space-3);
  }
  
  .sidebar-icon {
    width: 40px;
    height: 40px;
  }
  
  /* Hide tooltips on mobile */
  .sidebar-icon::after {
    display: none;
  }
  
  .container {
    padding: 0 var(--space-4);
  }

  .hero-section {
    padding: var(--space-16) 0 calc(var(--space-16) + 100px);
  }
  
  .projects-section,
  .about-section,
  .contact-section {
    padding: var(--space-16) 0;
  }

  .section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-12);
  }

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

  .action-btn {
    flex: 1;
    justify-content: center;
    max-width: 200px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .profile-image {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-12);
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* =============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text-secondary: #ffffff;
    --color-border-primary: #ffffff;
}
}

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

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
  }
  
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  }
  
.slide-in-left {
  opacity: 0;
  animation: slideInFromLeft 0.8s ease-out forwards;
  }
  
.slide-in-right {
  opacity: 0;
  animation: slideInFromRight 0.8s ease-out forwards;
} 

html, body {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  height: 100%;
  overflow-x: hidden;
}

.main-content {
  min-height: 100vh;
}

section {
  scroll-snap-align: start;
  min-height: 100vh;
}

@media (max-width: 900px) {
  html, body {
    scroll-snap-type: none;
  }
} 

/* =============================================
   PROJECT MODAL
   ============================================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border-primary);
  max-width: 1248px;
  width: 98%;
  max-height: 100vh;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(20px);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-text-primary);
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-header {
  padding: var(--space-8) var(--space-8) var(--space-4);
  border-bottom: 1px solid var(--color-border-primary);
}

.modal-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8) var(--space-8);
  max-height: calc(95vh - 120px);
  overflow: hidden;
}

.modal-image-gallery {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.modal-main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: var(--transition-base);
}

.modal-image-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-4);
  pointer-events: none;
}

.modal-nav-btn {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  pointer-events: auto;
  font-size: 18px;
  font-weight: bold;
}

.modal-nav-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.modal-carousel-indicators {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 5;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(124, 58, 237, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(124, 58, 237, 0.5);
  padding: 0;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(4px);
}

.carousel-indicator.active {
  background: var(--gradient-primary);
  border-color: rgba(124, 58, 237, 0.8);
  transform: scale(1.3);
  box-shadow: 
    0 4px 16px rgba(124, 58, 237, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.2) inset,
    0 0 20px rgba(124, 58, 237, 0.3);
}

.carousel-indicator:hover {
  background: rgba(124, 58, 237, 0.6);
  border-color: rgba(124, 58, 237, 0.8);
  transform: scale(1.2);
  box-shadow: 
    0 4px 12px rgba(124, 58, 237, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.carousel-indicator:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modal-description {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
  font-size: var(--text-sm);
}

.modal-tech h3 {
  color: var(--color-text-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin: 0 0 var(--space-3) 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: auto;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: var(--transition-base);
  border: 1px solid transparent;
}

.modal-btn.primary {
  background: var(--gradient-primary);
  color: white;
}

.modal-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.modal-btn.secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-border-primary);
}

.modal-btn.secondary:hover {
  background: var(--color-bg-card);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .modal-content {
    width: 99%;
    max-height: 98vh;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6) var(--space-6);
  }
  
  .modal-main-image {
    height: 300px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-carousel-indicators {
    bottom: var(--space-3);
  }
  
  .carousel-indicator {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
  }
} 