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

:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
  --gradient: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  --gradient-hover: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
}

/* Dark theme variables */
[data-theme="dark"] {
  --text-primary: #f7fafc;
  --text-secondary: #a0aec0;
  --bg-primary: #1a202c;
  --bg-secondary: #2d3748;
  --bg-card: #2d3748;
  --border-color: #4a5568;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.3s ease;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

body:has(#theme-checkbox:checked) .navbar {
  background: rgba(26, 32, 44, 0.6);
}

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

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-brand:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

/* Theme toggle in navbar */
.theme-toggle {
  display: flex;
  align-items: center;
}

.theme-toggle input {
  display: none;
}

.theme-toggle label {
  display: block;
  width: 60px;
  height: 30px;
  background: var(--gradient);
  border-radius: 30px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.theme-toggle label:before {
  content: "☀️";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.theme-toggle input:checked + label:before {
  transform: translateX(30px);
  content: "🌙";
}

.theme-toggle input:checked + label {
  background: linear-gradient(135deg, #4a5568, #2d3748);
}

/* Mobile navbar */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Theme functionality */
body:has(#theme-checkbox:checked) {
  --text-primary: #f7fafc;
  --text-secondary: #a0aec0;
  --bg-primary: #1a202c;
  --bg-secondary: #2d3748;
  --bg-card: #2d3748;
  --border-color: #4a5568;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.portfolio {
  transition: all 0.3s ease;
}

/* Header */
.header {
  background: var(--gradient);
  color: white;
  padding: 150px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* margin-top: 70px; */
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  animation: float 20s infinite linear;
}

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

.header-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.profile-img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f093fb, #f5576c);
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: pulse 4s infinite;
  overflow: hidden;
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Covers the entire container while maintaining aspect ratio */
  border-radius: 50%; /* Makes the image circular */
}

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

.header h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
  animation: slideUp 1s ease-out;
}

.header .subtitle {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 20px;
  animation: slideUp 1s ease-out 0.2s both;
}

.header .contact-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  animation: slideUp 1s ease-out 0.4s both;
}

.contact-info a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.contact-info a:hover {
  transform: translateY(-5px);
}

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

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

/* Sections */
.section {
  padding: 80px 0;
  background: var(--bg-primary);
  transition: all 0.3s ease;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

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

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--gradient);
  margin: 20px auto;
  border-radius: 2px;
}

/* Summary */
.summary {
  font-size: 1.2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Skills */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  max-width: 800px;
  gap: 40px;
  margin: 50px auto 0;
}

.skill-category {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.category-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.category-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-right: 20px;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.category-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
}

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

.skill-card {
  background: var(--bg-secondary);
  padding: 20px 15px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.skill-card:hover {
  background: var(--gradient);
  color: white;
  transform: translateY(-3px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
  transition: all 0.3s ease;
}

.skill-icon img {
  width: 2rem; /* Same as font-size for consistency */
  height: 2rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.skill-card:hover .skill-icon {
  transform: scale(1.1);
}

.skill-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
  color: white;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

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

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

.project-header {
  background: var(--gradient);
  color: white;
  padding: 25px;
  position: relative;
}

.project-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30px, -30px);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.project-tech {
  font-size: 0.9rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.project-body {
  padding: 25px;
}

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

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

.project-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
}

.project-link:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* Education & Languages */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.info-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.info-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.info-card .institution {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.info-card .details {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.language-level {
  background: var(--gradient);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Interests */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.interest-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.interest-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  /* background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; */
}

.interest-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.interest-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  text-align: center;
  padding: 12px 0;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header {
    padding: 120px 0 80px;
  }

  .header h1 {
    font-size: 2.5rem;
  }

  .header .subtitle {
    font-size: 1.2rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-categories {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .skill-card {
    padding: 15px 10px;
    flex: 0 0 calc(50% - 6px);
    max-width: 120px;
    min-width: 120px;
  }

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

  .nav-container {
    padding: 0 15px;
  }
}

/* Smooth scrolling effect */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-hover);
}
