/* ===================================
   Modern Portfolio CSS
   Author: Mustafa Çetin
   =================================== */

/* ===================================
   ROOT VARIABLES & RESET
   =================================== */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --accent: #f59e0b;
  
  /* Backgrounds */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1420;
  --bg-card: #1a1f35;
  --bg-card-hover: #20253d;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #f3f4f6;
  --text-muted: #d1d5db;
  --text-dark: #9ca3af;
  
  /* Borders */
  --border-color: #252b45;
  --border-light: #2d3550;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Spacing */
  --section-padding: 100px 0;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================================
   GLOBAL STYLES
   =================================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: white;
}

/* ===================================
   NAVBAR
   =================================== */
header {
  flex-shrink: 0;
}

#navbar {
  background-color: rgba(15, 20, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary) !important;
  transition: var(--transition);
}

.navbar-brand:hover {
  color: var(--primary-light) !important;
  transform: translateY(-2px);
}

.brand-logo {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.navbar-nav {
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link i {
  opacity: 0.7;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background-color: rgba(99, 102, 241, 0.1);
}

.nav-link:hover i {
  opacity: 1;
  transform: translateY(-2px);
}

.navbar-toggler {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
  min-height: 100vh;
  position: relative;
  background: 
    linear-gradient(135deg, rgba(15, 20, 32, 0.95) 0%, rgba(26, 31, 53, 0.95) 100%),
    url('/assets/images/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  padding: 120px 0 80px;
  overflow: hidden;
  z-index: 1;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 500;
  animation: pulse 2s infinite;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: blink 2s infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
  background-size: 200% auto;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--text-secondary);
  min-height: 60px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: bounce 2s infinite;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 15px;
  position: relative;
}

.mouse::before {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

/* ===================================
   SECTIONS
   =================================== */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

section {
  position: relative;
  z-index: 2;
}

section#main {
  z-index: 1;
}

.section-padding {
  padding: var(--section-padding);
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-title-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 12px;
  color: white;
  font-size: 1.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ===================================
   MODERN CARDS
   =================================== */
.modern-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.modern-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  background: var(--bg-card-hover);
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.modern-card-body h3 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ===================================
   SKILLS
   =================================== */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.skill-badge:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.skill-badge i {
  font-size: 1.1rem;
  color: var(--primary-light);
}

/* ===================================
   PROJECT CARDS
   =================================== */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.project-card-header {
  padding: 2rem 2rem 1rem;
  position: relative;
}

.project-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-icon-alt {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  padding: 0.4rem 0.9rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 500;
}

.project-card-body {
  padding: 0 2rem 1rem;
  flex-grow: 1;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.project-card-footer {
  padding: 1rem 2rem 2rem;
  margin-top: auto;
}

.btn-project {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn-project:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateX(5px);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.contact-card-body {
  position: relative;
}

.contact-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
  color: white;
  box-shadow: var(--shadow-glow);
}

.contact-item h3 {
  color: var(--text-primary);
  font-weight: 700;
}

.contact-method {
  padding: 1.5rem;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-method:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  transform: translateY(-5px);
}

.contact-method i {
  color: var(--primary-light);
}

.contact-method h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.contact-method a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-method a:hover {
  color: var(--primary-light);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: white;
}

.btn-outline-light {
  background: transparent;
  border: 2px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
  position: relative;
  flex-shrink: 0;
  width: 100%;
}

.footer-brand {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-text {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.footer-heading {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary-light);
  font-size: 1.25rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-divider {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
  opacity: 0.3;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-light);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .hero-section {
    min-height: 90vh;
    padding: 100px 0 60px;
    background-attachment: scroll;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn-lg {
    width: 100%;
    justify-content: center;
  }
  
  .modern-card {
    padding: 1.5rem;
  }
  
  .contact-card {
    padding: 2rem 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
    flex-direction: column;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .skill-badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .project-card-header,
  .project-card-body,
  .project-card-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ===================================
   UTILITIES
   =================================== */
.text-gradient {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blur-load {
  filter: blur(10px);
  transition: filter 0.3s;
}

.blur-load.loaded {
  filter: blur(0);
}

/* Ensure content is visible by default */
.modern-card,
.project-card,
.contact-card,
.section-title,
.section-subtitle {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Visible class for intersection observer */
.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Override Bootstrap text-muted to be more readable */
.text-muted {
  color: var(--text-secondary) !important;
}

/* For smaller/less important text */
.text-muted.small {
  color: var(--text-muted) !important;
}

/* Ensure all paragraphs are readable */
p {
  color: var(--text-secondary);
}

/* Card body paragraphs */
.modern-card-body p,
.contact-card-body p,
.project-card-body p {
  color: var(--text-secondary);
}

/* Error page description */
.error-description {
  color: var(--text-secondary) !important;
}

/* Icon gradient for section headers */
.icon-gradient {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
}

/* Link gradient for emails and important links */
.link-gradient {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: underline;
  text-decoration-color: var(--primary-light);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.link-gradient:hover {
  text-decoration-thickness: 2px;
  opacity: 0.8;
}
