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

:root {
  /* Dark Theme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --accent-primary: #ff4757;
  --accent-secondary: #ff6b7a;
  --border-color: #333333;

  /* Light Theme */
  --bg-primary-light: #ffffff;
  --bg-secondary-light: #f8f9fa;
  --bg-card-light: #ffffff;
  --text-primary-light: #1a1a1a;
  --text-secondary-light: #333333;
  --text-muted-light: #666666;
  --accent-primary-light: #ff4757;
  --accent-secondary-light: #ff6b7a;
  --border-color-light: #e9ecef;
}

.light-theme {
  --bg-primary: var(--bg-primary-light);
  --bg-secondary: var(--bg-secondary-light);
  --bg-card: var(--bg-card-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --border-color: var(--border-color-light);
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

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

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

.light-theme .header {
  background-color: rgba(255, 255, 255, 0.95);
}

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

.nav-left {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-primary);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text span {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.controls {
  display: flex;
  gap: 0.5rem;
}

.theme-toggle,
.lang-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover,
.lang-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.lang-text {
  font-size: 0.8rem;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 1rem;
}

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

.social-links a:hover {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 2rem;
  margin-top: 80px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  margin-bottom: 2rem;
  letter-spacing: -2px;
}

.cta-button {
  background-color: transparent;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.cta-button:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.circle-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(20px);
}

.circle-main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background-color: var(--text-primary);
  border-radius: 50%;
  border: 20px solid var(--bg-primary);
  box-shadow: 0 0 50px rgba(255, 71, 87, 0.3);
}

.code-symbols {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.symbol {
  position: absolute;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  animation: float 3s ease-in-out infinite;
}

.symbol-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.symbol-2 {
  top: 60%;
  right: 15%;
  animation-delay: 1s;
}

.symbol-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 2s;
}

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

.hero-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}

.nav-arrow {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Sections */
section {
  padding: 6rem 0;
  transition: all 0.6s ease;
  opacity: 1;
  transform: translateY(0);
}

/* Added section transition class for smooth animations between sections */
.section-transition {
  opacity: 0;
  transform: translateY(20px);
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4rem;
  letter-spacing: -1px;
}

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

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

.about-text p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  text-align: center;
}

/* Enhanced skills section with flip card animations */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.skill-card {
  background: transparent;
  width: 100%;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
}

.skill-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.skill-card:hover .skill-card-inner {
  transform: rotateY(180deg);
}

.skill-card-front,
.skill-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.skill-card-front {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 71, 87, 0.05) 100%);
  color: var(--text-primary);
}

.skill-card-back {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  transform: rotateY(180deg);
  padding: 1.5rem;
}

.skill-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(255, 71, 87, 0.3);
}

.skill-card-front h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.skill-card-front p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.skill-card-back h4 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.tech-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-name {
  font-weight: 700;
  font-size: 1rem;
  color: white;
  margin-bottom: 0.25rem;
}

.tech-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.3;
}

/* Projects Section */
.projects-header {
  text-align: center;
  margin-bottom: 4rem;
}

.projects-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: 600;
}

.projects-title {
  font-size: 3rem;
  font-weight: 800;
  margin-top: 0.5rem;
  letter-spacing: -1px;
}

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

.project-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
  position: relative;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-info {
  padding: 2rem;
  position: relative;
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tech span {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.project-tech span:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.project-link {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.4rem;
  transition: all 0.3s ease;
  background: rgba(255, 71, 87, 0.1);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.project-link:hover {
  color: white;
  background: var(--accent-primary);
  transform: scale(1.1) rotate(5deg);
}

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

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.contact-header h3 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.contact-method {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 71, 87, 0.05) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contact-method::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.1), transparent);
  transition: left 0.6s ease;
}

.contact-method:hover {
  transform: translateX(10px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(255, 71, 87, 0.2);
}

.contact-method:hover::before {
  left: 100%;
}

.method-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.method-icon.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.method-icon.github {
  background: linear-gradient(135deg, #333, #24292e);
}

.method-icon.facebook {
  background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.method-info h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.method-info span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form-section {
  position: relative;
}

.modern-contact-form {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 71, 87, 0.03) 100%);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.modern-contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h4 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-field {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 1.5rem 1.25rem 0.75rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.form-field label {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all 0.3s ease;
  pointer-events: none;
  background: var(--bg-primary);
  padding: 0 0.5rem;
}

.form-field input:focus + label,
.form-field textarea:focus + label,
.form-field input:valid + label,
.form-field textarea:valid + label {
  top: -0.5rem;
  left: 1rem;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.field-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.form-field input:focus ~ .field-border,
.form-field textarea:focus ~ .field-border {
  width: 100%;
}

.modern-submit-btn {
  width: 100%;
  padding: 1.75rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.modern-submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.modern-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255, 71, 87, 0.4);
}

.modern-submit-btn:hover::before {
  left: 100%;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.modern-success-message {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 3rem;
  border-radius: 20px;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: slideInUp 0.6s ease;
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
}

.success-icon {
  font-size: 4rem;
  flex-shrink: 0;
  animation: bounce 1s ease infinite;
}

.success-content h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.success-content p {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    padding: 1rem;
  }

  .nav-left {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .logo-text {
    display: none;
  }

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

  .circle-container {
    width: 300px;
    height: 300px;
  }

  .circle-main {
    width: 150px;
    height: 150px;
  }

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

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

  .skill-card {
    height: 260px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modern-contact-form {
    padding: 2rem;
  }

  .contact-header h3 {
    font-size: 2rem;
  }

  .modern-success-message {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 2.5rem;
  }
}

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

  .hero {
    padding: 0 1rem;
  }

  .nav-left {
    display: none;
  }

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

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

  .skill-card {
    height: 240px;
  }

  .skill-card-front,
  .skill-card-back {
    padding: 1.5rem;
  }

  .skill-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .modern-contact-form {
    padding: 1.5rem;
  }

  .contact-method {
    padding: 1.25rem;
  }

  .method-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

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

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
