/* ============================================================
   HELY-WEBSITE — Personal academic site styles
   Nord-inspired palette · Inter typography
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --color-primary:   #2E3440;
  --color-secondary: #5E81AC;
  --color-accent:    #88C0D0;
  --color-success:   #A3BE8C;
  --color-muted:     #6B7280;

  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'Fira Code', monospace;

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
}

#title-block-header {
  display: none;
}

.page-layout-full .page-columns,
.column-page { max-width: 900px; margin: 0 auto; }

/* ── Hero / Perfil ─────────────────────────────────────────── */
.hero-section {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid #E5E9F0;
  margin-bottom: 3rem;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow: var(--shadow-md);
}

.hero-photo .avatar-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5E81AC 0%, #88C0D0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.hero-content .hero-name {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  line-height: 1.2;
}

.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  border: none;
  padding: 0;
}

.hero-content .role {
  font-size: 1.1rem;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.hero-content .institution {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.hero-content .research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag {
  background: #ECEFF4;
  color: #3B4252;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #D8DEE9;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero-links a.btn-primary {
  background: var(--color-secondary);
  color: white;
  border: 1px solid var(--color-secondary);
}
.hero-links a.btn-primary:hover { background: #4a6a96; }

.hero-links a.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid #D8DEE9;
}
.hero-links a.btn-outline:hover {
  background: #ECEFF4;
  border-color: var(--color-secondary);
}

/* ── Secciones colapsables ───────────────────────────────────── */
.site-section {
  border: none;
  margin-bottom: 1.25rem;
}

.site-section summary.section-title {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.site-section summary.section-title::-webkit-details-marker,
.site-section summary.section-title::marker {
  display: none;
}

.site-section summary.section-title::after {
  content: '▾';
  font-size: 1rem;
  color: var(--color-secondary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
  line-height: 1;
}

.site-section:not([open]) summary.section-title::after {
  transform: rotate(-90deg);
}

.site-section-body {
  padding-top: 0.25rem;
}

.profile-extended {
  border: 1px solid #E5E9F0;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  background: #FAFBFC;
}

.profile-extended summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  list-style: none;
}

.profile-extended summary::-webkit-details-marker,
.profile-extended summary::marker {
  display: none;
}

.profile-extended-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

.profile-extended-body p {
  margin-bottom: 0.75rem;
}

.about-highlights {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.5;
}

.about-more {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.about-more a {
  color: var(--color-secondary);
}

/* ── Secciones ─────────────────────────────────────────────── */
.pub-footer {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.pub-footer {
  margin-bottom: 0;
  margin-top: 0.5rem;
}

/* ── Secciones ─────────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: 1.75rem;
}

/* ── Sobre mí ──────────────────────────────────────────────── */
.about-section {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.about-section .section-title {
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
  color: var(--color-primary);
}

.about-section > p {
  margin-bottom: 1.1rem;
  max-width: 68ch;
  color: var(--color-primary);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.about-card {
  border: 1px solid #E5E9F0;
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  background: #FAFBFC;
  box-shadow: var(--shadow-sm);
}

.about-card .about-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.about-card .about-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.about-card .about-desc {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.45;
}

a.about-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a.about-card-link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.about-section .callout {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.about-section .callout .callout-title {
  font-size: 0.9rem;
}

/* ── Publicaciones ─────────────────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #E5E9F0;
  background: #FAFBFC;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.pub-card:hover { box-shadow: var(--shadow-md); }

.pub-card .pub-title,
.pub-card .pub-authors,
.pub-card .pub-journal {
  margin-bottom: 0.25rem;
}

.pub-card .pub-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.pub-card .pub-authors {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

.pub-card .pub-journal {
  font-size: 0.875rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.pub-card .pub-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pub-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
}
.pub-badge.doi  { background: #DBEAFE; color: #1E40AF; }
.pub-badge.pdf  { background: #FEE2E2; color: #991B1B; }
.pub-badge.code { background: #D1FAE5; color: #065F46; }

/* ── Proyectos / Cursos ────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.project-card {
  border: 1px solid #E5E9F0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.project-card .project-icon {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.project-card .project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.project-card .project-desc {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.5;
  flex: 1;
}

.project-card .project-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
}
.project-card .project-status.live   { background: #D1FAE5; color: #065F46; }
.project-card .project-status.wip    { background: #FEF3C7; color: #92400E; }
.project-card .project-status.future { background: #EDE9FE; color: #5B21B6; }

.project-card-featured {
  border-color: var(--color-secondary);
  background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
}

.project-card-featured .project-title {
  color: var(--color-secondary);
}

.project-card-static {
  cursor: default;
}

.project-card-static:hover {
  transform: none;
}

.docencia-intro {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-primary);
  margin: -0.5rem 0 1.25rem;
  max-width: 68ch;
}

/* ── Contacto ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid #E5E9F0;
  border-radius: var(--radius-lg);
  background: #FAFBFC;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.contact-card:hover {
  background: #ECEFF4;
  border-color: var(--color-secondary);
  text-decoration: none;
  color: var(--color-secondary);
}
.contact-card .contact-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-card .contact-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-card .contact-value {
  font-size: 0.9rem;
}

/* ── Dark mode overrides ───────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .tag          { background: #3B4252; color: #D8DEE9; border-color: #4C566A; }
  .pub-card     { background: #2E3440; border-color: #3B4252; }
  .about-card   { background: #2E3440; border-color: #3B4252; }
  .profile-extended { background: #2E3440; border-color: #3B4252; }
  .project-card { background: #2E3440; border-color: #3B4252; }
  .project-card-featured {
    background: linear-gradient(135deg, #2E3440 0%, #3B5068 100%);
    border-color: #5E81AC;
  }
  .contact-card { background: #2E3440; border-color: #3B4252; color: #D8DEE9; }
  .contact-card:hover { background: #3B4252; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 0;
  }
  .about-grid    { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
}
