/* site.css — shared stylesheet of www.ugr.es/~rcamino (Phase 2, 2026-07-16).
   Design system: simple academic look. UGR red as *text* accent (never as
   background slabs), one system font stack, light-gray info boxes, standard
   blue links. See docs/phase2-plan.md. */

:root {
  --accent: #b00610;        /* UGR red, slightly deepened for text use */
  --accent-dark: #8f0007;
  --text: #333;
  --muted: #666;
  --box-bg: #f5f5f5;
  --border: #ddd;
  --link: #0b5aa5;
}

/* ---------- base ---------- */

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- page skeleton ---------- */

.home-link {
  font-size: 0.85rem;
  margin: 0 0 4px;
}

.home-link a {
  color: var(--muted);
  text-decoration: none;
}

.home-link a:hover {
  color: var(--accent);
}

h1.page-title {
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.25;
  margin: 6px 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 6px 0 24px;
}

h2 {
  color: var(--accent-dark);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 10px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

/* ---------- components ---------- */

/* light info box (replaces colored table banners / bgcolor cells) */
.box {
  background: var(--box-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}

.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }

/* centered statistic line, e.g. "Total articles: 206" */
.stat-line {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--box-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin: 16px 0;
}

/* publication entries */
.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.pub-list .num {
  color: var(--muted);
  margin-right: 4px;
}

/* small action links on an entry: DOI, arXiv, PDF */
.pub-list .links {
  display: inline-block;
  margin-left: 8px;
  white-space: nowrap;
}

.pub-list .links a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 8px;
  text-decoration: none;
}

.pub-list .links a:hover {
  background: var(--box-bg);
  border-color: var(--accent-dark);
}

/* year/tab navigation rendered as plain text links */
.year-nav {
  line-height: 1.9;
  margin: 14px 0 22px;
}

.year-nav .tab-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent-dark);
  cursor: pointer;
  display: inline;
}

.year-nav .tab-btn:hover {
  text-decoration: underline;
}

.year-nav .tab-btn.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.year-nav .badge {
  font-weight: normal;
  font-style: italic;
  color: var(--muted);
  margin-left: 2px;
}

/* article search bar (publications/articles.html) — stays visible above
   the year tabs and filters every year at once, not just the active tab */
.pub-search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.pub-search-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  font-size: 0.95rem;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
}

.pub-search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
}

.pub-search-bar button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.pub-search-bar button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.pub-search-bar button.secondary {
  background: none;
  color: var(--accent-dark);
  border-color: var(--border);
}

.pub-search-bar button.secondary:hover {
  border-color: var(--accent-dark);
  background: var(--box-bg);
}

/* year heading injected above each year's results while a cross-year
   search is active, so matches stay identifiable by year */
.search-year-heading {
  color: var(--accent-dark);
  font-size: 1.15rem;
  font-weight: 650;
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tab-content .search-year-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* tab mechanics (articles page) */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- text elements ---------- */

ul, ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 6px;
}

table {
  border-collapse: collapse;
}

/* opt-in bordered data table (legacy tables keep their border attrs) */
table.bordered th,
table.bordered td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

table.bordered th {
  background: var(--box-bg);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
