/* ================================================================
   CUSTOM CSS — Mohamed JANANE ALLAH · AcademicPages Premium
   Design: Google Research / DeepMind / jonbarron.info inspired
   ORCID: 0000-0001-5852-9212
   ================================================================ */

/* ── CSS Variables ── */
:root {
  --blue:        #1a56db;
  --blue-dark:   #1140a0;
  --blue-light:  #dbeafe;
  --blue-xlight: #eff6ff;
  --green:       #16a34a;
  --purple:      #7c3aed;
  --amber:       #d97706;
  --text:        #0f172a;
  --text-2:      #374151;
  --text-3:      #6b7280;
  --text-4:      #9ca3af;
  --bg:          #ffffff;
  --bg-2:        #f9fafb;
  --bg-3:        #f3f4f6;
  --border:      #e5e7eb;
  --border-2:    #f0f0f0;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --r-sm:        8px;
  --r:           12px;
  --r-lg:        16px;
  --r-xl:        20px;
  --t:           0.2s ease;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
h1,h2,h3,h4,h5,h6 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: .5rem; margin: 2.5rem 0 1.2rem; }
h3 { font-size: 1.15rem; color: var(--blue-dark); }
p { color: var(--text-2); }
a { color: var(--blue); transition: color var(--t); }
a:hover { color: var(--blue-dark); }
code { background: var(--bg-3); border-radius: 4px; padding: .15em .35em; font-size: .88em; }
pre code { background: none; padding: 0; }

/* ── HERO BANNER ── */
.hero-banner {
  background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 40%, #e0f2fe 100%);
  border: 1px solid #c7d8f8;
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}
.hero-inner { max-width: 740px; margin: 0 auto; text-align: center; }
.hero-tag {
  display: inline-block;
  background: rgba(26,86,219,.12);
  color: var(--blue-dark);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: .3rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(26,86,219,.2);
  margin-bottom: .9rem;
}
.hero-banner h1 {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text);
  margin: .3rem 0 .5rem;
}
.name-accent { color: var(--blue); }
.hero-subtitle {
  font-size: 1rem;
  color: var(--text-2);
  font-weight: 500;
  margin: .2rem 0;
}
.hero-quote {
  font-size: .9rem;
  color: var(--text-3);
  margin: .8rem 0 1rem;
  font-style: italic;
}
.hero-badges { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.badge-link img { height: 22px; border-radius: 4px; }
.hero-cta { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.cta-btn, .btn-primary, .btn-secondary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.15rem;
  border-radius: var(--r-sm);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--t);
  cursor: pointer;
  white-space: nowrap;
}
.cta-btn.primary, .btn-primary {
  background: var(--blue);
  color: #fff !important;
  box-shadow: var(--shadow-sm);
}
.cta-btn.primary:hover, .btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: var(--shadow-md);
  color: #fff !important;
}
.cta-btn.secondary, .btn-secondary {
  background: var(--bg);
  color: var(--blue) !important;
  border: 1.5px solid var(--blue);
}
.cta-btn.secondary:hover { background: var(--blue-light); }
.cta-btn.outline, .btn-outline {
  background: transparent;
  color: var(--text-3) !important;
  border: 1.5px solid var(--border);
}
.cta-btn.outline:hover { border-color: var(--blue); color: var(--blue) !important; }

/* ── EXPERTISE GRID ── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .9rem;
  margin: 1.5rem 0;
}
.exp-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem;
  transition: box-shadow var(--t), transform var(--t);
}
.exp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.exp-icon { font-size: 1.7rem; margin-bottom: .5rem; }
.exp-card h3 { font-size: .92rem; color: var(--text); margin: 0 0 .4rem; }
.exp-card p { font-size: .82rem; color: var(--text-3); margin: 0; line-height: 1.6; }

/* ── AFFILIATIONS ── */
.affil-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.affil-pill {
  background: var(--blue-xlight);
  border: 1px solid var(--blue-light);
  color: var(--blue-dark);
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .85rem;
  border-radius: 999px;
}

/* ── PUB HIGHLIGHTS (homepage) ── */
.pub-highlights { display: flex; flex-direction: column; gap: .75rem; margin: 1.2rem 0; }
.pub-item {
  display: flex;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
  transition: box-shadow var(--t);
}
.pub-item:hover { box-shadow: var(--shadow-md); }
.pub-item.featured { border-left: 4px solid var(--blue); background: var(--blue-xlight); }
.pub-left { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex-shrink: 0; }
.pub-year { font-size: .72rem; font-weight: 700; color: var(--text-4); }
.pub-q { font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: 999px; letter-spacing: .05em; }
.pub-q.q1 { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.pub-q.q3 { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.pub-right h4 { font-size: .9rem; color: var(--text); margin: 0 0 .25rem; line-height: 1.4; }
.pub-venue { font-size: .78rem; color: var(--blue); font-style: italic; margin: 0 0 .15rem; }
.pub-auth { font-size: .78rem; color: var(--text-3); margin: 0; }
.pub-read { font-size: .78rem; font-weight: 600; color: var(--blue); }
.see-all-link { text-align: center; font-size: .9rem; font-weight: 600; margin-top: 1rem; }
.see-all-link a { color: var(--blue); }

/* ── KPI STATS ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .9rem;
  margin: 1.5rem 0;
}
.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem .8rem;
  text-align: center;
  transition: box-shadow var(--t);
}
.kpi:hover { box-shadow: var(--shadow-md); }
.kpi-n { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1; }
.kpi-l { font-size: .78rem; font-weight: 600; color: var(--text); margin-top: .25rem; }
.kpi-s { font-size: .68rem; color: var(--text-4); margin-top: .12rem; }

/* ── NEWS FEED ── */
.news-feed { display: flex; flex-direction: column; gap: .6rem; }
.news-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-2);
}
.news-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: .45rem;
}
.news-dot.green { background: var(--green); }
.news-dot.blue  { background: var(--blue); }
.news-dot.gray  { background: var(--text-4); }
.news-tag {
  font-size: .72rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  padding: .15rem .6rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.news-text { font-size: .84rem; color: var(--text-3); line-height: 1.6; }
.news-text strong { color: var(--text-2); }

/* ── ABOUT PAGE ── */
.skills-matrix table { width: 100%; font-size: .84rem; }
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.profile-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
  font-size: .82rem;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: box-shadow var(--t), border-color var(--t);
}
.profile-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); }
.profile-card strong { display: block; color: var(--text); margin-bottom: .15rem; }

/* ── EXPERIENCE PAGE ── */
.exp-intro { font-size: .97rem; color: var(--text-2); line-height: 1.75; margin-bottom: 2rem; }

.position-header {
  border-radius: var(--r);
  padding: 1.3rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.position-header.fstm { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #bdd3f8; }
.position-header.ensam { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }
.position-header.iptae { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fed7aa; }
.position-header.rd   { background: linear-gradient(135deg, #fdf4ff, #f3e8ff); border-color: #e9d5ff; }
.position-header h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.pos-inst { font-size: .88rem; color: var(--blue); font-style: italic; margin: 0 0 .2rem; }
.pos-period, .pos-location { font-size: .82rem; color: var(--text-3); margin: .1rem 0; }

/* Course box */
.course-box { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 1.5rem; }
.course-entry {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem;
}
.course-tag {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  font-family: monospace;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 6px;
  margin-bottom: .5rem;
}
.course-entry h4 { font-size: .97rem; margin: 0 0 .4rem; }
.course-entry h4 small { font-weight: 500; color: var(--text-3); font-size: .8rem; }
.course-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.course-chips span {
  font-size: .7rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: .12rem .55rem;
  border-radius: 999px;
  color: var(--text-3);
}

/* TD/TP grid */
.td-tp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .75rem;
}
.td-tp-grid.compact { grid-template-columns: 1fr 1fr; gap: .5rem; }
@media(max-width:640px) { .td-tp-grid, .td-tp-grid.compact { grid-template-columns: 1fr; } }

.td-item, .tp-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: .75rem;
}
.td-num, .tp-num {
  font-size: .65rem;
  font-weight: 800;
  font-family: monospace;
  background: var(--blue);
  color: #fff;
  padding: .15rem .45rem;
  border-radius: 5px;
  flex-shrink: 0;
  height: fit-content;
}
.tp-num { background: var(--purple); }
.td-item strong, .tp-item strong { font-size: .83rem; color: var(--text); display: block; margin-bottom: .15rem; }
.td-item p, .tp-item p { font-size: .78rem; color: var(--text-3); margin: 0; line-height: 1.5; }
.tp-tools { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .35rem; }
.tp-tools span {
  font-size: .66rem; font-weight: 700; font-family: monospace;
  background: #e0e7ff; color: #3730a3;
  padding: .1rem .45rem; border-radius: 999px;
}

/* LP sections */
.lp-section { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.lp-box { border-radius: var(--r); border: 1px solid var(--border); padding: 1.1rem; }
.lp-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.lp-badge {
  background: var(--blue); color: #fff;
  font-size: .7rem; font-weight: 800;
  padding: .25rem .65rem; border-radius: var(--r-sm);
  flex-shrink: 0;
}
.lp-badge.green { background: var(--green); }
.lp-badge.purple { background: var(--purple); }
.lp-header h4 { margin: 0; font-size: .95rem; }
.lp-modules { display: flex; flex-direction: column; gap: .45rem; }
.lp-mod { font-size: .83rem; color: var(--text-2); line-height: 1.55; }
.lp-mod strong { color: var(--text); }

/* Training cards */
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.training-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem;
  transition: box-shadow var(--t);
}
.training-card:hover { box-shadow: var(--shadow-md); }
.training-card.highlight { border-color: var(--blue); background: var(--blue-xlight); }
.tr-icon { font-size: 1.6rem; margin-bottom: .5rem; }
.training-card h4 { font-size: .95rem; color: var(--text); margin: 0 0 .4rem; }
.training-card p { font-size: .82rem; color: var(--text-3); margin: 0 0 .3rem; line-height: 1.55; }
.tr-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tr-tools span {
  font-size: .7rem; background: var(--bg-2);
  border: 1px solid var(--border);
  padding: .12rem .5rem; border-radius: 999px; color: var(--text-3);
}

/* Mémoires */
.memoire-row { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.mem-card {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .9rem 1.1rem;
}
.mem-year {
  font-size: .72rem; font-weight: 700;
  background: var(--blue); color: #fff;
  padding: .2rem .6rem; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
}
.mem-card h5 { font-size: .9rem; color: var(--text); margin: 0 0 .2rem; }
.mem-card p { font-size: .8rem; color: var(--text-3); margin: 0; }

/* R&D section */
.rd-competences {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.rd-col {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.1rem;
}
.rd-col h3 { font-size: .92rem; color: var(--text); margin: 0 0 .6rem; }
.rd-col ul { list-style: none; padding: 0; margin: 0; }
.rd-col li { font-size: .82rem; color: var(--text-3); padding: .25rem 0; border-bottom: 1px solid var(--border-2); line-height: 1.5; }
.rd-col li:last-child { border-bottom: none; }
.rd-col li strong { color: var(--text-2); }

/* Other exp */
.other-exp { display: flex; flex-direction: column; gap: .9rem; }
.other-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.2rem; }
.other-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; flex-wrap: wrap; gap: .5rem; }
.other-meta strong { font-size: .95rem; color: var(--text); }
.other-meta span { font-size: .78rem; color: var(--blue); font-weight: 600; }
.other-card p { font-size: .85rem; color: var(--text-2); margin: 0 0 .4rem; }
.other-card ul { font-size: .82rem; color: var(--text-3); padding-left: 1.2rem; margin: 0; }
.other-card li { margin-bottom: .2rem; }

/* ── PUBLICATIONS PAGE ── */
.pub-page-hero { margin-bottom: 1.5rem; }
.pub-links-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.ext-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600;
  padding: .35rem .9rem; border-radius: 999px;
  text-decoration: none !important; border: 1.5px solid;
  transition: all var(--t);
}
.ext-link.scholar { border-color: #4285f4; color: #1a56db; }
.ext-link.scholar:hover { background: #eff6ff; }
.ext-link.orcid { border-color: #a6ce39; color: #5a820a; }
.ext-link.orcid:hover { background: #f7ffd6; }
.ext-link.rg { border-color: #00ccbb; color: #007a70; }
.ext-link.rg:hover { background: #e6fffc; }

.pub-counters { display: flex; flex-wrap: wrap; gap: .75rem; }
.pub-c {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .6rem 1rem;
  text-align: center; font-size: .85rem;
}
.pub-c strong { font-size: 1.3rem; font-weight: 800; color: var(--blue); display: block; }
.pub-c span { font-size: .75rem; color: var(--text-3); }

.pub-full {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.3rem 1.4rem 1.3rem 2rem;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow var(--t);
}
.pub-full:hover { box-shadow: var(--shadow-md); }
.pub-full.book { border-left-color: var(--purple); }
.pub-full.inprogress { opacity: .85; }
.pub-ribbon {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  border-radius: var(--r) 0 0 var(--r);
}
.pub-ribbon.q1 { background: var(--green); }
.pub-ribbon.q3 { background: var(--amber); }
.pub-ribbon.book-r { background: var(--purple); }
.pub-ribbon.wp { background: var(--amber); }

.pub-top-row {
  display: flex; align-items: center; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .5rem;
}
.pub-ref { font-family: monospace; font-size: .75rem; font-weight: 700; color: var(--text-4); }
.pub-venue-full { font-size: .8rem; font-weight: 600; color: var(--blue); font-style: italic; flex: 1; }
.pub-year-pill {
  font-size: .72rem; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: .15rem .55rem; border-radius: 999px; color: var(--text-4);
  white-space: nowrap;
}
.pub-full h3 { font-size: .97rem; color: var(--text); margin: 0 0 .3rem; line-height: 1.45; }
.pub-auth-full { font-size: .82rem; color: var(--text-3); margin: 0 0 .6rem; }
.pub-abstract-box {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: .75rem 1rem;
  font-size: .82rem; color: var(--text-3); line-height: 1.65;
  margin: .6rem 0;
}
.pub-abstract-box strong { color: var(--text-2); }
.pub-kw-row { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.pub-kw-row span {
  font-size: .7rem; background: var(--blue-xlight);
  border: 1px solid var(--blue-light);
  color: var(--blue-dark); padding: .12rem .55rem; border-radius: 999px;
}
.pub-links-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.pub-btn {
  font-size: .78rem; font-weight: 600;
  padding: .3rem .85rem; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-2); text-decoration: none !important;
  transition: all var(--t);
}
.pub-btn:hover { border-color: var(--blue); color: var(--blue) !important; }

details.bibtex-block { margin-top: .75rem; }
details.bibtex-block summary {
  cursor: pointer; font-size: .8rem; font-weight: 600;
  color: var(--text-3); user-select: none;
}
details.bibtex-block summary:hover { color: var(--blue); }
details.bibtex-block pre {
  background: #1e1e2e; border-radius: var(--r-sm);
  padding: .9rem 1rem; margin-top: .5rem;
  overflow-x: auto; font-size: .77rem;
}
details.bibtex-block code { color: #cdd6f4; background: none; }
.wp-status { font-size: .82rem; color: #92400e; font-style: italic; margin: .4rem 0 0; }

.conf-table { overflow-x: auto; }
.conf-table table { font-size: .83rem; min-width: 600px; }

/* ── RESEARCH PAGE ── */
.research-hero { margin-bottom: 1.5rem; }
.research-hero p { font-size: .97rem; color: var(--text-2); line-height: 1.75; }
.research-metrics {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: 1rem; font-size: .82rem; font-weight: 600; color: var(--text-3);
}
.research-metrics span::before { content: ''; }

.research-axis {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.3rem; margin: 1rem 0 1.5rem;
}
.axis-visual { flex-shrink: 0; }
.axis-num {
  width: 48px; height: 48px;
  background: var(--blue); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800;
}
.axis-content > p { font-size: .88rem; color: var(--text-3); margin: 0 0 .7rem; line-height: 1.7; }

.research-topics { display: flex; flex-direction: column; gap: .8rem; margin-bottom: .75rem; }
.topic {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .85rem 1rem;
}
.topic h4 { font-size: .88rem; color: var(--text); margin: 0 0 .3rem; }
.topic p { font-size: .82rem; color: var(--text-3); margin: 0 0 .3rem; line-height: 1.6; }
.topic-refs { font-size: .75rem; color: var(--blue); font-weight: 600; }

.methods-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.methods-row strong { font-size: .8rem; color: var(--text-3); }
.m-tag {
  font-size: .7rem; font-weight: 600;
  background: #e0e7ff; color: #3730a3;
  padding: .12rem .55rem; border-radius: 999px;
}

.projects-research-grid { display: flex; flex-direction: column; gap: 1rem; }
.proj-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.2rem;
  transition: box-shadow var(--t);
}
.proj-card:hover { box-shadow: var(--shadow-md); }
.proj-card.active-proj { border-left: 4px solid var(--green); }
.proj-card.done-proj { border-left: 4px solid var(--text-4); }
.proj-status { font-size: .72rem; font-weight: 700; margin-bottom: .15rem; }
.active-proj .proj-status { color: var(--green); }
.done-proj .proj-status { color: var(--text-4); }
.proj-period { font-size: .72rem; color: var(--text-4); margin-bottom: .4rem; }
.proj-card h4 { font-size: 1rem; color: var(--text); margin: 0 0 .25rem; }
.proj-part { font-size: .8rem; color: var(--blue); font-style: italic; margin: 0 0 .5rem; }
.proj-card > p:last-of-type { font-size: .85rem; color: var(--text-3); margin: 0 0 .6rem; line-height: 1.65; }
.proj-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.proj-tags span {
  font-size: .7rem; background: var(--bg-2);
  border: 1px solid var(--border); padding: .12rem .5rem;
  border-radius: 999px; color: var(--text-3);
}

.collab-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .9rem; margin-top: 1rem;
}
.collab-item {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .9rem 1rem;
  font-size: .84rem;
}
.collab-item strong { display: block; margin-bottom: .2rem; color: var(--text); }
.collab-item p { margin: 0; color: var(--text-3); font-size: .81rem; }

/* ── PROJECTS PAGE ── */
.proj-full-grid { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.proj-full-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.3rem;
  transition: box-shadow var(--t);
}
.proj-full-card:hover { box-shadow: var(--shadow-md); }
.proj-full-card.research { border-left: 4px solid var(--blue); }
.proj-full-card.academic { border-left: 4px solid var(--purple); }
.proj-full-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.proj-type { font-size: .74rem; font-weight: 600; background: var(--bg-2); border: 1px solid var(--border); padding: .2rem .65rem; border-radius: 999px; color: var(--text-3); }
.proj-status-pill { font-size: .7rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; }
.proj-status-pill.active { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.proj-status-pill.done { background: var(--bg-3); color: var(--text-4); border: 1px solid var(--border); }
.proj-full-card h3 { font-size: 1.05rem; color: var(--text); margin: 0 0 .25rem; }
.proj-meta { font-size: .8rem; color: var(--blue); font-style: italic; margin: 0 0 .6rem; }
.proj-full-card p, .proj-full-card ul { font-size: .85rem; color: var(--text-3); }
.proj-full-card ul { padding-left: 1.2rem; margin: .5rem 0; }
.proj-tech { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.proj-tech span {
  font-size: .7rem; font-weight: 600; font-family: monospace;
  background: #e0e7ff; color: #3730a3;
  padding: .12rem .55rem; border-radius: 999px;
}
.proj-link { font-size: .82rem; font-weight: 600; color: var(--blue); display: inline-block; margin-top: .5rem; }

/* Medium grid */
.medium-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem; margin: 1rem 0;
}
.medium-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.1rem;
  transition: box-shadow var(--t);
}
.medium-card:hover { box-shadow: var(--shadow-md); }
.med-date { font-size: .72rem; color: var(--text-4); font-weight: 600; margin-bottom: .3rem; }
.medium-card h4 { font-size: .9rem; margin: 0 0 .4rem; }
.medium-card h4 a { color: var(--text); }
.medium-card h4 a:hover { color: var(--blue); }
.medium-card p { font-size: .81rem; color: var(--text-3); margin: 0 0 .5rem; line-height: 1.55; }
.med-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.med-tags span { font-size: .68rem; background: var(--bg-2); border: 1px solid var(--border); padding: .1rem .45rem; border-radius: 999px; color: var(--text-3); }

/* ── BLOG PAGE ── */
.blog-header { margin-bottom: 1.5rem; }
.blog-header p { font-size: .97rem; color: var(--text-2); }
.blog-platforms { margin-top: .8rem; }
.platform-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600;
  padding: .45rem 1.1rem; border-radius: 999px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  color: var(--text-2); text-decoration: none !important;
  transition: all var(--t);
}
.platform-btn:hover { border-color: var(--blue); color: var(--blue) !important; }

.blog-cards { display: flex; flex-direction: column; gap: 1.1rem; }
.blog-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.2rem;
  transition: box-shadow var(--t);
}
.blog-card:hover { box-shadow: var(--shadow-md); }
.blog-card.featured-post { border-left: 4px solid var(--blue); background: var(--blue-xlight); }
.blog-card-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.blog-date { font-size: .72rem; font-weight: 700; color: var(--text-4); }
.blog-cat { font-size: .72rem; font-weight: 600; background: var(--bg-2); border: 1px solid var(--border); padding: .12rem .55rem; border-radius: 999px; color: var(--text-3); }
.blog-card h3 { font-size: .95rem; margin: 0 0 .4rem; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--blue); }
.blog-card > p { font-size: .83rem; color: var(--text-3); margin: 0 0 .5rem; line-height: 1.6; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.blog-tags span { font-size: .68rem; background: var(--blue-xlight); border: 1px solid var(--blue-light); color: var(--blue-dark); padding: .1rem .45rem; border-radius: 999px; }
.blog-read-link { font-size: .81rem; font-weight: 600; color: var(--blue); }
.blog-read-link:hover { text-decoration: underline; }

.coming-soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.coming-card { background: var(--bg-2); border: 1px dashed var(--border); border-radius: var(--r); padding: 1rem; }
.coming-tag { font-size: .72rem; font-weight: 700; color: var(--amber); display: block; margin-bottom: .4rem; }
.coming-card h4 { font-size: .88rem; color: var(--text); margin: 0 0 .3rem; }
.coming-card p { font-size: .8rem; color: var(--text-3); margin: 0; }

/* ── TEACHING PAGE ── */
.teaching-banner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bdd3f8; border-radius: var(--r);
  padding: 1.2rem 1.5rem; margin-bottom: 2rem;
}
.tb-stat { text-align: center; flex: 1; min-width: 100px; }
.tb-stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--blue); line-height: 1; }
.tb-stat span { font-size: .78rem; color: var(--text-3); }

/* ── AUTHOR SIDEBAR ── */
.author__avatar img {
  border-radius: 50%;
  border: 3px solid var(--blue);
  box-shadow: var(--shadow-md);
  transition: transform var(--t);
}
.author__avatar img:hover { transform: scale(1.03); }
.author__name { font-weight: 800 !important; color: var(--text) !important; font-size: .97rem !important; }
.author__bio { font-size: .8rem !important; color: var(--text-3) !important; line-height: 1.6 !important; }
.author__urls-wrapper .author__urls li a { font-size: .82rem; }

/* ── RESPONSIVE ── */
@media(max-width:768px) {
  .hero-banner h1 { font-size: 1.6rem; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .expertise-grid { grid-template-columns: 1fr; }
  .research-axis { flex-direction: column; }
  .axis-visual { display: none; }
  .td-tp-grid { grid-template-columns: 1fr; }
  .training-grid { grid-template-columns: 1fr; }
  .rd-competences { grid-template-columns: 1fr; }
}

/* ── PRINT ── */
@media print {
  .hero-cta, .hero-badges, .cta-btn { display: none; }
  .pub-full { break-inside: avoid; }
  body { font-size: 12pt; }
}
