:root {
  color-scheme: dark;
  --page: #101311;
  --surface: #171b18;
  --surface-raised: #1d231f;
  --glass: rgb(29 35 31 / 72%);
  --text: #f1f3ef;
  --muted: #a4ada5;
  --line: #303832;
  --accent: #b8ef6b;
  --accent-ink: #17200f;
  --content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background-color: var(--page);
  background-image:
    linear-gradient(rgb(16 19 17 / 91%), rgb(16 19 17 / 94%)),
    url("images/guitar.jpg");
  background-position: center, center 38%;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.15;
}

h1 {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  letter-spacing: 0;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(16 19 17 / 82%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

header nav {
  max-width: var(--content-width);
  margin: 0 auto;
}

header nav ul {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.75rem 1.5rem;
  list-style: none;
}

nav a,
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

nav a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

nav a:hover,
footer a:hover {
  color: var(--accent);
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem;
}

#hero {
  position: relative;
  display: flex;
  min-height: min(76vh, 760px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

#hero::before {
  position: absolute;
  top: 50%;
  right: 4%;
  width: min(28vw, 340px);
  aspect-ratio: 1;
  border: 1px solid rgb(184 239 107 / 18%);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  margin-left: 0;
  color: var(--text);
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#hero p {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 1.1rem;
}

#hero p:first-of-type {
  color: var(--accent);
}

#hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 2rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

#hero a:hover {
  background: transparent;
  color: var(--accent);
}

.hero-link span {
  margin-left: 0.5rem;
}

main > section:not(#hero) {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 5rem;
}

main > section:not(#hero) h2::after {
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 0.75rem;
  background: var(--accent);
  content: "";
}

#sobre-mi > p {
  max-width: 720px;
  color: var(--muted);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  align-items: start;
  column-gap: 2rem;
  row-gap: 1.5rem;
}

.perfil {
  display: grid;
  grid-row: span 2;
  justify-items: start;
  gap: 1rem;
  margin: 0;
}

.perfil img {
  display: block;
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.perfil figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.about-copy {
  max-width: 720px;
  color: var(--muted);
}

.guitar-figure {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.guitar-figure img {
  width: 96px;
  height: 96px;
  border: 1px solid rgb(184 239 107 / 35%);
  border-radius: 6px;
  object-fit: cover;
  object-position: center 42%;
  box-shadow: 0 8px 28px rgb(0 0 0 / 28%);
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.skill-group {
  padding: 1.5rem;
  border: 1px solid rgb(164 173 165 / 14%);
  border-radius: 6px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.skill-group h3 {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.habilidades-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.galeria {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.galeria .card {
  min-height: 190px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 180ms ease, transform 180ms ease;
}

.galeria .card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.card p {
  color: var(--muted);
}

.card strong {
  color: var(--text);
}

.formulario {
  display: grid;
  gap: 0.65rem;
  max-width: 560px;
}

.formulario label {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.formulario input,
.formulario textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgb(23 27 24 / 82%);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.formulario input:focus,
.formulario textarea:focus {
  border-color: var(--accent);
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.form-note {
  min-height: 1.65em;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-note[data-state="success"] {
  color: var(--accent);
}

.form-note[data-state="error"] {
  color: #ff9a8b;
}

.button {
  justify-self: start;
  min-height: 46px;
  margin-top: 0.75rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.button:hover {
  background: transparent;
  color: var(--accent);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

footer {
  margin-top: 0;
  padding: 3rem 2rem 1.25rem;
  background: #0c0f0d;
}

.footer-contenido {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer-columna h2,
.footer-columna h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1.05rem;
}

.footer-columna p,
.footer-columna li {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-columna ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copyright {
  max-width: var(--content-width);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 760px) {
  #hero::before {
    display: none;
  }

  .container {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  header nav ul {
    justify-content: center;
    gap: 0;
    padding: 0.5rem;
  }

  nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.82rem;
  }

  #hero {
    min-height: 0;
    padding: 3.5rem 0 3rem;
  }

  #hero::before {
    top: 18%;
    right: 4%;
    width: 38vw;
    transform: none;
  }

  #hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  #hero p {
    font-size: 1rem;
  }

  main > section:not(#hero) {
    padding: 3.75rem 0;
  }

  .galeria {
    grid-template-columns: 1fr;
  }

  .skills-groups {
    grid-template-columns: 1fr;
  }

  .footer-contenido {
    grid-template-columns: 1fr 1fr;
  }

  .footer-columna:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .perfil {
    grid-row: auto;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 1rem;
  }

  .perfil img {
    width: 80px;
  }

  .guitar-figure {
    grid-column: 1;
  }

  .footer-contenido {
    grid-template-columns: 1fr;
  }

  .footer-columna:first-child {
    grid-column: auto;
  }
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease var(--reveal-delay, 0ms), transform 600ms ease var(--reveal-delay, 0ms);
}

.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}
