:root {
  --primary: #102757;     /* deep navy */
  --accent: #10bcbe;      /* teal */
  --soft: #e9f7f8;        /* soft cyan */
  --warm: #f3b7a6;        /* subtle coral */
  --bg: #f9fbfc;
  --text: #16181d;
  --muted: #5e6673;
  --border: #e4e8ee;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* Layout */

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 300px;
  padding: 26px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.identity-block h1 {
  margin: 0 0 4px 0;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.lang-btn.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Ensure consistent spacing between meta info and navigation */
.sidebar .meta-block:last-of-type {
  margin-bottom: 22px;
}

/* Meta info */

.meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.meta p {
  margin: 0 0 10px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.meta strong {
  display: block;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.meta a {
  color: var(--primary);
  text-decoration: none;
}

.meta a:hover {
  text-decoration: underline;
}

/* Nav */

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
}

.nav a:hover {
  background: var(--soft);
}

.nav a.active {
  background: rgba(16, 188, 190, 0.12);
  font-weight: 700;
}

/* Content */

.content {
  flex: 1;
  padding: 54px 64px;
  max-width: 980px;
}

.section {
  margin-bottom: 44px;
}

.section h2 {
  margin: 0 0 14px 0;
  color: var(--primary);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

/* Cards */

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--accent);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

/* Lists */

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin: 6px 0;
}

/* Footer */

.footer {
  margin-top: 60px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Language blocks */

.en, .es {
  display: none;
}

/* Link wrapping */

a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Mobile */

@media (max-width: 940px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 18px 18px;
  }

  .content {
    padding: 28px 22px;
  }
}

/* Affiliations block — consistent across all pages */
.meta p {
  line-height: 1.35;
  margin-bottom: 12px;
}

.meta p strong {
  display: block;
  margin-bottom: 4px;
}

/* Control spacing between affiliation lines */
.meta p br {
  display: block;
  margin-bottom: 2px;
}

/* Tighten space immediately after the Affiliations label */
.meta p strong + br {
  margin-bottom: 0;
}

/* Remove extra bottom gap ONLY for the Affiliations paragraph */
.meta p:has(strong:contains("Affiliations")) {
  margin-bottom: 0;
}

/* Meta blocks (Location, Email, ORCID, Affiliations) */
.meta-block {
  margin-bottom: 12px;
  line-height: 1.35;
}

.meta-block strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.meta-block span {
  display: block;
  margin: 0;
  padding: 0;
}
