@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Lora:wght@500;600&display=swap');

:root {
  --primary: #245447;
  --primary-dark: #173a31;
  --primary-soft: #e8f0ed;
  --accent: #b28a54;
  --accent-soft: #f4eee5;
  --surface: #faf9f6;
  --surface-soft: #f1f3f0;
  --text: #24302c;
  --muted: #68736f;
  --border: #dde2df;
  --danger: #a73f35;
  --danger-soft: #f9e9e6;
  --success: #24704d;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(30, 52, 44, .09);
  --page-max: 1180px;
  --nav-max: 1240px;
}

html { scroll-behavior: smooth; }

body {
  color: var(--text);
  background: var(--surface);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--primary-dark);
  font-family: "Lora", serif;
  font-weight: 600;
  letter-spacing: -.025em;
}

.container { width: min(calc(100% - 48px), var(--page-max)); }

.site-header {
  height: 76px;
  background: rgba(250, 249, 246, .94);
  border-bottom: 1px solid rgba(36, 84, 71, .12);
  backdrop-filter: blur(14px);
}

.navbar { height: 76px; }

.brand {
  gap: 11px;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--primary);
  color: white;
  font-family: "Lora", serif;
  font-size: 1rem;
}

.nav-links { gap: 26px; }
.nav-links a { color: #4f5e58; font-size: .84rem; font-weight: 600; }
.nav-links a:hover { color: var(--primary); }

.btn {
  min-height: 43px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; border-color: #bfc9c4; color: var(--primary-dark); }
.btn-outline:hover { background: #fff; border-color: var(--primary); color: var(--primary); }

.hero {
  padding: 0;
  background:
    radial-gradient(circle at 86% 18%, rgba(178, 138, 84, .13), transparent 28%),
    linear-gradient(180deg, #faf9f6 0%, #f4f5f1 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  min-height: 650px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(45px, 7vw, 90px);
  padding: 72px 0;
  align-items: center;
}

.eyebrow, .section-kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0 20px;
  color: var(--primary-dark);
  font-size: clamp(2.9rem, 5.5vw, 5rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.hero h1 em { color: inherit; font-style: normal; }

.hero-grid > div > p {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions { margin: 28px 0 40px; }

.stat-strip {
  max-width: 700px;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-card {
  padding: 16px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
}

.stat-card strong {
  color: var(--primary);
  font-family: "Lora", serif;
  font-size: 1.65rem;
}

.stat-card span { color: var(--muted); font-size: .76rem; font-weight: 600; }

.hero-panel {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow);
}

.featured-card { border: 0; border-radius: 16px; }

.featured-top {
  min-height: 245px;
  padding: 26px;
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(145deg, rgba(23, 58, 49, .96), rgba(36, 84, 71, .88)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px);
}

.featured-top .tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  font-size: .7rem;
  letter-spacing: .04em;
}

.featured-top h2 {
  max-width: 430px;
  color: white;
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.featured-body { padding: 24px 26px; }
.featured-body p { color: var(--muted); line-height: 1.6; }
.featured-body .mini-list { grid-template-columns: repeat(3, 1fr); }
.featured-body .mini-item { display: block; padding: 12px; background: var(--surface-soft); }
.featured-body .mini-item span { display: block; font-size: .7rem; }
.featured-body .mini-item strong { color: var(--primary); font-size: 1.3rem; }

.section { padding: 92px 0; }
.section:nth-child(odd) { background: #fff; }

.section-heading { margin-bottom: 34px; }
.section-kicker { margin-bottom: 9px; }

.section-heading h2,
.profile-title h2,
.admin-title h2 {
  color: var(--primary-dark);
  font-size: clamp(2rem, 3.5vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.researcher-grid { gap: 20px; }

.researcher-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(30, 52, 44, .055);
  transition: transform .22s ease, box-shadow .22s ease;
}

.researcher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.researcher-cover {
  height: 150px;
  background:
    linear-gradient(135deg, rgba(178,138,84,.2), transparent 55%),
    var(--primary);
  filter: saturate(.78);
}

.researcher-card:nth-child(2) .researcher-cover { background-color: #456175; }
.researcher-card:nth-child(3) .researcher-cover { background-color: #6c594d; }
.researcher-body { padding: 0 22px 23px; }

.avatar {
  width: 88px;
  height: 88px;
  margin-top: -44px;
  border: 4px solid #fff;
  border-radius: 18px;
  background-color: var(--primary-soft);
  box-shadow: 0 8px 24px rgba(30,52,44,.15);
  color: var(--primary);
  font-family: "Lora", serif;
  font-size: 1.7rem;
}

.researcher-card h3 { margin-top: 17px; font-size: 1.45rem; line-height: 1.2; }
.role { margin-top: 5px; color: var(--muted); font-size: .83rem; }
.pill-row { gap: 6px; margin: 14px 0; }

.pill {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
}

.researcher-card .mini-item { padding: 10px 12px; font-size: .78rem; }
.social-btn { border-radius: 10px; background: var(--surface-soft); }
.social-btn:hover { background: var(--primary); }

.publication-layout { border-top: 1px solid var(--border); }
.recent-publications-grid { grid-template-columns: 1fr; gap: 0; }

.publication-card {
  min-height: 100px;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.publication-card:hover { background: linear-gradient(90deg, transparent, rgba(232,240,237,.55), transparent); }
.publication-card h4 { margin-bottom: 5px; font-size: 1.25rem; }
.publication-card span { font-size: .8rem; font-weight: 600; }

.lines-grid { gap: 18px; }

.line-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.line-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: #84643d;
  font-size: .78rem;
}

.line-card h3 { margin-bottom: 9px; font-size: 1.35rem; }
.line-card p { color: var(--muted); font-size: .92rem; line-height: 1.65; }

.footer { padding: 54px 0; background: var(--primary-dark); }
.footer h3 { color: white; font-size: 1.35rem; }
.footer h4 { font-size: 1rem; }
.footer p, .footer a { font-size: .82rem; }

/* Vistas internas */
.profile-view, .login-view, .admin-view { padding: 54px 0 86px; }

.profile-sidebar, .profile-main, .login-card, .admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 36px rgba(30,52,44,.065);
}

.profile-banner { height: 170px; background-color: var(--primary); }
.profile-side-content h1 { font-size: 2rem; }
.profile-main, .admin-card { padding: 27px; }

.bio-box {
  background: var(--surface-soft);
  border-color: var(--border);
  color: #53615b;
  line-height: 1.65;
}

.login-wrap { min-height: calc(100vh - 76px); }
.login-card { width: min(100%, 450px); padding: 34px; }
.login-card h1 { font-size: 2.15rem; letter-spacing: -.035em; }

.field label { color: var(--primary-dark); font-size: .8rem; }
.field input, .field textarea { border-color: #cfd7d3; background: #fff; }
.field input:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36,84,71,.1);
}

.admin-grid { gap: 20px; }
.admin-card h3 { font-size: 1.2rem; }
.empty-state { background: var(--surface-soft); }
.modal-backdrop { background: rgba(23,58,49,.5); }
.modal-card { border-radius: 18px; box-shadow: var(--shadow); }
.modal-header h3 { font-size: 1.35rem; }

@keyframes soft-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-grid > div, .hero-panel {
  opacity: 0;
  animation: soft-reveal .65s ease forwards;
}
.hero-panel { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 980px) {
  .nav-links { top: 76px; background: var(--surface); border-color: var(--border); }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; }
  .hero-panel { max-width: 650px; }
}

@media (max-width: 680px) {
  .container, .site-header .container { width: min(calc(100% - 28px), var(--page-max)); }
  .site-header, .navbar { height: 70px; }
  .brand { font-size: .68rem; }
  .hero-grid { padding: 52px 0 64px; gap: 42px; }
  .hero h1 { font-size: clamp(2.65rem, 12vw, 3.6rem); }
  .hero-grid > div > p { font-size: 1rem; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .featured-top { min-height: 220px; }
  .section { padding: 68px 0; }
  .section-heading h2, .profile-title h2, .admin-title h2 { font-size: 2.15rem; }
  .publication-card { gap: 14px; }
  .login-card { padding: 26px; }
  .profile-main, .admin-card { padding: 21px; }
}

/* Refinamiento visual: jerarquía simple y escala contenida */
.hero-grid {
  min-height: 590px;
}

.hero h1 {
  margin-top: 0;
  font-size: clamp(2.6rem, 4.5vw, 3.85rem);
  line-height: 1.08;
}

.section-heading h2,
.profile-title h2,
.admin-title h2 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
}

.hero-symbol {
  width: min(100%, 440px);
  justify-self: center;
  color: var(--primary);
  opacity: 0;
  animation: soft-reveal .65s ease .12s forwards;
}

.hero-symbol svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.symbol-orbit {
  fill: none;
  stroke: rgba(36, 84, 71, .18);
  stroke-width: 1.5;
}

.symbol-orbit-outer { stroke-dasharray: 5 9; }

.symbol-path {
  fill: rgba(36, 84, 71, .035);
  stroke: rgba(36, 84, 71, .33);
  stroke-width: 2;
}

.symbol-node {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 3;
}

.symbol-node-two { fill: var(--primary-soft); }
.symbol-node-three { fill: var(--accent-soft); stroke: var(--accent); }
.symbol-core { fill: var(--primary); }

.hero-symbol-caption {
  margin-top: -38px;
  text-align: center;
}

.hero-symbol-caption span {
  display: block;
  color: var(--primary-dark);
  font-family: "Lora", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .12em;
}

.hero-symbol-caption small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.researcher-body .avatar {
  position: relative;
  z-index: 3;
}

.profile-stats-grid {
  gap: 14px;
  margin-top: 26px;
  margin-bottom: 30px;
}

.profile-stats-grid + .publication-list {
  margin-top: 8px;
}

.login-view {
  padding: 0;
}

.login-wrap {
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  padding-block: 24px;
}

@media (max-width: 980px) {
  .hero-symbol { max-width: 420px; }
}

@media (max-width: 680px) {
  .hero h1 { font-size: clamp(2.25rem, 10vw, 3rem); }

  .section-heading h2,
  .profile-title h2,
  .admin-title h2 {
    font-size: 1.9rem;
  }

  .login-wrap {
    min-height: calc(100svh - 70px);
    padding-block: 18px;
  }
}
