/* ============================================================
   jsmnl — minimal links page
   Paleta: #f4f4f4 (claro) · #1c1c1c (oscuro) · acento salvia
   ============================================================ */

:root {
  --bg: #f4f4f4;
  --fg: #1c1c1c;
  --muted: #1c1c1c99;
  --accent: #6f8264; /* verde salvia */
  --line: #1c1c1c1f;
  --hover-bg: #6f826412;
}

[data-theme="dark"] {
  --bg: #1c1c1c;
  --fg: #f4f4f4;
  --muted: #f4f4f499;
  --accent: #a3b596; /* salvia más claro para contraste */
  --line: #f4f4f424;
  --hover-bg: #a3b59614;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---- Toggle de tema ---- */
#theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

/* ---- Tarjeta central ---- */
.card {
  width: 100%;
  max-width: 26rem;
  text-align: center;
  animation: fade-up 0.6s ease both;
}

.head {
  margin-bottom: 2.5rem;
}

.name {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.name::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin: 1rem auto 0;
  background: var(--accent);
  border-radius: 2px;
}

.tagline {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---- Links ---- */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  background: transparent;
  opacity: 0;
  animation: fade-up 0.5s ease forwards;
  transition: border-color 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

.link:hover,
.link:focus-visible {
  border-color: var(--accent);
  background: var(--hover-bg);
  transform: translateY(-2px);
  outline: none;
}

.link svg,
.link .dot {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
}

.link .label {
  flex: 1;
  text-align: left;
}

.link .arrow {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link:hover .arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ---- Footer ---- */
.foot {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Animación ---- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .link {
    opacity: 1;
  }
}
