/* CSS Custom Properties for Theme Support */
:root {
  /* Aquamarine Color Palette */
  --primary-light: #5FD3C6;
  --primary-dark: #3CBFAD;
  --background-light: #F9F9F9;
  --background-dark: #1B1F23;
  --text-light: #2C3E50;
  --text-dark: #AEEBE3;
  --card-light: #FFFFFF;
  --card-dark: #2D3748;
  --border-light: #E2E8F0;
  --border-dark: #4A5568;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.3);
  
  /* Current Theme Variables */
  --bg-color: var(--background-light);
  --text-color: var(--text-light);
  --card-bg: var(--card-light);
  --border-color: var(--border-light);
  --shadow: var(--shadow-light);
  --primary: var(--primary-light);
  --primary-hover: var(--primary-dark);
}

[data-theme="dark"] {
  --bg-color: var(--background-dark);
  --text-color: var(--text-dark);
  --card-bg: var(--card-dark);
  --border-color: var(--border-dark);
  --shadow: var(--shadow-dark);
  --primary: var(--primary-dark);
  --primary-hover: var(--primary-light);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Spinner */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn, .theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.lang-btn:hover, .theme-toggle:hover {
  background-color: var(--border-color);
  transform: scale(1.1);
}

.lang-btn.active {
  background-color: var(--primary);
  color: white;
}

.lang-btn .fi {
  font-size: 1.2rem;
  width: 1.5rem;
  height: 1.1rem;
  border-radius: 2px;
  display: inline-block;
}

/* Main Content */
.main {
  padding-top: 80px;
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-light)20, var(--primary-dark)20);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.hero-avatar {
  display: flex;
  justify-content: center;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  object-fit: cover;
  transition: transform 0.3s ease;
  animation: fadeInUp 1s ease-out;
}

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

.hero-text {
  animation: fadeInUp 1s ease-out 0.2s both;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.hero-name {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.hero-bio {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.8;
  line-height: 1.6;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 25px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  font-weight: 500;
}

.hero-link:hover {
  border-color: var(--primary);
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.hero-link i {
  font-size: 1.1em;
  width: 1.2em;
  text-align: center;
}

/* Section Styles */
section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
  border-radius: 2px;
}

/* About Section */
.about {
  background-color: var(--card-bg);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 1.2rem;
  line-height: 1.8;
  opacity: 0.9;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
  border-color: var(--primary);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.9rem;
}

.project-description {
  margin-bottom: 1.5rem;
  opacity: 0.8;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--primary-hover);
  transform: translateX(5px);
}

/* Contact Section */
.contact {
  background-color: var(--card-bg);
}

.contact-content {
  display: flex;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.contact-item-icon {
  font-size: 1.5rem;
}

.contact-item-text {
  font-weight: 500;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(95, 211, 198, 0.1);
}

/* Button Styles */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* Footer */
.footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  opacity: 0.7;
}

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

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .nav {
    padding: 1rem;
  }
  
  .hero-content {
    gap: 1.5rem;
  }
  
  .avatar {
    width: 150px;
    height: 150px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-name {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-content {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .hero-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .project-card {
    padding: 1.5rem;
  }
  
  .nav-controls {
    gap: 0.25rem;
  }
  
  .lang-btn, .theme-toggle {
    padding: 0.4rem;
    font-size: 1rem;
  }
}