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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
  --card-bg: #1e293b;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  transition: var(--transition);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  z-index: 1000;
}

.language-toggle {
  position: fixed;
  top: 1.5rem;
  right: 5.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  box-shadow: var(--shadow-light);
  z-index: 1000;
}

.language-toggle button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: 0.75rem;
}

.language-toggle button.active {
  font-weight: 600;
  color: var(--accent-color);
}

.chatbot {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 320px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  z-index: 900;
}

.chatbot-header {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chatbot-messages {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  background: var(--bg-primary);
}

.chat-message {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  max-width: 85%;
  word-wrap: break-word;
}

.chat-message-user {
  margin-left: auto;
  background: var(--accent-color);
  color: #fff;
}

.chat-message-assistant {
  margin-right: auto;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

#chat-form {
  display: flex;
  padding: 0.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
}

#chat-input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-primary);
}

#chat-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

#chat-form button {
  margin-left: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0 0.9rem;
  font-size: 0.8rem;
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

#chat-form button:hover {
  background: var(--accent-hover);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-medium);
}

.theme-toggle .icon {
  font-size: 20px;
  transition: var(--transition);
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

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

.name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.title {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.contact-link:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

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

.card-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.skill-item {
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.skill-item:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.skill-emoji {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.project-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.about-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: justify;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .name {
    font-size: 1.75rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
