/* ==================== MODERN ENHANCEMENTS ==================== */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* ==================== HEADER ENHANCEMENTS ==================== */

#header h1 {
  font-family: 'Inter', 'Inconsolata', monospace;
  font-size: 3.5em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  margin-bottom: 0.5em;
}

.header-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  margin: 1em 0 1.5em;
}

.tag {
  display: inline-block;
  padding: 0.4em 1em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: all 0.3s var(--transition-smooth);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.welcome-text {
  font-size: 1.1em;
  font-weight: 300;
  opacity: 0.9;
}

.scroll-indicator {
  position: absolute;
  bottom: 2em;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce-slow 2s ease-in-out infinite;
  font-size: 1.5em;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

.logo img {
  width: 120px;
  height: auto;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(100, 181, 246, 0.3));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==================== EMOJI ANIMATIONS ==================== */

.emoji-wave {
  display: inline-block;
  animation: wave 1.5s ease-in-out infinite;
}

.emoji-grow {
  display: inline-block;
  animation: grow 2s ease-in-out infinite;
}

.emoji-rotate {
  display: inline-block;
  animation: rotate-subtle 3s ease-in-out infinite;
}

.emoji-sparkle {
  display: inline-block;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-20deg); }
}

@keyframes grow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes rotate-subtle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(10deg); }
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(5deg); }
  50% { transform: scale(1.2) rotate(0deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
}

/* ==================== SECTION HEADERS ==================== */

#intro h2,
#first h2,
#second h2,
#achievements h2,
#cta h2 {
  font-family: 'Inter', 'Proxima Nova', monospace;
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#footer h2 {
  font-family: 'Inter', 'Inconsolata', monospace;
  font-size: 1.5em;
  font-weight: 600;
}

/* ==================== PROFILE IMAGE ==================== */

.profile-image {
  width: 200px !important;
  height: auto !important;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(100, 181, 246, 0.3);
  transition: all 0.4s var(--transition-smooth);
}

.profile-image:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 12px 48px rgba(100, 181, 246, 0.5);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse {
  animation: pulse 1s ease-out;
}

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

#first.main.special {
  position: relative;
  overflow: hidden;
}

#projects-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 600px;
  background: var(--glass-bg);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

#projects-wrapper {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

/* ==================== ENHANCED PROJECT CARDS ==================== */

.project {
  display: none;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.6s var(--transition-smooth);
  padding: 0;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.project:hover::before {
  left: 100%;
}

.project.active {
  display: flex;
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: slideIn 0.6s var(--transition-smooth);
  flex-direction: row;
  min-height: 500px;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== PROJECT CONTENT LAYOUT ==================== */

.project-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-media {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.05), rgba(100, 181, 246, 0.02));
  border-left: 1px solid var(--glass-border);
}

/* ==================== PROJECT HEADER ==================== */

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--glass-border);
}

.project-badge {
  display: inline-block;
  padding: 0.4em 1em;
  background: var(--primary-gradient);
  color: white;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

/* ==================== PROJECT ICON ==================== */

.project .icon {
  margin: 0;
  padding: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 181, 246, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(100, 181, 246, 0.3);
  transition: all 0.4s var(--transition-smooth);
  width: 80px;
  height: 80px;
  font-size: 2em;
}

.project .icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(100, 181, 246, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

.project:hover .icon {
  transform: scale(1.1) rotate(5deg);
  border-color: rgba(100, 181, 246, 0.6);
  box-shadow: 0 8px 24px rgba(100, 181, 246, 0.4);
}

.project:hover .icon::after {
  width: 150%;
  height: 150%;
}

/* ==================== PROJECT TITLE ==================== */

.project h3 {
    font-family: 'Inter', 'Proxima Nova', monospace;
    font-size: 1.8em;
    font-weight: 700;
    margin: 1em 0 1.5em;
    color: #0ab7bd;
}

/* ==================== ENHANCED PROJECT DETAILS ==================== */

.project-details {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin-bottom: 2em;
  flex: 1;
}

.detail-section {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5em;
  border-radius: 12px;
  border-left: 3px solid rgba(100, 181, 246, 0.5);
  transition: all 0.3s var(--transition-smooth);
  margin-bottom: 0;
}

.detail-section:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(100, 181, 246, 0.8);
  transform: translateX(5px);
}

.detail-section strong {
  color: #64b5f6;
  font-weight: 600;
  font-size: 1.1em;
  display: inline-block;
  margin-bottom: 0.8em;
  text-shadow: 0 0 10px rgba(100, 181, 246, 0.3);
}

.detail-section p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1em;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ==================== TECH STACK ==================== */

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 0.5em;
}

.tech-tag {
  display: inline-block;
  padding: 0.4em 0.9em;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 16px;
  font-size: 0.85em;
  color: #64b5f6;
  font-weight: 500;
  transition: all 0.3s var(--transition-smooth);
}

.tech-tag:hover {
  background: rgba(100, 181, 246, 0.2);
  border-color: rgba(100, 181, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

/* ==================== PROJECT LINKS ==================== */

.project-links {
  display: flex;
  gap: 1em;
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--glass-border);
}

.project-links .button {
  flex: 1;
  text-align: center;
  padding: 0.8em 1.5em;
  font-size: 0.9em;
}

/* ==================== ENHANCED PROJECT MEDIA ==================== */

.project-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  position: relative;
}

.media-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-image {
  max-width: 100% !important;
  max-height: 350px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 12px;
  transition: all 0.4s var(--transition-smooth);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
}

.project-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

/* ==================== PROJECT CONTROLS ==================== */

.project-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  margin-top: 3em;
  position: relative;
  z-index: 10;
}

.nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(100, 181, 246, 0.4);
  background: var(--glass-bg);
  color: #64b5f6;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition-smooth);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.3), transparent);
  transition: left 0.5s ease;
}

.nav-btn:hover {
  transform: scale(1.1);
  border-color: rgba(100, 181, 246, 0.8);
  background: rgba(100, 181, 246, 0.15);
  box-shadow: 0 8px 32px rgba(100, 181, 246, 0.4);
}

.nav-btn:hover::before {
  left: 100%;
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(0.9);
}

.nav-btn:disabled:hover {
  border-color: rgba(100, 181, 246, 0.4);
  background: var(--glass-bg);
  box-shadow: none;
  transform: scale(0.9);
}

/* ==================== PROJECT INDICATORS ==================== */

.project-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  border: 2px solid transparent;
  position: relative;
}

.indicator-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(100, 181, 246, 0.3);
  transition: all 0.3s ease;
}

.indicator-dot:hover {
  transform: scale(1.3);
  background: rgba(100, 181, 246, 0.6);
}

.indicator-dot:hover::after {
  width: 200%;
  height: 200%;
}

.indicator-dot.active {
  background: #64b5f6;
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(100, 181, 246, 0.6);
}

/* ==================== KEYBOARD HINT ==================== */

.keyboard-hint {
  text-align: center;
  margin-top: 2em;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Inconsolata', monospace;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#projects-container:hover .keyboard-hint {
  opacity: 1;
}

.keyboard-hint i {
  margin-right: 0.5em;
  color: rgba(100, 181, 246, 0.6);
}

/* ==================== ENHANCED SKILLS SECTION ==================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
  margin: 3em 0;
}

.skill-category {
  background: var(--glass-bg);
  border-radius: 16px;
  padding: 2em;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: all 0.3s var(--transition-smooth);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(100, 181, 246, 0.3);
}

.skill-category h3 {
  color: #64b5f6;
  font-size: 1.3em;
  margin-bottom: 1.5em;
  text-align: center;
  font-weight: 600;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-level {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: width 1.5s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

/* ==================== ACHIEVEMENTS SECTION ==================== */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2em;
  margin: 3em 0;
}

.achievement-card {
  background: var(--glass-bg);
  border-radius: 16px;
  padding: 2em;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.achievement-card:hover::before {
  transform: scaleX(1);
}

.achievement-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1em;
  background: rgba(100, 181, 246, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #64b5f6;
  border: 2px solid rgba(100, 181, 246, 0.3);
}

.achievement-card h3 {
  color: #ffffff;
  font-size: 1.3em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.achievement-card p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1em;
  line-height: 1.6;
}

.achievement-meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85em;
  font-style: italic;
}

/* ==================== BUTTONS ==================== */

.button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--transition-smooth);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 12px;
}

.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.button:hover::before {
  width: 300%;
  height: 300%;
}

.button.primary {
  background: var(--primary-gradient);
  box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

.button.primary:hover {
  box-shadow: 0 8px 25px rgba(100, 181, 246, 0.5);
  transform: translateY(-2px);
}

.button.large {
  padding: 0 2em;
  min-width: 12em;
}

/* ==================== FOOTER ICONS ==================== */

.icons {
  display: flex;
  gap: 1em;
  list-style: none;
  padding: 0;
}

.icons li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.3s var(--transition-smooth);
  font-size: 1.2em;
}

.icons li a:hover {
  background: rgba(100, 181, 246, 0.2);
  border-color: rgba(100, 181, 246, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(100, 181, 246, 0.3);
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media screen and (max-width: 1024px) {
  .project.active {
    flex-direction: column;
    min-height: auto;
  }
  
  .project-media {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    min-height: 300px;
  }
  
  .project-image {
    max-height: 250px !important;
  }
}

@media screen and (max-width: 768px) {
  #header h1 {
    font-size: 2.5em;
  }

  .header-subtitle {
    gap: 0.4em;
  }

  .tag {
    font-size: 0.75em;
    padding: 0.3em 0.8em;
  }

  .logo img {
    width: 90px;
  }

  .profile-image {
    width: 150px !important;
  }

  #projects-container {
    padding: 30px 15px;
  }

  .project-content {
    padding: 30px 20px;
  }

  .project h3 {
    font-size: 1.5em;
  }

  .project .icon {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
  }

  .nav-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .project-controls {
    gap: 1.5em;
    margin-top: 2em;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }
}

@media screen and (max-width: 480px) {
  #header h1 {
    font-size: 2em;
  }

  .header-subtitle {
    flex-direction: column;
    align-items: center;
  }

  .logo img {
    width: 80px;
  }

  .profile-image {
    width: 120px !important;
  }

  .project h3 {
    font-size: 1.3em;
  }

  .detail-section {
    padding: 1.2em;
  }
  
  .detail-section strong {
    font-size: 1em;
  }
  
  .detail-section p {
    font-size: 0.95em;
  }

  .project-media {
    min-height: 200px;
  }

  .project-image {
    max-height: 180px !important;
  }

  .nav-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .project-controls {
    gap: 1em;
  }

  .indicator-dot {
    width: 10px;
    height: 10px;
  }

  .project-links {
    flex-direction: column;
  }
}

/* ==================== SMOOTH SCROLLING ==================== */

html {
  scroll-behavior: smooth;
}

/* ==================== LOADING STATES ==================== */

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 2s infinite;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .nav-btn,
  .keyboard-hint,
  .scroll-indicator {
    display: none;
  }
}