/* ============================= */
/* styles.css optimizado         */
/* ============================= */

/* Importación de tipografías */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500&family=Syne:wght@700&display=swap');

/* Variables globales */
:root {
  --color-primary:   #6F00FF;
  --color-secondary: #CCCCFF;
  --color-bg-light:  #F4F2FF;
  --color-accent:    #00FFC8;
  --color-text-dark: #52525B;
  --spacing:         1rem;
}

/* Reset y accesibilidad */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  margin: 0;
  padding: var(--spacing);
  height: 100%;
  scroll-behavior: smooth;
  background-color: #fff;
  background-image:
    linear-gradient(rgba(82,82,91,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,82,91,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}
body {
  margin: 0;
  font: 300 22px 'Space Grotesk', sans-serif;
  color: var(--color-text-dark);
}
p {
  margin: 0;
  font-weight: 500;
}
a:focus,
button:focus {
  outline: 2px dashed var(--color-accent);
  outline-offset: 3px;
}
h1, h2, h3 {
  margin: 0;
}

/* Secciones y contenedores */
section,
#site-footer {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  padding: var(--spacing);
}
.wrapper,
.section-content {
  display: grid;
  gap: var(--spacing);
  align-items: center;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  height: calc(100vh - 2*var(--spacing));
  background: #fff;
  overflow: hidden;
}
#hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(82,82,91,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,82,91,0.1) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(102,0,255,0.2) 0%, transparent 40%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  pointer-events: none;
  z-index: 0;
}
#hero .wrapper { position: relative; z-index: 1; }

/* Tipografía y posición */
.hero-title,
.hero-logo,
.hero-arrow {
  position: absolute;
}
.hero-title {
  top: var(--spacing);
  left: var(--spacing);
  font: 700 7rem 'Syne', sans-serif;
  line-height: 1.1;
  color: var(--color-text-dark);
}
.hero-logo {
  bottom: var(--spacing);
  right: var(--spacing);
  width: 20rem;
}
.hero-arrow {
  bottom: var(--spacing);
  left: var(--spacing);
  width: 2rem;
  transform: rotate(90deg);
  cursor: pointer;
}

/* ===== ABOUT & PORTFOLIO ===== */
#about,
#portfolio {
  position: relative;
  padding: var(--spacing);
  min-height: calc(100vh - 2*var(--spacing));
}
#about { background-color: var(--color-accent); }
#portfolio { background-color: var(--color-bg-light); }

/* Títulos de sección */
.section-title {
  position: absolute;
  top: var(--spacing);
  left: var(--spacing);
  font: 700 2rem 'Syne', sans-serif;
  color: var(--color-primary);
}

/* About: dos columnas o una */
#about .section-content {
  grid-template-columns: repeat(2, 1fr);
  margin-top: calc(2rem + 2*var(--spacing));
}
#about .section-content > :only-child {
  grid-column: 2;
}
.about-logo {
  margin-left: .5rem;
  width: 9rem;
}

/* Portfolio: grid de proyectos */
#portfolio .section-content {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing);
  margin: 2rem auto;
  max-width: 1200px;
  align-items: stretch;
}
.proyecto {
  aspect-ratio: 4/5;
  background: var(--bg-img) center/cover no-repeat;
  border-radius: .5rem;
  overflow: hidden;
  transition: background-image .3s, transform .3s;
}
.proyecto:hover {
  background-image: var(--hover-img);
}
.project-description {
  display: flex;
  flex-direction: column;
}
.project-title {
  font: 700 1.5rem 'Syne', sans-serif;
  margin-bottom: .5rem;
  color: var(--color-primary);
}
.project-description p {
  font: 1rem/1.4 var(--color-text-dark);
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  font: 700 1.5rem 'Syne', sans-serif;
  text-decoration: underline;
  margin-top: auto;
  color: var(--color-text-dark);
  transition: color .3s;
}
.portfolio-link:hover {
  color: var(--color-primary);
}
.link-arrow {
  width: 1.5rem;
  margin-right: .5rem;
}

/* ===== CONTACT & FOOTER ===== */
#contact {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing);
}
#contact .section-title {
  color: #fff;
}
#contact .section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing);
  margin-top: calc(2rem + 2*var(--spacing));
}
.cta {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0;
}
.btn {
  color: #fff;
  font-weight: 500;
  transition: color .3s;
}
.redes {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing)*1.5);
  margin-top: .5rem;
}
.redes .social-icon {
  color: #fff;
  font-size: 2rem;
  transition: transform .2s, color .3s;
}
.btn:hover,
.redes .social-icon:hover {
  transform: translateY(-4px);
  color: var(--color-accent);
}

/* Footer general */
#site-footer {
  background: var(--color-primary);
  color: #fff;
}
#site-footer .wrapper {
  padding: 2rem var(--spacing);
}
.footer-top.wrapper,
.footer-bottom.wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing);
  align-items: center;
}
.footer-top.wrapper {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer-bottom.wrapper {
  padding-top: var(--spacing);
  opacity: .8;
  font-size: .85rem;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: var(--spacing);
}
.footer-brand img {
  width: 4rem;
}
.footer-nav {
  display: flex;
  gap: 1.5rem;
}
.footer-nav a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
}
.footer-right {
  text-align: right;
}
.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing);
}
.footer-socials a {
  color: #fff;
  font-size: 1.25rem;
  transition: color .2s;
}
.footer-socials a:hover {
  color: var(--color-accent);
}
.footer-bottom a {
  color: #fff;
  text-decoration: underline;
}
