/* ===================================================
   José Flich Cardo — Academic Personal Website
   Universitat Politècnica de València
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:   #1e3a5f;
  --accent:    #e87722;
  --light:     #f5f6f8;
  --text:      #2d3748;
  --muted:     #718096;
  --border:    #e2e8f0;
  --white:     #ffffff;
  --link:      #1a5fa8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 15px;
}

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

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  background-color: var(--primary) !important;
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: white !important;
  letter-spacing: -0.01em;
}
.navbar-brand span { color: var(--accent); }
.navbar-nav .nav-link {
  color: rgba(255,255,255,0.82) !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem !important;
  border-radius: 5px;
  transition: all 0.2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  background: rgba(255,255,255,0.12);
}
.navbar-toggler { border-color: rgba(255,255,255,0.3); }
.navbar-toggler-icon { filter: invert(1); }

/* ── Hero (homepage) ────────────────────────────── */
.hero-section {
  background: linear-gradient(145deg, var(--primary) 0%, #2a527a 60%, #1e3a5f 100%);
  color: white;
  padding: 4.5rem 0 4rem;
}
.hero-name {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.hero-title {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.hero-affil {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
}
.hero-affil a { color: var(--accent); text-decoration: none; }
.hero-affil a:hover { text-decoration: underline; }
.hero-bio {
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
  line-height: 1.75;
  margin-top: 1.25rem;
}
.profile-img {
  width: 175px;
  height: 175px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ── Page header (inner pages) ──────────────────── */
.page-header {
  background: linear-gradient(145deg, var(--primary) 0%, #2a527a 100%);
  color: white;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}
.page-header p { color: rgba(255,255,255,0.72); margin: 0; font-size: 0.9rem; }

/* ── Section titles ─────────────────────────────── */
h2.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 0.7rem;
  margin-bottom: 1.5rem;
}

/* ── Social / profile links ─────────────────────── */
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  margin: 0.2rem 0.1rem;
  transition: all 0.2s;
}
.social-links a:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: rgba(255,255,255,0.6);
}
.social-links a i { font-size: 0.85rem; }

/* ── Tags / chips ───────────────────────────────── */
.tag {
  display: inline-block;
  background: rgba(30,58,95,0.08);
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  margin: 0.15rem 0.1rem;
}

/* ── Research area cards ────────────────────────── */
.research-card {
  border-left: 4px solid var(--accent);
  background: var(--light);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.4rem;
  height: 100%;
  transition: box-shadow 0.2s;
}
.research-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.research-card .rc-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}
.research-card h5 {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.research-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ── Publication badges ─────────────────────────── */
.pub-badge {
  font-size: 0.67rem;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.badge-j { background: #dbeafe; color: #1e40af; }   /* Journal */
.badge-c { background: #fef3c7; color: #92400e; }   /* Conference */
.badge-w { background: #d1fae5; color: #065f46; }   /* Workshop */
.badge-p { background: #ede9fe; color: #4c1d95; }   /* Preprint */
.badge-e { background: #fce7f3; color: #831843; }   /* Proceedings/Editor */
.badge-b { background: #ecfdf5; color: #065f46; }   /* Book chapter */

/* ── Publications list ──────────────────────────── */
.year-divider {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2.5px solid var(--accent);
}
.pub-entry {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-entry:last-child { border-bottom: none; }
.pub-title {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  line-height: 1.4;
}
.pub-title a { color: var(--primary); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}
.pub-venue {
  font-size: 0.83rem;
  color: var(--text);
}
.pub-venue em { font-style: italic; }

/* Year quick-nav (publications page) */
.year-nav { position: sticky; top: 70px; }
.year-nav a {
  display: block;
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid var(--border);
  transition: all 0.2s;
}
.year-nav a:hover {
  color: var(--primary);
  border-left-color: var(--accent);
  background: var(--light);
}

/* ── Project cards ──────────────────────────────── */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
}
.project-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}
.project-period {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--light);
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.project-card h5 {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.project-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.eu-badge {
  font-size: 0.68rem;
  background: #003399;
  color: white;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.nat-badge {
  font-size: 0.68rem;
  background: #c60b1e;
  color: white;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 700;
}

/* ── People cards ───────────────────────────────── */
.person-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1rem;
  text-align: center;
  height: 100%;
  transition: box-shadow 0.2s;
}
.person-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.person-initials {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}
.person-card h6 {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}
.person-card small { color: var(--muted); font-size: 0.78rem; }

/* ── Software card ──────────────────────────────── */
.software-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--accent);
}
.software-card h4 {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.software-card p { color: var(--muted); font-size: 0.9rem; }

/* ── News items (homepage) ──────────────────────── */
.news-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Stats bar ──────────────────────────────────── */
.stat-item {
  text-align: center;
  padding: 1.25rem;
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ── Teaching ───────────────────────────────────── */
.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
}
.course-card h6 { font-weight: 700; color: var(--primary); margin-bottom: 0.2rem; }
.course-card small { color: var(--muted); font-size: 0.82rem; }

/* ── Contact ────────────────────────────────────── */
.contact-block {
  background: var(--light);
  border-radius: 10px;
  padding: 1.75rem 2rem;
}
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.contact-value { color: var(--text); font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.65);
  padding: 2.5rem 0;
  margin-top: 5rem;
  font-size: 0.83rem;
}
footer strong { color: white; }
footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
footer a:hover { color: var(--accent); }
.footer-divider { color: rgba(255,255,255,0.25); margin: 0 0.4rem; }

/* ── Generic utility ────────────────────────────── */
.accent { color: var(--accent); }
.bg-light-custom { background: var(--light); }
section { padding: 2.5rem 0; }
section:first-of-type { padding-top: 0; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .hero-name { font-size: 1.9rem; }
  .profile-img { width: 130px; height: 130px; }
  .page-header h1 { font-size: 1.6rem; }
  .hero-section { padding: 3rem 0 2.5rem; }
  .stat-number { font-size: 1.8rem; }
  .year-nav { display: none; }
}
