/* ════════════════════════════════════════════════════════════
   In2Lab Academic — stylesheet
   Inspired by uwsampa/research-group-web.
   Palette: Universidad de Antioquia official colors.

   UdeA green scale:
     --green-dark:  #026937   primary (nav bg, headings, borders)
     --green-mid:   #35944b   hover states, section accents
     --green-light: #43b649   decorative highlights
     --green-lime:  #8dc63f   badges / pills (use sparingly)

   UdeA teal scale:
     --teal-light:  #3ebdac   accent stripe, section headings underline
     --teal-mid:    #069a7e   link color
     --teal-dark:   #0e7774   visited / subdued links
   ════════════════════════════════════════════════════════════ */

/* ── COLOR TOKENS ─────────────────────────────────────────── */
:root {
  --green-dark:  #026937;
  --green-mid:   #35944b;
  --green-light: #43b649;
  --green-lime:  #8dc63f;
  --teal-light:  #3ebdac;
  --teal-mid:    #069a7e;
  --teal-dark:   #0e7774;

  /* Derived surfaces */
  --bg-nav:      var(--green-dark);
  --border-nav:  var(--teal-light);
  --link:        var(--teal-dark);
  --link-hover:  var(--green-mid);
  --heading-accent: var(--green-dark);
  --section-rule: var(--teal-light);
  --person-accent: var(--green-dark);
  --person-role-color: var(--teal-dark);
  --pill-bg:     #eef8f1;
  --pill-border: #a8d8b4;
  --pill-text:   var(--green-dark);
  --footer-bg:   var(--green-dark);
  --stat-color:  var(--teal-dark);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: .5rem;
  color: #111;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.75rem; }
h3 { font-size: 1.15rem; margin-top: 1.25rem; }
h4 { font-size: .95rem; }

p { margin-bottom: .9rem; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
ul, ol { padding-left: 1.4rem; margin-bottom: .9rem; }
li { margin-bottom: .25rem; }
hr { border: none; border-top: 1px solid #ddd; margin: 1.5rem 0; }
img { max-width: 100%; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.row { display: flex; flex-wrap: wrap; gap: 0; margin: 0 -12px; }
.col { padding: 0 12px; flex: 1 1 0; min-width: 0; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; padding: 0 12px; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 12px; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 12px; }

@media (max-width: 700px) {
  .col, .col-8, .col-4, .col-6 {
    flex: 0 0 100%; max-width: 100%;
  }
}

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  background: var(--bg-nav);
  border-bottom: 3px solid var(--border-nav);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 52px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand img {
  height: 1.9rem;
  width: auto;
  background: #fff;
  border-radius: 3px;
  padding: 2px 5px;
}
.navbar-nav {
  display: flex;
  list-style: none;
  gap: .1rem;
  margin-left: auto;
  align-items: center;
  padding: 0;
}
.navbar-nav a {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  padding: .35rem .7rem;
  border-radius: 3px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.navbar-nav a:hover,
.navbar-nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}
.navbar-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  padding: .25rem .5rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: auto;
}
@media (max-width: 640px) {
  .navbar-toggle { display: block; }
  .navbar-nav {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-nav);
    padding: .5rem 1rem 1rem;
    gap: .15rem;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { border-radius: 3px; }
}

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  background: #f5f9f6;
  border-bottom: 1px solid #c8e0cc;
  padding: 2rem 0 1.5rem;
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--green-dark);
}
.page-header .lead {
  color: #555;
  font-size: 1rem;
  margin: .4rem 0 0;
}

/* ── HOME BANNER ──────────────────────────────────────────── */
.home-banner {
  background: #f5f9f6;
  border-bottom: 1px solid #c8e0cc;
  padding: 2.25rem 0;
}
.home-banner .group-name {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: .3rem;
}
.home-banner .group-tagline {
  color: #444;
  font-size: 1rem;
  margin: 0;
}
.home-banner .group-meta {
  margin-top: .6rem;
  font-size: .85rem;
  color: #666;
}
.home-banner .group-meta a { color: var(--teal-dark); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
  padding: 2rem 0 3rem;
}

/* ── SECTION HEADING ──────────────────────────────────────── */
.section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
  border-bottom: 2px solid var(--teal-light);
  padding-bottom: .3rem;
  margin-bottom: 1.1rem;
  margin-top: 0;
}

/* ── NEWS ─────────────────────────────────────────────────── */
.news-list { list-style: none; padding: 0; }
.news-list li {
  display: flex;
  gap: .75rem;
  align-items: baseline;
  margin-bottom: .7rem;
  font-size: .9rem;
  line-height: 1.4;
}
.news-date {
  white-space: nowrap;
  color: #888;
  font-size: .8rem;
  min-width: 80px;
}

/* ── RESEARCH LINES ───────────────────────────────────────── */
.research-list { list-style: none; padding: 0; }
.research-item {
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.research-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.research-body h4 { font-size: .95rem; margin-bottom: .2rem; color: var(--green-dark); }
.research-body p { font-size: .85rem; color: #555; margin: 0; line-height: 1.45; }

/* ── PEOPLE ───────────────────────────────────────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.person-card {
  border: 1px solid #d4e8d8;
  border-radius: 4px;
  padding: 1rem;
  background: #fafcfb;
}
.person-card.coordinator {
  border-color: var(--green-dark);
  border-width: 2px;
  background: #fff;
}
.person-name {
  font-size: .92rem;
  font-weight: 700;
  color: #111;
  margin-bottom: .15rem;
  line-height: 1.3;
}
.person-role {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--teal-dark);
  margin-bottom: .35rem;
}
.person-degree {
  font-size: .8rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: .35rem;
}
.person-affil {
  font-size: .75rem;
  color: #888;
  margin-bottom: .5rem;
}
.person-links {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid #d4e8d8;
}
.person-link {
  font-size: .73rem;
  color: var(--green-dark);
  padding: .12rem .4rem;
  border: 1px solid var(--pill-border);
  border-radius: 3px;
  background: var(--pill-bg);
  transition: background .12s, color .12s;
  text-decoration: none;
}
.person-link:hover {
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
}
.person-link.unavailable {
  color: #bbb;
  border-color: #e0e0e0;
  background: #f7f7f7;
  border-style: dashed;
  pointer-events: none;
}

/* ── QUICK STATS ──────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.stat-box {
  text-align: center;
  min-width: 70px;
}
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--stat-color);
  line-height: 1;
}
.stat-label {
  font-size: .73rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── INFO TABLE ───────────────────────────────────────────── */
.info-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.info-table th, .info-table td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}
.info-table th {
  color: #888;
  font-weight: 500;
  white-space: nowrap;
  width: 38%;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar-logo {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: .75rem;
  border: 1px solid #d4e8d8;
  border-radius: 4px;
  background: #fafcfb;
}
.sidebar-logo img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
}

/* ── NEWS POST PAGE ───────────────────────────────────────── */
.post-meta { color: #888; font-size: .85rem; margin-bottom: 1.25rem; }
.post-body p:last-child { margin-bottom: 0; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,.65);
  font-size: .82rem;
  padding: 1.5rem 0;
  margin-top: 3rem;
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
footer a { color: rgba(255,255,255,.8); }
footer a:hover { color: #fff; text-decoration: none; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════
   TAG SYSTEM
   ══════════════════════════════════════════════════════════ */

/* Base pill */
.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: .15rem .45rem;
  border-radius: 3px;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
  cursor: default;
  border: 1px solid transparent;
  transition: opacity .12s, box-shadow .12s;
}
/* When used as filter buttons */
button.tag {
  cursor: pointer;
  appearance: none;
  font-family: inherit;
}
button.tag:hover { opacity: .8; }
button.tag.tag-active {
  box-shadow: 0 0 0 2px currentColor;
}

.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .4rem;
}

/* ── Research line tags (solid, green family) ─────────────── */
.tag-line { color: #fff; }

.tag-ml       { background: #026937; border-color: #026937; color: #0d2b0e;}
.tag-data     { background: #35944b; border-color: #35944b; color: #0d2b0e;}
.tag-governance   { background: #43b649; border-color: #43b649; color: #0d2b0e;}
.tag-digtrans { background: #0e7774; border-color: #0e7774; color: #fff;}
.tag-software {
  background: #8dc63f;
  border-color: #8dc63f;
  color: #1a2800;
  font-weight: 700;
}
.tag-security { background: #069a7e; border-color: #069a7e; color: #0d2b0e;}
.tag-decision { background: #0e7774; border-color: #0e7774; color: #0d2b0e;}

/* ── Application area tags (outlined, teal family) ────────── */
.tag-area {
  background: #f0faf8;
  color: #0e7774;
  border-color: #3ebdac;
}
.tag-area:hover { background: #d8f5f0; }
button.tag-area.tag-active { background: #3ebdac; color: #fff; }

/* ── Product type tags (solid, neutral family) ────────────── */
.tag-product {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}
.tag-product:hover { background: #4b5563; border-color: #4b5563; }
button.tag-product.tag-active { background: #374151; border-color: #374151; color: #fff; }

/* Specific area overrides (subtle tint differences) */
.tag-healthcare      { border-color: #069a7e; color: #069a7e; }
.tag-industry        { border-color: #0e7774; color: #0e7774; }
.tag-education       { border-color: #35944b; color: #35944b; background: #f0faf3; }
.tag-cyberdef        { border-color: #026937; color: #026937; background: #f0f8f2; }
.tag-vision          { border-color: #3ebdac; color: #0e7774; }
.tag-speech          { border-color: #43b649; color: #2a6b2d; background: #f3faf0; }
.tag-agriculture     { border-color: #8dc63f; color: #3a5c00; background: #f9fce8; }
.tag-finance         { border-color: #0e7774; color: #0e4040; }

/* ── FILTER BAR ───────────────────────────────────────────── */
.filter-bar {
  background: #f5f9f6;
  border: 1px solid #c8e0cc;
  border-radius: 4px;
  padding: .9rem 1rem;
  margin-bottom: 1.5rem;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .55rem;
  flex-wrap: wrap;
}
.filter-row:last-of-type { margin-bottom: 0; }
.filter-label {
  font-size: .72rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  min-width: 100px;
  padding-top: .18rem;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.filter-status {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .65rem;
  padding-top: .6rem;
  border-top: 1px solid #d4e8d8;
  font-size: .82rem;
  color: #666;
}
.filter-count { font-style: italic; }
.filter-clear {
  background: none;
  border: 1px solid #aaa;
  border-radius: 3px;
  padding: .12rem .5rem;
  font-size: .75rem;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: background .1s;
}
.filter-clear:hover { background: #eee; }

/* Type filter row (publications page) */
.type-filter-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.type-btn {
  background: none;
  border: 1px solid #c8e0cc;
  border-radius: 3px;
  padding: .2rem .55rem;
  font-size: .78rem;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.type-btn:hover, .type-btn.active {
  background: #026937;
  color: #fff;
  border-color: #026937;
}

/* ── PUBLICATIONS ─────────────────────────────────────────── */
.pub-year-group { margin-bottom: 1.75rem; }
.pub-year {
  font-size: 1.1rem;
  font-weight: 700;
  color: #026937;
  border-bottom: 2px solid #3ebdac;
  padding-bottom: .25rem;
  margin-bottom: .9rem;
  margin-top: 0;
}
.pub-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #eee;
}
.pub-item:last-child { border-bottom: none; }
.pub-main { flex: 1; min-width: 0; }
.pub-title { font-weight: 600; color: #111; font-size: .92rem; margin-bottom: .2rem; }
.pub-title a { color: #0e7774; }
.pub-title a:hover { color: #026937; }
.pub-authors { font-size: .83rem; color: #555; margin-bottom: .2rem; }
.pub-venue { font-size: .82rem; color: #777; margin-bottom: .3rem; }
.pub-links {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex-shrink: 0;
  min-width: 60px;
}
.pub-link {
  font-size: .75rem;
  color: #026937;
  padding: .15rem .45rem;
  border: 1px solid #a8d8b4;
  border-radius: 3px;
  background: #eef8f1;
  white-space: nowrap;
  text-align: center;
  transition: background .12s;
  text-decoration: none;
}
.pub-link:hover { background: #026937; color: #fff; text-decoration: none; }

/* Publication type badge */
.pub-type-badge {
  display: inline-block;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .1rem .35rem;
  border-radius: 2px;
  margin-right: .35rem;
}
.pub-type-journal    { background: #026937; color: #fff; }
.pub-type-conference { background: #069a7e; color: #fff; }
.pub-type-software   { background: #8dc63f; color: #1a2800; }
.pub-type-patent     { background: #0e7774; color: #fff; }
.pub-type-book-chapter { background: #35944b; color: #fff; }
.pub-type-preprint   { background: #6b7280; color: #fff; }

/* ── PROJECTS ─────────────────────────────────────────────── */
.project-item {
  border: 1px solid #c8e0cc;
  border-left: 4px solid #026937;
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fafcfb;
}
.project-item-completed {
  border-left-color: #8dc63f;
  background: #f8f8f8;
  opacity: .85;
}
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .25rem;
}
.project-title {
  font-weight: 700;
  font-size: .95rem;
  color: #111;
}
.project-title a { color: #0e7774; }
.project-status {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .45rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-active    { background: #026937; color: #fff; }
.status-completed { background: #e0e0e0; color: #555; }
.project-meta { font-size: .8rem; color: #888; margin-bottom: .5rem; }
.project-desc { font-size: .88rem; color: #444; margin-bottom: .45rem; line-height: 1.5; }
.project-people { font-size: .8rem; color: #555; margin-top: .45rem; }

/* ── STUDENTS ─────────────────────────────────────────────── */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.student-card {
  border: 1px solid #c8e0cc;
  border-radius: 4px;
  padding: .9rem 1rem;
  background: #fafcfb;
}
.student-name {
  font-weight: 700;
  font-size: .9rem;
  color: #111;
  margin-bottom: .2rem;
  line-height: 1.3;
}
.student-meta {
  font-size: .75rem;
  color: #888;
  margin-bottom: .25rem;
}
.student-topic {
  font-size: .82rem;
  color: #444;
  font-style: italic;
  margin-bottom: .4rem;
  line-height: 1.4;
}
.student-links {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid #d4e8d8;
}

/* ── ALUMNI TABLE ─────────────────────────────────────────── */
.alumni-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.alumni-table th {
  background: #f5f9f6;
  padding: .5rem .75rem;
  border-bottom: 2px solid #c8e0cc;
  text-align: left;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}
.alumni-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  line-height: 1.4;
}
.alumni-table tr:last-child td { border-bottom: none; }
.alumni-table em { color: #555; }
.degree-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.degree-phd { background: #026937; color: #fff; }
.degree-msc { background: #069a7e; color: #fff; }
.degree-bsc { background: #8dc63f; color: #1a2800; }

@media (max-width: 640px) {
  .alumni-table th:nth-child(4),
  .alumni-table td:nth-child(4) { display: none; }
  .pub-item { flex-direction: column; }
  .pub-links { flex-direction: row; }
}
