/* ===================================
   PROJEKTID.CSS - Kaasaegne kujundus
   =================================== */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(20, 20, 20, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  --accent-primary: #00ff88;
  --accent-secondary: #0070f3;
  --accent-tertiary: #8b5cf6;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 40px rgba(0, 255, 136, 0.3);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Body styling */
body.dark-theme {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated background */
body.dark-theme::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(0, 112, 243, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  animation: backgroundMove 30s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes backgroundMove {
  0%, 100% { transform: scale(1) rotate(0deg); }
  33% { transform: scale(1.1) rotate(120deg); }
  66% { transform: scale(0.9) rotate(240deg); }
}

/* Modern Navbar */
.navbar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 15px 30px;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: calc(100vw - 40px);
}

.navbar:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 255, 255, 0.15);
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-links li a::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;
}

.nav-links li a:hover::before {
  left: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text-primary);
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* Language buttons */
#language-buttons {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  z-index: 1001;
}

#language-buttons button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#language-buttons button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

#language-buttons img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 10rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, 
    rgba(139, 92, 246, 0.1) 0%, 
    transparent 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
  animation: rotate 25s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-section h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, 
    var(--accent-primary) 0%, 
    var(--accent-secondary) 50%, 
    var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: titleGlow 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes titleGlow {
  0%, 100% { 
    filter: brightness(1) drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
  }
  50% { 
    filter: brightness(1.2) drop-shadow(0 0 40px rgba(0, 112, 243, 0.8));
  }
}

.intro {
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
  position: relative;
  z-index: 1;
}

/* Project Section */
.project-section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Button Group - Modern Pills */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 3rem 0;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-glass);
  position: relative;
  overflow: hidden;
}

.button-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--accent-tertiary), 
    var(--accent-primary), 
    var(--accent-secondary));
  animation: gradientSlide 3s linear infinite;
}

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

/* Project Buttons */
.project-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--bg-primary);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.project-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 10px 30px rgba(0, 255, 136, 0.5),
    0 0 40px rgba(0, 112, 243, 0.3);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
}

.project-btn:active {
  transform: scale(0.98);
}

/* Project Content Cards */
.project-content {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  display: none;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-glass);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.project-content:not(.hidden) {
  display: block;
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-content:hover {
  transform: translateY(-5px);
  box-shadow: 
    var(--shadow-card),
    0 0 50px rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.project-content h3 {
  color: var(--accent-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.project-content .tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  padding: 0.4rem 0.8rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-glass);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Hide Google Translate bar */
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate {
  display: none !important;
  height: 0 !important;
}

body {
  top: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    padding: 15px 20px;
    border-radius: 20px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-links {
    display: none; /* Or implement mobile menu */
  }

  .hero-section {
    padding: 8rem 1rem 3rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .intro {
    font-size: 1.1rem;
  }

  .button-group {
    padding: 1.5rem;
    gap: 0.8rem;
  }

  .project-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .project-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  .project-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* Loading state */
.loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-glass);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Special hover effects for project cards */
.project-content.featured {
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.1) 0%, 
    var(--bg-card) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.project-content.featured::before {
  background: linear-gradient(180deg, var(--accent-tertiary), var(--accent-primary));
  width: 4px;
}