html {
  scroll-behavior: smooth;
}

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

body {
  font-family: "DM Sans", sans-serif;
  background-color: #f7f2ea;
  color: #5a6a54;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
header {
  width: 100%;
  display: flex;
}

header nav {
  width: 100%;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(247, 242, 234, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.07);
}

nav .logo {
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a3620;
  letter-spacing: -0.02em;
  text-decoration: none;
}
nav .logo span {
  color: #7dbf7d;
}

ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

ul li a {
  font-size: 12.5px;
  font-weight: 300;
  color: #5a6a54;
  text-decoration: none;
  transition: color 0.2s ease;
}
ul li a:hover {
  color: #1a3620;
}

nav .nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #7dbf7d;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@media (min-width: 768px) {
  header nav {
    height: 56px;
    padding: 0 3rem;
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
  }
}
.hero {
  padding: 8rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: end;
  max-width: 1000px;
  margin: 0 auto;
  animation: fadeUp 0.7s ease forwards;
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.07);
}
@media (min-width: 768px) {
  .hero {
    padding: 11rem 3rem 6rem;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.descripcion {
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a8b4a;
  font-weight: 400;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.descripcion::before {
  content: "";
  width: 20px;
  height: 0.5px;
  background: #7dbf7d;
  display: block;
}

.hero-h {
  font-family: "Syne", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #121f14;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1.4rem;
}
.hero-h em {
  color: #4a8b4a;
  font-style: normal;
}

.hero-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: #5a6a54;
  max-width: 420px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.btn-primary {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: #f7f2ea;
  background: #1a3620;
  padding: 9px 22px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: #2d5a2d;
  transform: translateY(-1px);
}

.btn-ghost {
  font-size: 12.5px;
  font-weight: 300;
  color: #5a6a54;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}
.btn-ghost:hover {
  color: #1a3620;
}
.btn-ghost svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-cv {
  font-size: 12.5px;
  font-weight: 400;
  color: #4a8b4a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 0.5px solid rgba(74, 139, 74, 0.3);
  padding: 9px 18px;
  border-radius: 100px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-cv:hover {
  background: rgba(74, 139, 74, 0.08);
  border-color: rgba(74, 139, 74, 0.5);
}
.btn-cv svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-right {
  display: flex;
  gap: 2rem;
  text-align: left;
  padding-bottom: 0.3rem;
}
@media (min-width: 768px) {
  .hero-right {
    flex-direction: column;
    text-align: right;
    align-items: flex-end;
    gap: 1.5rem;
  }
}

.hero-stat {
  margin-bottom: 1.2rem;
}
@media (min-width: 768px) {
  .hero-stat {
    margin-bottom: 0;
  }
}

.hero-stat-num {
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #1a3620;
  line-height: 1;
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 300;
  color: #9cae94;
  margin-top: 3px;
}

.stack-row {
  padding: 2rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.07);
}

.stack-label {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9cae94;
  font-weight: 400;
  white-space: nowrap;
}

.stack-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 400;
  color: #5a6a54;
  background: #ffffff;
  border: 0.5px solid rgba(26, 54, 32, 0.1);
  padding: 4px 11px;
  border-radius: 100px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tag:hover {
  background: #d4e8cc;
  border-color: rgba(125, 191, 125, 0.4);
  color: #1a3620;
}

.proyectos {
  padding: 3rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.07);
}
@media (min-width: 768px) {
  .proyectos {
    padding: 3rem 3rem;
  }
}

.pro-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.pro-title {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #121f14;
  letter-spacing: -0.03em;
}

.pro-link {
  font-size: 11.5px;
  font-weight: 400;
  color: #4a8b4a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s ease;
}
.pro-link:hover {
  gap: 0.6rem;
}
.pro-link svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.proj-card {
  background: #ffffff;
  border: 0.5px solid rgba(26, 54, 32, 0.09);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.proj-card:hover {
  transform: translateY(-6px);
}
@media (min-width: 768px) {
  .proj-card.featured {
    grid-column: span 2;
  }
}

.proj-thumb {
  height: 160px;
  background: #1a3620;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.proj-body {
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.proj-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proj-type {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9cae94;
  font-weight: 400;
}

.proj-badge {
  font-size: 9.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
}

.badge-freelance {
  color: #2d5a2d;
  background: #d4e8cc;
}

.badge-personal {
  color: #4a5a8b;
  background: #e4e8f5;
}

.badge-escolar {
  color: #6b5e2d;
  background: #f5edd4;
}

.proj-name {
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #121f14;
  letter-spacing: -0.02em;
}

.proj-desc {
  font-size: 12px;
  font-weight: 300;
  color: #5a6a54;
  line-height: 1.6;
}

.proj-stack {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.proj-tag {
  font-size: 10px;
  color: #9cae94;
  background: #eee9df;
  padding: 2px 8px;
  border-radius: 100px;
}

.pcard-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.3rem;
}

.pcard-link {
  font-size: 11.5px;
  font-weight: 500;
  color: #2d5a2d;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color 0.2s ease;
}
.pcard-link:hover {
  color: #4a8b4a;
}

.section {
  padding: 3rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .section {
    padding: 4rem 3rem;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-h {
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #121f14;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.about-h em {
  color: #4a8b4a;
  font-style: normal;
}

.about-p {
  font-size: 13px;
  font-weight: 300;
  color: #5a6a54;
  line-height: 1.85;
  margin-bottom: 0.7rem;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.about-card {
  background: #ffffff;
  border: 0.5px solid rgba(26, 54, 32, 0.09);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: transform 0.2s ease;
}
.about-card:hover {
  transform: translateX(6px);
}

.about-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #d4e8cc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-card-icon svg {
  width: 15px;
  height: 15px;
  stroke: #2d5a2d;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-card-title {
  font-family: "Syne", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #1a3620;
  margin-bottom: 2px;
}

.about-card-sub {
  font-size: 11px;
  font-weight: 300;
  color: #9cae94;
}

.cta {
  padding: 0 1.5rem;
  max-width: 1000px;
  margin: 0 auto 4rem;
}
@media (min-width: 768px) {
  .cta {
    padding: 0 3rem;
  }
}

.contact-band {
  background: #1a3620;
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}
.contact-band::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(125, 191, 125, 0.06);
}
@media (min-width: 768px) {
  .contact-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto 4rem;
  }
}

.contact-band-left {
  position: relative;
  z-index: 1;
}

.contact-band-tag {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #7dbf7d;
  font-weight: 400;
  margin-bottom: 0.6rem;
}

.contact-band-h {
  font-family: "Syne", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #f7f2ea;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.contact-band-h em {
  color: #7dbf7d;
  font-style: normal;
}

.contact-band-sub {
  font-size: 13px;
  font-weight: 300;
  color: #7a9a74;
  margin-top: 0.5rem;
}

.contact-band-actions {
  display: flex;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.cb-btn {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 22px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease;
}

.cb-primary {
  background: #7dbf7d;
  color: #1a3620;
}
.cb-primary:hover {
  transform: translateY(-1px);
  background: #8fcf8f;
}

.cb-ghost {
  background: rgba(247, 242, 234, 0.07);
  color: #f7f2ea;
  border: 0.5px solid rgba(125, 191, 125, 0.2);
}
.cb-ghost:hover {
  transform: translateY(-1px);
  background: rgba(247, 242, 234, 0.12);
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 0.5px solid rgba(26, 54, 32, 0.08);
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  footer {
    flex-direction: row;
    padding: 1.4rem 3rem;
    gap: 0;
  }
}

.footer-logo {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1a3620;
}
.footer-logo span {
  color: #7dbf7d;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 11.5px;
  color: #9cae94;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #5a6a54;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.sbtn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 0.5px solid rgba(26, 54, 32, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sbtn:hover {
  background: #d4e8cc;
  border-color: rgba(125, 191, 125, 0.4);
}
.sbtn svg {
  width: 12px;
  height: 12px;
  stroke: #9cae94;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.proj-card,
.about-card,
.contact-band {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.proj-card.visible,
.about-card.visible,
.contact-band.visible {
  opacity: 1;
  transform: translateY(0);
}

.proj-card:nth-child(1) {
  transition-delay: 0s;
}
.proj-card:nth-child(2) {
  transition-delay: 0.1s;
}
.proj-card:nth-child(3) {
  transition-delay: 0.2s;
}
.proj-card:nth-child(4) {
  transition-delay: 0.1s;
}
.proj-card:nth-child(5) {
  transition-delay: 0.2s;
}

.otro {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 8rem 1.5rem 5rem;
  width: 100%;
}

.page-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a8b4a;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.page-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #121f14;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 3rem;
}

.page-title em {
  color: #4a8b4a;
  font-style: normal;
}

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.1);
  margin-bottom: 3rem;
}

.tab.active {
  color: #1a3620;
  border-bottom-color: #4a8b4a;
}

.tab {
  font-family: "Syne", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #9cae94;
  background: none;
  border: none;
  padding: 0.7rem 1.2rem 0.7rem 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  transition: color 0.2s, border-color 0.2s;
}

.doc-update {
  font-size: 11px;
  font-weight: 300;
  color: #9cae94;
  margin-bottom: 2.5rem;
}

.doc-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 0.5px solid rgba(26, 54, 32, 0.07);
}

.doc-block h3 {
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1a3620;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.doc-block p {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  color: #5a6a54;
}

.doc-block a {
  color: #4a8b4a;
  text-decoration: none;
}

.doc {
  display: none;
}
.doc.active {
  display: block;
}

.doc-update {
  font-size: 11px;
  font-weight: 300;
  color: #9cae94;
  margin-bottom: 2.5rem;
}

.doc-block a {
  color: #4a8b4a;
  text-decoration: none;
}

.error-main {
  min-height: calc(100vh - 56px - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.error-content {
  text-align: center;
  max-width: 480px;
  animation: fadeUp 0.7s ease forwards;
}

.error-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.e4,
.e0 {
  font-family: "Syne", sans-serif;
  font-size: clamp(6rem, 18vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.e4 {
  color: #1a3620;
}

.e0 {
  color: #7dbf7d;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
.error-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a8b4a;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.error-desc {
  font-size: 14px;
  font-weight: 300;
  color: #5a6a54;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
}