/* ===== Variables de color / tema ===== */
:root {
  --bg: #020617;
  --bg-alt: #020818;
  --card-bg: #020617;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.18);
  --shadow-strong: 0 18px 35px rgba(0, 0, 0, 0.5);
  --radius-lg: 0.9rem;
}

/* ===== Reset básico ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 55%);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Enlaces ===== */
a {
  color: inherit;
}

/* ===== Contenedor ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
  z-index: 50;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f97316, #7c2d12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1120;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9),
    0 0 40px rgba(249, 115, 22, 0.45);
}

.brand__name {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== Main padding (por nav fija) ===== */
main {
  padding-top: 4.5rem;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(249, 115, 22, 0.45);
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  line-height: 1.1;
}

.hero__subtitle {
  color: var(--text-muted);
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: linear-gradient(120deg, #f97316, #fb923c);
  color: #0b1120;
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.45);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero__card {
  background: radial-gradient(circle at top left, #0b1120, #020617);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
}

.hero__card h2 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.hero__card ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__card li + li {
  margin-top: 0.3rem;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.hero__tags span {
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  padding: 0.25rem 0.8rem;
  color: var(--text-muted);
}

/* ===== Secciones genéricas ===== */
.section {
  padding: 3rem 0;
}

.section--alt {
  background: radial-gradient(circle at top left, #020617, #020617);
}

.section__header {
  margin-bottom: 1.8rem;
}

.section__header h2 {
  font-size: 1.6rem;
}

.section__subtitle {
  color: var(--text-muted);
  max-width: 32rem;
}

.section__inner {
  display: flex;
  gap: 2rem;
}

.section__inner--split {
  align-items: flex-start;
  justify-content: space-between;
}

/* ===== Sobre mí ===== */
.about__highlights {
  display: grid;
  gap: 0.8rem;
  min-width: 240px;
}

.highlight {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 0.9rem;
  background: rgba(15, 23, 42, 0.8);
}

.highlight__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ===== Grid general / proyectos ===== */
.grid {
  display: grid;
  gap: 1.5rem;
}

.projects__grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
}

/* ===== Proyectos ===== */
.project h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.project p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.project__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.project__links a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.project__links a:hover {
  text-decoration: underline;
}

/* ===== Stack / tecnologías ===== */
.stack__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.stack__group h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.25rem 0.8rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.9);
}

/* ===== Contacto ===== */
.contact__panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 260px;
}

.contact__item {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: rgba(15, 23, 42, 0.9);
  transition: border-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.contact__item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.45);
}

.contact__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact__value {
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: #020617;
  padding: 1rem 0 1.5rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__side {
    order: -1;
  }

  .section__inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav__links {
    font-size: 0.85rem;
  }
}
