@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #0E6F73;
    --accent-light: #4E4E4E20;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #F2C811;
    --accent-light: #64748b;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

nav a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero .highlight {
    color: var(--accent);
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.cta-button.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px #E6F4F1;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #F2C811;
}

.cta-button.secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.cta-button.secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.skill-item {
    background: #E6F4F1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-primary);
    border-radius: 32px;
    border-color: #0E6F73;
    box-shadow: inset 2px 2px 4px #0E6F7310,
              inset -2px -2px 4px rgba(255,255,255,0.12);
    transition: all 0.4s ease;
}

/*  background: #E6F4F1;
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: inset 2px 2px 4px #0E6F7320,
              inset -2px -2px 4px rgba(255,255,255,0.6);
  transition: all 0.2s ease;*/


.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.skill-icon {
    font-size: 1.2rem;
}

.skill-name {
    font-weight: 500;
    color: #FF8946; /*var(--text-primary);*/
}

.projects {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #E6F4F1; /*var(--accent-light);*/
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

[data-theme="dark"] .tag {
    background: var(--accent-light);
    color: var(--accent);
}

.contact {
    padding: 4rem 0;
    background: var(--bg-accent);
    text-align: center;
}

.contact h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-item span {
    font-size: 1.2rem;
}

footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width:768px) {
    .container {
        padding: 0 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width:480px) {
    .hero h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* cuando tenga la clase show, se ve */
.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

.close-btn {
  font-size: 20px;
  cursor: pointer;
}

@keyframes fadeIn{
  from{opacity:0;transform:scale(.95)}
  to{opacity:1;transform:scale(1)}
}
/* estilos adicionales */

.div-horizontal {
    display: flex;
    gap: 10px;
}

.texto-popup {
    /*background: #4E4E4E06;*/
    color: #FF8946;
    padding: 8px;
    /*border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);*/
}

/* tarjetas efecto (unificada) */
.project-card{
  border:1px solid var(--border);
  padding:1rem;
  border-radius:10px;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
  background:var(--bg-secondary);
}
.project-card:hover{
  transform:scale(1.02);
  box-shadow:0 8px 20px var(--shadow-lg);
}

.project-card:hover {
    transform: scale(1.02);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--shadow-lg);
}

/*Encabezados modal*/
.modal-header {
  display: flex;
  justify-content: space-between; /* título a la izquierda, X a la derecha */
  align-items: center;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.close-btn {
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.tag {
  background: #E6F4F1; /*var(--accent-light);*/
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: inset 2px 2px 4px #0E6F7320 /*rgba(0,0,0,0.2)*/,
              inset -2px -2px 4px rgba(255,255,255,0.6);
  transition: all 0.2s ease;
}

/* Al pasar el ratón, un poco más "aplastado" */
.tag:hover {
  box-shadow: inset 1px 1px 2px #0E6F7330/*rgba(0,0,0,0.3)*/,
              inset -1px -1px 2px rgba(255,255,255,0.7);
  transform: translateY(1px);
}
