/* =========================
   César Feniou — main.css
   ========================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:       #1a1f1e;          /* dark grey-green page background */
  --panel:    #1f2624;
  --surface:  #252e2b;          /* slightly lighter green-grey for content panel */
  --text:     #dde5ef;
  --muted:    #7a9090;
  --faint:    #445555;
  --link:     #7ec8f0;
  --accent:   #4fa3d4;
  --border:   rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.13);
  --radius:   12px;
  --font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Layout ---- */
.container {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,31,30,0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
}

.brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.brand:hover { color: var(--text); }
.brand::before { content: '~/'; color: var(--faint); }

.nav { display: flex; gap: 2px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}
.nav a.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hover);
}

/* ---- Main content ---- */
main.container { padding-bottom: 80px; }

.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  margin-top: 40px;
}

@media (max-width: 600px) {
  .content { padding: 24px 20px; }
}

/* ---- Typography ---- */
h1 { font-size: 1.75rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1rem; font-weight: 500; margin: 1.2rem 0 0.3rem; }
p  { margin-bottom: 0.9rem; }
ul, ol { padding-left: 1.4em; margin-bottom: 0.9rem; }
li { margin-bottom: 0.3rem; }

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

/* ---- Links ---- */
a { color: var(--link); }
.content a {
  text-decoration: none;
  border-bottom: 1px solid rgba(126,200,240,0.2);
  transition: border-color 0.15s;
}
.content a:hover { border-bottom-color: var(--link); }

/* ---- About page ---- */
.intro {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}
.intro-text { flex: 1; }
.intro-text h1 { margin-bottom: 0.5rem; }

.intro-meta {
  margin-bottom: 0.6rem;
  line-height: 1.75;
}

.intro-position {
  font-size: 0.97rem;
  color: var(--text);
}
.intro-position a {
  color: var(--link);
  border-bottom: none !important;
}

.intro-location {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Mail vignette */
.intro-contact {
  margin: 0.6rem 0 1rem;
}
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted) !important;
  text-decoration: none !important;
  border-bottom: none !important;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  transition: color 0.15s;
}
.mail-link:hover {
  color: var(--link) !important;
}
.mail-icon { font-size: 0.85rem; color: var(--faint); }

/* Profile photo — portrait */
.intro-photo { flex: 0 0 auto; }
.intro-photo img {
  display: block;
  width: 130px;
  height: 170px;
  object-fit: cover;
  object-position: center 0%;
  border-radius: var(--radius);
  border: 1px solid var(--border-hover);
  filter: grayscale(10%);
}

@media (max-width: 600px) {
  .intro { flex-direction: column-reverse; align-items: center; gap: 1.5rem; }
  .intro-photo img { width: 100px; height: 130px; }
}

/* Tags / pills */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.8rem 0 0;    /* was adding space below */
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  padding: 3px 9px;
  letter-spacing: 0.03em;
}

/* ---- Social icons ---- */
.social-icons { display: flex; gap: 1.4rem; align-items: center; }
.social-icons a {
  color: var(--faint);
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: none !important;
  transition: color 0.2s;
}
.social-icons a:hover { color: var(--text); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-copy { color: var(--faint); font-size: 12px; font-family: var(--mono); }

/* ---- Publications ---- */
.pub-list { display: flex; flex-direction: column; gap: 0; }

.pub-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.pub-row:last-child { border-bottom: none; }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(79,163,212,0.1);
  border: 1px solid rgba(79,163,212,0.25);
  border-radius: 5px;
  padding: 3px 7px;
  letter-spacing: 0.04em;
}

.pub-new {
  background: rgba(79,163,212,0.04);
  border-radius: 10px;
  padding-left: 12px;
  margin-left: -12px;
  border-left: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

.badge-new {
  color: #5ecfa0;
  background: rgba(94,207,160,0.1);
  border-color: rgba(94,207,160,0.3);
}

.pub-title {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 3px;
}
.pub-authors {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 6px;
}
.pub-authors strong { color: var(--text); font-weight: 500; }

.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border-hover) !important;
  border-bottom: 1px solid var(--border-hover) !important;
  border-radius: 5px;
  padding: 2px 8px;
  transition: color 0.15s, border-color 0.15s;
}
.pub-links a:hover { color: var(--link); border-color: var(--accent) !important; }

/* ---- News ---- */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  padding-top: 2px;
}
.news-text { font-size: 0.93rem; line-height: 1.6; }

/* ---- CV ---- */
.cv-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.cv-entry:last-child { border-bottom: none; }
.cv-year {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  padding-top: 3px;
}
