html {
  scroll-behavior: smooth;
}

:root {
  --text: #e5e7eb;
  --muted: #94a3b8;

  --primary: #6b8e23;
  --primary-dark: #3f6212;
  --primary-medium: #4d7c0f;
  --primary-light: #84cc16;

  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-bg-strong: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Epilogue', sans-serif;
  letter-spacing: 0.3px;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  line-height: 1.6;
  background: url("/assets/background/background6.png") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  z-index: -1;
}

::selection {
  background: var(--primary);
  color: #000;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  color: #a3d948;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.logo {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #ffffff;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: white;
  font-size: 1.3rem;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.hero {
  padding: 110px 0 80px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 700;
}

.hero h2 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--primary-light);
  margin: 0 0 20px;
  font-weight: 600;
}

.hero-text {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.18);
}

.section-label {
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 0;
  margin-bottom: 28px;
  color: #f8fafc;
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card,
.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.card {
  padding: 24px;
}

.card:hover,
.project-card:hover {
  transform: translateY(-5px);
  background: rgba(107, 142, 35, 0.12);
}

.card h3,
.project-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--primary-light);
  font-weight: 600;
}

.card p,
.card li,
.project-desc,
.project-block p,
.project-block li {
  color: rgba(226, 232, 240, 0.9);
}

.full-width {
  grid-column: 1 / -1;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
}
.project-image-wrapper {
  width: 100%;
  height: 150px;
  background: rgba(11, 18, 32, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.project-image {
  max-width: 80%;
  max-height: 130px;
  object-fit: contain;
  display: block;
}
.project-content {
  padding: 22px;
}

.project-desc {
  font-size: 14px;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.project-tech span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}

.tech-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.project-extra {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.35s ease, margin-top 0.35s ease;
}



.project-block {
  margin-bottom: 18px;
}

.project-card.active .project-extra {
  max-height: 5000px;
  opacity: 1;
  margin-top: 16px;
} 

.project-block ul {
  margin: 0;
  padding-left: 18px;


.project-repos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.repo-link:hover {
  background: rgba(107, 142, 35, 0.18);
  color: #ffffff;
  transform: translateY(-2px);
}

.repo-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.project-btn,
.btn,
.toggle-btn {
  display: inline-block;
  border-radius: 10px;
  font-weight: bold;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.project-btn,
.toggle-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: #03111d;
  border: none;
  cursor: pointer;
}

.project-btn {
  margin-top: 8px;
}

.project-btn:hover,
.toggle-btn:hover,
.btn-primary:hover {
  background: var(--primary-light);
  color: #03111d;
}

.toggle-btn {
  margin-top: 16px;
}

.btn {
  padding: 12px 18px;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-primary {
  background: var(--primary);
  color: #03111d;
}

.btn-secondary {
  border: 1px solid var(--glass-border);
  color: white;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #03111d;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1001;
}

.back-to-top:hover {
  background: var(--primary-light);
}

ul {
  padding-left: 20px;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    width: 100%;
  }

  .nav.active {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0 8px;
  }

  .nav-container {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 90px 0 60px;
  }

  .card,
  .project-content {
    padding: 20px;
  }

  .project-image-wrapper {
    height: 190px;
  }

  .project-tech span {
    font-size: 12px;
  }

  .tech-logo {
    width: 16px;
    height: 16px;
  }

  .hero-buttons,
  .cv-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 0.95rem;
  }

  .container {
    width: 94%;
  }

  .section {
    padding: 65px 0;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }
}
html {
  scroll-behavior: smooth;
}

:root {
  --text: #e5e7eb;
  --muted: #94a3b8;

  --primary: #6b8e23;
  --primary-dark: #3f6212;
  --primary-medium: #4d7c0f;
  --primary-light: #84cc16;

  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-bg-strong: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Epilogue', sans-serif;
  letter-spacing: 0.3px;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  line-height: 1.6;
  background: url("/assets/background/background6.png") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  z-index: -1;
}

::selection {
  background: var(--primary);
  color: #000;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  color: #a3d948;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.logo {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #ffffff;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: white;
  font-size: 1.3rem;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.hero {
  padding: 110px 0 80px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 700;
}

.hero h2 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--primary-light);
  margin: 0 0 20px;
  font-weight: 600;
}

.hero-text {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.18);
}

.section-label {
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 0;
  margin-bottom: 28px;
  color: #f8fafc;
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card,
.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.card {
  padding: 24px;
}

.card:hover,
.project-card:hover {
  transform: translateY(-5px);
  background: rgba(107, 142, 35, 0.12);
}

.card h3,
.project-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--primary-light);
  font-weight: 600;
}

.card p,
.card li,
.project-desc,
.project-block p,
.project-block li {
  color: rgba(226, 232, 240, 0.9);
}

.full-width {
  grid-column: 1 / -1;
}

/* PROYECTOS */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
}

/* Imagen representativa */
.project-image-wrapper {
  width: 100%;
  height: 150px;
  background: rgba(11, 18, 32, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.project-image {
  max-width: 80%;
  max-height: 130px;
  object-fit: contain;
  display: block;
}

.project-content {
  padding: 22px;
}

.project-desc {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Tecnologías */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.project-tech span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}

.tech-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Contenido expandible */
.project-extra {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.project-card.active .project-extra {
  max-height: 5000px;
  opacity: 1;
  margin-top: 16px;
}

.project-block {
  margin-bottom: 18px;
}

.project-block h4 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 500;
}

.project-block ul {
  margin: 0;
  padding-left: 18px;
}

/* Repositorios */
.project-repos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.repo-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.repo-link:hover {
  background: rgba(107, 142, 35, 0.18);
  color: #ffffff;
  transform: translateY(-2px);
}

.repo-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Botones */
.project-btn,
.btn,
.toggle-btn {
  display: inline-block;
  border-radius: 10px;
  font-weight: bold;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.project-btn,
.toggle-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: #03111d;
  border: none;
  cursor: pointer;
}

.project-btn {
  margin-top: 8px;
}

.project-btn:hover,
.toggle-btn:hover,
.btn-primary:hover {
  background: var(--primary-light);
  color: #03111d;
}

.toggle-btn {
  margin-top: 16px;
}

.btn {
  padding: 12px 18px;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-primary {
  background: var(--primary);
  color: #03111d;
}

.btn-secondary {
  border: 1px solid var(--glass-border);
  color: white;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #03111d;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1001;
}

.back-to-top:hover {
  background: var(--primary-light);
}

ul {
  padding-left: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    width: 100%;
  }

  .nav.active {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0 8px;
  }

  .nav-container {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 90px 0 60px;
  }

  .card,
  .project-content {
    padding: 20px;
  }

  .project-image-wrapper {
    height: 130px;
  }

  .project-image {
    max-width: 75%;
    max-height: 110px;
  }

  .project-tech span {
    font-size: 12px;
  }

  .tech-logo {
    width: 16px;
    height: 16px;
  }

  .project-repos {
    grid-template-columns: 1fr;
  }

  .repo-link {
    width: 100%;
  }

  .hero-buttons,
  .cv-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 0.95rem;
  }

  .container {
    width: 94%;
  }

  .section {
    padding: 65px 0;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

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