/* CSS Variables for Themes */
:root {
  /* Light Theme */
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --container-bg: white;
  --text-primary: #333;
  --text-secondary: #555;
  --text-muted: #7f8c8d;
  --header-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card-bg: #f8f9fa;
  --card-border: #e9ecef;
  --section-border: #eee;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --tech-tag-bg: #e9ecef;
  --tech-tag-text: #495057;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --container-bg: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --header-bg: linear-gradient(135deg, #2c2c54 0%, #40407a 100%);
  --card-bg: #2a2a2a;
  --card-border: #404040;
  --section-border: #404040;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --tech-tag-bg: #404040;
  --tech-tag-text: #cccccc;
  --theme-btn-bg: rgba(255, 255, 255, 0.1);
  --theme-btn-hover: rgba(255, 255, 255, 0.2);
}

/* Additional Color Themes */
[data-theme="ocean"] {
  --bg-gradient: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
  --container-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --header-bg: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  --card-bg: #f8fafc;
  --card-border: #e2e8f0;
  --section-border: #e2e8f0;
  --accent-gradient: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
  --tech-tag-bg: #e2e8f0;
  --tech-tag-text: #1e293b;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="sunset"] {
  --bg-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  --container-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --header-bg: linear-gradient(135deg, #fbd3e9 0%, #bb377d 100%);
  --card-bg: #fff7f9;
  --card-border: #fde2e8;
  --section-border: #fde2e8;
  --accent-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  --tech-tag-bg: #fde2e8;
  --tech-tag-text: #7a213f;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="forest"] {
  --bg-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --container-bg: #ffffff;
  --text-primary: #102a27;
  --text-secondary: #2f4f4f;
  --text-muted: #6b8f8e;
  --header-bg: linear-gradient(135deg, #c6f6d5 0%, #81e6d9 100%);
  --card-bg: #f4fffa;
  --card-border: #d1fae5;
  --section-border: #d1fae5;
  --accent-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --tech-tag-bg: #e6fffa;
  --tech-tag-text: #0b3d3a;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="rose"] {
  --bg-gradient: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
  --container-bg: #ffffff;
  --text-primary: #2d1f2f;
  --text-secondary: #4a314b;
  --text-muted: #7a5c7d;
  --header-bg: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
  --card-bg: #fff5f8;
  --card-border: #fbd0df;
  --section-border: #fbd0df;
  --accent-gradient: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
  --tech-tag-bg: #ffe3ef;
  --tech-tag-text: #4a314b;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="mint"] {
  --bg-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --container-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --header-bg: linear-gradient(135deg, #c2e9fb 0%, #a1c4fd 100%);
  --card-bg: #f0f9ff;
  --card-border: #dbeafe;
  --section-border: #dbeafe;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --tech-tag-bg: #e0f2fe;
  --tech-tag-text: #0c4a6e;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="amber"] {
  --bg-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --container-bg: #ffffff;
  --text-primary: #3b2f1e;
  --text-secondary: #5c4b30;
  --text-muted: #8b7355;
  --header-bg: linear-gradient(135deg, #fff1c1 0%, #ffe29f 100%);
  --card-bg: #fffaf2;
  --card-border: #ffe4bf;
  --section-border: #ffe4bf;
  --accent-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --tech-tag-bg: #fff1d6;
  --tech-tag-text: #5c4b30;
  --theme-btn-bg: rgba(255, 255, 255, 0.2);
  --theme-btn-hover: rgba(255, 255, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-gradient);
  min-height: 100vh;
  padding: 20px;
  transition: all 0.3s ease;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--container-bg);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Header Styles */
.header {
  text-align: center;
  padding: 60px 40px 40px;
  background: var(--header-bg);
  position: relative;
  transition: all 0.3s ease;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

.theme-btn {
  background: var(--theme-btn-bg);
  border: none;
  color: var(--text-primary);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  background: var(--theme-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.theme-btn:active {
  transform: translateY(0);
}

.avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  object-fit: cover;
  transition: all 0.3s ease;
}

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

.name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.title {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Section Styles */
section {
  padding: 40px;
  border-bottom: 1px solid var(--section-border);
  transition: all 0.3s ease;
}

section:last-child {
  border-bottom: none;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 10px;
  transition: all 0.3s ease;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* About Section */
.about p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: all 0.3s ease;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill {
  background: var(--accent-gradient);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Contact Buttons */
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  color: white;
  min-width: 120px;
  justify-content: center;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-btn i {
  font-size: 1.2rem;
}

.github {
  background: #333;
}

.telegram {
  background: #0088cc;
}

.email {
  background: #ea4335;
}

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

.project-card {
  background: var(--card-bg);
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-link {
  display: block;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: all 0.3s ease;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.project-header h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0;
  transition: all 0.3s ease;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-links i {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.project-card:hover .project-links i {
  color: #667eea;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: var(--tech-tag-bg);
  color: var(--tech-tag-text);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    border-radius: 15px;
  }

  .header {
    padding: 40px 20px 30px;
  }

  .theme-toggle {
    top: 15px;
    right: 15px;
  }

  .theme-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .name {
    font-size: 2rem;
  }

  section {
    padding: 30px 20px;
  }

  .contact-buttons {
    justify-content: stretch;
  }

  .contact-btn {
    flex: 1;
    min-width: auto;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .contact-buttons {
    flex-direction: column;
  }

  .skills {
    justify-content: center;
  }

  .theme-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* Animation for theme transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
