/*
  © 2025 Milos Saric. All rights reserved.
  Modern Index Page Styles - Fixed Carousel
*/

/* ====================== */
/* LIGHT MODE VARIABLES   */
/* ====================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #0a0a0a;
  --text-secondary: #6c757d;
  --text-tertiary: #adb5bd;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --glow-color: rgba(59, 130, 246, 0.3);
  
  --email-color: #0066cc;
  --linkedin-color: #0077b5;
  --github-color: #333333;
  --youtube-color: #ff0000;
}

/* ====================== */
/* DARK MODE VARIABLES    */
/* ====================== */
.dark-mode {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #6c6c6c;
  --accent-primary: #60a5fa;
  --accent-secondary: #a78bfa;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glow-color: rgba(96, 165, 250, 0.4);
  
  --email-color: #3399ff;
  --linkedin-color: #0a66c2;
  --github-color: #f0f0f0;
  --youtube-color: #ff3333;
}

/* ====================== */
/* HERO SECTION           */
/* ====================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  position: relative;
  z-index: 2;
}

/* ====================== */
/* HERO MAIN              */
/* ====================== */
.hero-main {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 4rem;
  align-items: center;
}

/* ====================== */
/* PROFILE SECTION        */
/* ====================== */
.profile-section {
  display: flex;
  justify-content: center;
}

.profile-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  transition: all 0.5s ease;
  box-shadow: var(--shadow-lg);
  animation: fadeInScale 0.8s ease;
}

.profile-wrapper:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.profile-image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  z-index: 2;
  display: block;
}

/* ====================== */
/* CONTENT SECTION        */
/* ====================== */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.content-section h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
}

.content-section h1 .subtitle {
  display: block;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  background: none;
  -webkit-text-fill-color: var(--text-secondary);
}

.description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ====================== */
/* STATS ROW              */
/* ====================== */
.stats-row {
  display: flex;
  gap: 3rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.stat-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
  transform: scale(1.1);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* ====================== */
/* CONTACT LINKS GRID     */
/* ====================== */
.contact-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.contact-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.contact-link:hover::before {
  transform: scaleX(1);
}

.link-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.link-icon svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.link-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.link-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Individual Link Styles */
.email-link:hover .link-icon {
  background: var(--email-color);
  color: white;
  transform: scale(1.1);
}

.linkedin-link:hover .link-icon {
  background: var(--linkedin-color);
  color: white;
  transform: scale(1.1);
}

.github-link:hover .link-icon {
  background: var(--github-color);
  color: white;
  transform: scale(1.1) rotate(360deg);
}

.youtube-link:hover .link-icon {
  background: var(--youtube-color);
  color: white;
  transform: scale(1.1);
}

/* ====================== */
/* PROJECTS SECTION       */
/* ====================== */
.projects-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ====================== */
/* PROJECTS CAROUSEL      */
/* ====================== */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
}

.projects-carousel {
  display: flex;
  gap: 2rem;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.project-card {
  flex: 0 0 calc(33.333% - 1.35rem);
  min-width: 0;
  cursor: pointer;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 80px rgba(59, 130, 246, 0.3);
  border-color: var(--accent-primary);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.4s ease;
  border-radius: 24px;
}

.project-card:hover::before {
  opacity: 0.08;
}

.project-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(139, 92, 246, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2;
}

.project-overlay i {
  font-size: 3rem;
  color: white;
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.project-card:hover .project-overlay i {
  transform: translateX(12px);
}

.project-info {
  padding: 2rem;
  position: relative;
  z-index: 3;
  background: var(--bg-secondary);
}

.project-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  transition: all 0.3s ease;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-card:hover .project-info h3 {
  transform: translateX(8px);
}

.project-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-tags span {
  padding: 0.5rem 1.25rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card:hover .project-tags span {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-4px) scale(1.05);
}

.project-tags span:nth-child(1) { transition-delay: 0s; }
.project-tags span:nth-child(2) { transition-delay: 0.05s; }
.project-tags span:nth-child(3) { transition-delay: 0.1s; }

/* ====================== */
/* CAROUSEL DOTS          */
/* ====================== */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot:hover {
  background: var(--text-secondary);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--accent-gradient);
  width: 32px;
  border-radius: 5px;
}

/* ====================== */
/* BACKGROUND EFFECTS     */
/* ====================== */
.bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: float linear infinite;
  opacity: 0.3;
}

/* ====================== */
/* ANIMATIONS             */
/* ====================== */
@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% {
    transform: translateY(-100vh) translateX(150px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ====================== */
/* RESPONSIVE DESIGN      */
/* ====================== */
@media (max-width: 1200px) {
  .hero-main {
    grid-template-columns: 350px 1fr;
    gap: 3rem;
  }

  .profile-wrapper {
    max-width: 350px;
  }

  .project-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 1024px) {
  .hero-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-section {
    display: none;
  }

  .content-section {
    animation: fadeInUp 0.8s ease 0.2s both;
    text-align: center;
  }

  .stats-row {
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .contact-links-grid {
    max-width: 600px;
    margin: 0 auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 1rem;
    min-height: auto;
    padding-top: 6rem;
  }

  .hero-container {
    gap: 2rem;
  }

  .content-section h1 {
    font-size: 2rem;
  }

  .content-section h1 .subtitle {
    font-size: 1rem;
    margin-top: 0.25rem;
  }

  .description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1rem 0;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .contact-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .contact-link {
    padding: 1rem;
  }

  .link-value {
    font-size: 0.85rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .project-nav {
    gap: 0.25rem;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
  }

  .project-card {
    flex: 0 0 100%;
  }

  .project-info {
    padding: 1.5rem;
  }

  .project-info h3 {
    font-size: 1.25rem;
  }

  .project-info p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 0.75rem;
    padding-top: 5rem;
  }

  .hero-container {
    gap: 1.5rem;
  }

  .content-section {
    gap: 1.5rem;
  }

  .content-section h1 {
    font-size: 1.75rem;
  }

  .content-section h1 .subtitle {
    font-size: 0.9rem;
  }

  .description {
    font-size: 0.85rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
  }

  .stat-item {
    text-align: center;
  }

  .stat-item::before {
    display: none;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }

  .contact-link {
    padding: 0.875rem;
  }

  .link-icon {
    width: 40px;
    height: 40px;
  }

  .link-icon svg {
    width: 20px;
    height: 20px;
  }

  .link-label {
    font-size: 0.65rem;
  }

  .link-value {
    font-size: 0.8rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 1.35rem;
  }

  .project-info {
    padding: 1.25rem;
  }

  .project-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .project-info p {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .project-tags span {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  .content-section h1 {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
  }
}