/* Professional Portfolio Styles */

/* Global Settings */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', sans-serif;
  letter-spacing: -0.003em;
  background-color: #000000;
  color: #ffffff;
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Text Animation */
.hero-text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Code Project Cards - Dark Gray Theme */
.code-card {
  padding: 1.75rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.code-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.4s;
  opacity: 0;
}

.code-card:hover::before {
  opacity: 1;
  transform: translate(-20px, 20px);
}

.code-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(135deg, #222222 0%, #1a1a1a 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.code-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.code-card p {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.tech-badge {
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.code-card:hover .tech-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* Modal */
.modal.active {
  display: flex;
}

/* Gallery Grid - Horizontal Rows (123, 456, 789) */
.masonry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.masonry-item {
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 12px;
  overflow: hidden;
}

.masonry-item:hover {
  opacity: 0.85;
  transform: translateY(-4px);
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox Thumbnails */
#thumbnailStrip {
  scrollbar-width: none;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 640px) {
  #thumbnailStrip {
    justify-content: flex-start;
  }
}

#thumbnailStrip::-webkit-scrollbar {
  display: none;
}

.thumbnail {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.2s;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.thumbnail:hover {
  opacity: 0.7;
}

.thumbnail.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.5);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #000000;
}

::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Animated Gradients */
@keyframes float-gradient {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.08;
  }

  50% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.12;
  }
}

@keyframes float-gradient-slow {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.06;
  }

  50% {
    transform: translate(-40px, 40px) scale(1.15);
    opacity: 0.10;
  }
}

.animate-gradient {
  animation: float-gradient 15s ease-in-out infinite;
}

.animate-gradient-slow {
  animation: float-gradient-slow 20s ease-in-out infinite;
}

/* Parallax Effect - GPU Accelerated */
.parallax-item {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}