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

:root {
  --primary-color: #6c5ce7;
  --secondary-color: #0984e3;
  --accent-color: #fd79a8;
  --text-light: #2d3436;
  --text-dark: #f5f5f5;
  --bg-light: #ffffff;
  --bg-secondary-light: #f8f9fa;
  --bg-dark: #1e1e1e;
  --bg-secondary-dark: #2d2d2d;
  --border-light: #e0e0e0;
  --border-dark: #404040;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: fit-content;
}

nav .logo i {
  font-size: 1.8rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
  font-weight: 500;
}

nav a:hover {
  opacity: 0.8;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: -50px;
  right: -50px;
}

.hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  bottom: -30px;
  left: -30px;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero .subtitle {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-photo-wrapper {
  margin: 0 auto 1.5rem;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero .subtitle .cursor {
  display: inline-block;
  margin-left: 0.4rem;
  color: white;
  animation: blink 0.8s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  margin: 0 0.5rem;
  border: 2px solid white;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
  background: transparent;
  color: white;
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Main Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* Sections */
section {
  padding: 6rem 0;
  margin-top: 2rem;
}

section h2 {
  font-size: 2.5rem;
  margin-bottom: 4rem;
  margin-top: 1.5rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 0.5rem auto 0;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-item {
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.3s;
}

body.light .highlight-item {
  background: var(--bg-secondary-light);
}

body.dark .highlight-item {
  background: var(--bg-secondary-dark);
}

.highlight-item:hover {
  transform: translateX(10px);
}

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

.project-card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid;
  text-decoration: none;
  color: inherit;
}

.project-card:hover,
a.project-card:hover {
  text-decoration: none;
}

body.light .project-card {
  background: var(--bg-secondary-light);
  border-color: var(--border-light);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

body.dark .project-card {
  background: var(--bg-secondary-dark);
  border-color: var(--border-dark);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.project-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem 1.5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.project-header h3 {
  font-size: 1.5rem;
}

.project-body {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-description {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.project-tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.skill-category {
  border-radius: 12px;
  padding: 2.5rem;
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s;
}

body.light .skill-category {
  background: var(--bg-secondary-light);
}

body.dark .skill-category {
  background: var(--bg-secondary-dark);
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Experience Section */
.experience-list {
  display: grid;
  gap: 2.5rem;
}

.experience-item {
  padding: 2rem;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.3s;
}

body.light .experience-item {
  background: var(--bg-secondary-light);
}

body.dark .experience-item {
  background: var(--bg-secondary-dark);
}

.experience-item:hover {
  transform: translateX(10px);
}

.experience-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.experience-item .role {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.experience-item .period {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

/* Education Section */
.education-list {
  display: grid;
  gap: 2.5rem;
}

.education-item {
  padding: 2rem;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
}

body.light .education-item {
  background: var(--bg-secondary-light);
}

body.dark .education-item {
  background: var(--bg-secondary-dark);
}

.education-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.education-item .institution {
  font-weight: 600;
  color: var(--secondary-color);
}

.education-item .grade {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.contact-item {
  text-align: center;
  padding: 2.5rem;
  border-radius: 12px;
}

body.light .contact-item {
  background: var(--bg-secondary-light);
}

body.dark .contact-item {
  background: var(--bg-secondary-dark);
}

.contact-item i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-item h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--secondary-color);
}

/* Certificates Section */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.certificate-card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 2px solid;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

body.light .certificate-card {
  background: var(--bg-secondary-light);
  border-color: var(--border-light);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

body.dark .certificate-card {
  background: var(--bg-secondary-dark);
  border-color: var(--border-dark);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
  border-color: var(--primary-color);
}

.certificate-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.certificate-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.certificate-issuer {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.certificate-date {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.certificate-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.certificate-card:hover .certificate-action {
  transform: scale(1.05);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

section h2 {
  animation: slideIn 0.8s ease;
}

/* Responsive */
@media (max-width: 768px) {
  nav .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .hero .subtitle {
    font-size: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  section h2 {
    font-size: 2rem;
  }

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

  /* Mobile Navigation */
  .menu-toggle {
    display: flex;
  }

  nav .logo span {
    display: none;
  }

  nav .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav .nav-links.active {
    max-height: 300px;
    padding: 1rem 2rem;
  }

  nav .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav .nav-links a:last-of-type {
    border-bottom: none;
  }

  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 4rem 0;
    margin-top: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    font-size: 0.9rem;
  }

  section h2 {
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
    margin-top: 1rem;
  }

  .about-content {
    gap: 2.5rem;
  }

  .about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .about-highlights {
    gap: 1.2rem;
  }

  .highlight-item {
    padding: 1.2rem;
  }

  .skill-category {
    padding: 1.8rem;
  }

  .skill-category h3 {
    font-size: 1.1rem;
  }

  .skill-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .skill-list {
    gap: 0.6rem;
  }

  .experience-item {
    padding: 1.5rem;
  }

  .experience-item h3 {
    font-size: 1.1rem;
  }

  .education-item {
    padding: 1.5rem;
  }

  .contact-wrapper {
    gap: 2rem;
  }

  .contact-item {
    padding: 1.8rem;
  }

  .contact-item i {
    font-size: 2rem;
  }

  footer {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .certificate-card {
    padding: 1.5rem;
  }

  .certificate-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
  }

  .certificate-card h3 {
    font-size: 1.1rem;
  }

  .certificate-issuer {
    font-size: 0.85rem;
  }

  .certificate-date {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .certificate-action {
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
    gap: 0.3rem;
  }

/* Extra Small Devices */
@media (max-width: 480px) {
  nav {
    padding: 1rem;
  }

  nav .logo {
    font-size: 1.2rem;
  }

  nav .logo i {
    font-size: 1.5rem;
  }

  .hero {

    min-height: 50vh;
  }

  .hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .hero .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  section {
    padding: 3rem 0 3.5rem 0;
    margin-top: 1.5rem;
  }

  section h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
  }

  .project-header h3 {
    font-size: 1.2rem;
  }

  .project-body {
    padding: 1.2rem;
  }

  .project-tags {
    gap: 0.5rem;
  }

  .cta-button {
    display: block;
    width: 100%;
    margin: 0.65rem 0;
    padding: 0.85rem 1.5rem;
  }

  .about-highlights {
    gap: 1rem;
  }

  .highlight-item {
    padding: 1rem;
  }

  .projects-grid {
    gap: 2rem;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .skill-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  .contact-wrapper {
    gap: 1.5rem;
  }

  .contact-item {
    padding: 1.5rem;
  }

  .contact-item i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  footer {
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .certificate-card {
    padding: 1.2rem;
  }

  .certificate-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
  }

  .certificate-card h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }

  .certificate-issuer {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .certificate-date {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .certificate-action {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    gap: 0.3rem;
    border-radius: 6px;
  }
}
