/* —— Perfiles CV (IT / Developer) · Dark mode —— */
.page-profile {
  --it-bg: #0b1220;
  --it-bg-2: #111a2b;
  --it-panel: rgba(17, 26, 43, 0.88);
  --it-line: rgba(148, 163, 184, 0.18);
  --it-text: #e8eef8;
  --it-muted: #94a3b8;
  --it-accent: #38bdf8;
  --it-accent-2: #22d3ee;
  --it-warm: #fbbf24;
  --it-radius: 1rem;
  color: var(--it-text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    linear-gradient(180deg, #070d18 0%, var(--it-bg) 40%, #0a101c 100%);
}

.page-profile .grain { opacity: 0.04; }

.page-profile .top {
  background: rgba(11, 18, 32, 0.86);
  border-bottom-color: var(--it-line);
  color: var(--it-text);
}

.page-profile .top__brand,
.page-profile .top__nav a {
  color: var(--it-text);
}

.page-profile .top__cta {
  background: var(--it-accent);
  color: #041018 !important;
}

.page-profile .top__menu span {
  background: var(--it-text);
}

.page-profile .profile-bar {
  background: rgba(17, 26, 43, 0.75);
  border-bottom: 1px solid var(--it-line);
  color: var(--it-muted);
}

.page-profile .profile-bar__tag {
  color: var(--it-accent-2);
}

.page-profile .profile-bar a,
.page-profile .profile-bar__pdf {
  color: var(--it-text);
}

.page-profile .foot {
  color: var(--it-muted);
  border-top-color: var(--it-line);
}

.page-profile .btn--primary {
  background: var(--it-accent);
  color: #041018;
}

.page-profile .btn--primary:hover {
  background: #7dd3fc;
}

.page-profile .btn--secondary {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--it-text);
}

.page-profile .btn--ghost {
  color: var(--it-muted);
  border-color: var(--it-line);
}

.page-profile .btn--accent {
  background: rgba(34, 211, 238, 0.15);
  color: var(--it-accent-2);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

/* Hero */
.it-hero {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 1.5rem;
}

.it-hero__grid {
  display: grid;
  grid-template-columns: 1.35fr auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.it-hero__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--it-accent-2);
  font-weight: 600;
}

.it-hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.it-hero__role {
  margin: 0.55rem 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--it-accent);
}

.it-hero__lead {
  margin: 1rem 0 0;
  max-width: 38rem;
  color: var(--it-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.it-hero__meta {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--it-muted);
  font-size: 0.92rem;
}

.it-hero__meta a {
  color: var(--it-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.it-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.it-hero__photo {
  margin: 0;
  width: min(220px, 42vw);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  background: var(--it-bg-2);
}

.it-hero__photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

/* Skills */
.it-skills,
.it-badges,
.it-exp,
.it-projects,
.it-contact {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 0.5rem;
}

.it-skills__head,
.it-badges__head,
.it-exp__head,
.it-projects__head,
.it-contact__head {
  margin-bottom: 1.15rem;
}

.it-skills__head h2,
.it-badges__head h2,
.it-exp__head h2,
.it-projects__head h2,
.it-contact__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.it-skills__head p,
.it-badges__head p,
.it-exp__head p,
.it-projects__head p,
.it-contact__head p {
  margin: 0.35rem 0 0;
  color: var(--it-muted);
}

.it-skills__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.it-skill-card {
  background: var(--it-panel);
  border: 1px solid var(--it-line);
  border-radius: var(--it-radius);
  padding: 1.05rem 1.05rem 1.15rem;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.it-skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.it-skill-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--it-accent-2);
}

.it-skill-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.it-skill-card li {
  font-size: 0.92rem;
  color: rgba(232, 238, 248, 0.88);
  padding-left: 0.85rem;
  position: relative;
}

.it-skill-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--it-accent);
}

/* Badges / logros */
.it-badges__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.it-badge {
  background: linear-gradient(165deg, rgba(56, 189, 248, 0.1), rgba(17, 26, 43, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--it-radius);
  padding: 1.1rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.it-badge:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.5);
}

.it-badge__kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--it-warm);
  font-weight: 700;
}

.it-badge h3 {
  margin: 0.45rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.25;
}

.it-badge p {
  margin: 0;
  color: var(--it-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Accordion experiencia */
.it-exp__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.it-exp__toggle-all {
  appearance: none;
  border: 1px solid var(--it-line);
  background: transparent;
  color: var(--it-muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.it-exp__toggle-all:hover {
  color: var(--it-text);
  border-color: rgba(56, 189, 248, 0.4);
}

.it-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.it-acc {
  background: var(--it-panel);
  border: 1px solid var(--it-line);
  border-radius: var(--it-radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.it-acc[open] {
  border-color: rgba(56, 189, 248, 0.4);
}

.it-acc__summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.2rem;
  position: relative;
  padding-right: 2.75rem;
}

.it-acc__summary::-webkit-details-marker {
  display: none;
}

.it-acc__summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  border: 1px solid var(--it-line);
  display: grid;
  place-items: center;
  color: var(--it-accent);
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease;
}

.it-acc[open] .it-acc__summary::after {
  content: "–";
  background: rgba(56, 189, 248, 0.12);
}

.it-acc__when {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--it-muted);
}

.it-acc__role {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
}

.it-acc__org {
  color: var(--it-accent-2);
  font-size: 0.95rem;
}

.it-acc__body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid transparent;
  animation: it-acc-in 0.28s ease;
}

.it-acc[open] .it-acc__body {
  border-top-color: var(--it-line);
  padding-top: 0.95rem;
}

.it-acc__intro {
  margin: 0 0 0.75rem;
  color: var(--it-muted);
}

.it-acc__body ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  color: rgba(232, 238, 248, 0.9);
}

@keyframes it-acc-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Proyectos */
.it-projects__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.it-project {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-radius: var(--it-radius);
  border: 1px solid var(--it-line);
  background: var(--it-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.it-project:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.it-project h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.it-project p {
  margin: 0;
  color: var(--it-muted);
  max-width: 40rem;
}

/* Contacto */
.it-contact {
  padding-bottom: 2.5rem;
}

.it-contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.it-contact__chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--it-radius);
  border: 1px solid var(--it-line);
  background: var(--it-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.it-contact__chip:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.it-contact__chip strong {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--it-muted);
  font-weight: 600;
}

.it-contact__chip span {
  font-weight: 600;
  color: var(--it-text);
  word-break: break-word;
}

.it-contact__pdf {
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 980px) {
  .it-skills__grid,
  .it-badges__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .it-hero__grid {
    grid-template-columns: 1fr;
  }

  .it-hero__photo {
    width: 140px;
    order: -1;
  }

  .it-skills__grid,
  .it-badges__grid,
  .it-contact__grid {
    grid-template-columns: 1fr;
  }

  .it-project {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* PDF export */
body.is-pdf-export.page-profile {
  background: #fff !important;
  color: #15202b;
}

body.is-pdf-export.page-profile .it-skill-card,
body.is-pdf-export.page-profile .it-badge,
body.is-pdf-export.page-profile .it-acc,
body.is-pdf-export.page-profile .it-project,
body.is-pdf-export.page-profile .it-contact__chip {
  background: #fff;
  border-color: rgba(21, 32, 43, 0.12);
  box-shadow: none;
}

body.is-pdf-export.page-profile .it-hero__role,
body.is-pdf-export.page-profile .it-skill-card h3,
body.is-pdf-export.page-profile .it-acc__org,
body.is-pdf-export.page-profile .profile-bar__tag {
  color: #0369a1 !important;
}

body.is-pdf-export.page-profile .it-hero__lead,
body.is-pdf-export.page-profile .it-muted,
body.is-pdf-export.page-profile .it-acc__when,
body.is-pdf-export.page-profile .it-badge p,
body.is-pdf-export.page-profile .it-project p {
  color: #475569 !important;
}
