/* Variables y Reset */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #6366f1;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
  --gray-color: #6b7280;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: var(--secondary-color);
}

.secondary-btn {
  background-color: transparent;
  color: var(--dark-color);
  border: 1px solid var(--border-color);
}

.secondary-btn:hover {
  background-color: var(--border-color);
}

/* Header y Navegación */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--primary-color);
}

/* Sección Sobre Mí */
.about-section {
  padding: 5rem 0;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-text .subtitle {
  font-size: 1.25rem;
  color: var(--gray-color);
  margin-bottom: 1.5rem;
}

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

.buttons {
  display: flex;
  gap: 1rem;
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--border-color);
}

/* Sección Portfolio */
.portfolio-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

/* Tab Content */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

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

.project-card {
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.project-details {
  padding: 1.5rem;
}

.project-details h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-details h4 {
  font-size: 0.9rem;
  color: var(--gray-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.project-details p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--gray-color);
}

.project-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
  transition: var(--transition);
}

.project-link i {
  margin-right: 0.5rem;
}

.project-link:hover {
  color: var(--secondary-color);
}

/* Sección Contacto */
.contact-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.contact-text {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--gray-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--dark-color);
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Footer */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-color);
}

/* Responsive */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .buttons {
    justify-content: center;
  }

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

  .tab-btn {
    width: 100%;
    text-align: center;
  }

  .tab-btn.active::after {
    width: 50%;
    left: 25%;
  }

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