
@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  /* Primary palette */
  --lu-red:       #B5121B;
  --lu-red-dark:  #8e0e14;
  --lu-grey:      #555656;
  --lu-black:     #111111;
  --lu-white:     #ffffff;

  /* Secondary palette */
  --lu-blue:      #205479;
  --lu-green:     #38614A;
  --lu-orange:    #FD9029;
  --lu-pale:      #BEC0C2;

  /* Tints */
  --lu-blue-tint: #A6BBC9;
  --lu-grey-tint: #E5E6E7;

  /* Aliases for existing code compatibility */
  --bg:           #ffffff;
  --surface:      #ffffff;
  --text:         #111111;
  --muted:        #555656;
  --border:       #e0e0e0;
  --primary:      #B5121B;
  --primary-hover:#8e0e14;
  --shadow:       0 4px 16px rgba(0,0,0,0.07);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --content-width: 760px;
}

/* Dark mode — kept but toned to LU palette */
:root[data-theme='dark'] {
  --bg:           #0f0f0f;
  --surface:      #1a1a1a;
  --text:         #e8e8e8;
  --muted:        #9a9a9a;
  --border:       #2e2e2e;
  --primary:      #e04048;
  --primary-hover:#f05058;
  --shadow:       0 10px 30px rgba(0,0,0,0.4);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0.002em;
  text-rendering: optimizeLegibility;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, .post-title {
  font-family: 'Bitter', Georgia, serif;
  line-height: 1.2;
  color: var(--text);
}

h1, .post-title {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-top: var(--space-5);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--lu-red);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

p, li { color: var(--text); }
p { margin: 0 0 var(--space-4); }

/* ── Links ─────────────────────────────────────────────────── */
a {
  color: var(--lu-blue);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--lu-red);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* ── Layout wrapper ────────────────────────────────────────── */
.wrapper {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ── Site Header ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 3px solid var(--lu-red);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 1rem;
}

/* Site name */
.site-title {
  font-family: 'Bitter', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-title:hover { color: var(--lu-red); text-decoration: none; }

/* ── Navigation ────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-nav .nav-trigger { display: none; }
.site-nav label { display: none; }

.site-nav .trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.page-link {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.page-link:hover,
.page-link.is-active {
  background: var(--lu-red);
  color: #fff !important;
  text-decoration: none;
}

/* Dark mode nav */
:root[data-theme='dark'] .site-header {
  background: var(--surface);
  border-bottom-color: var(--lu-red);
}
:root[data-theme='dark'] .page-link:hover,
:root[data-theme='dark'] .page-link.is-active {
  background: var(--lu-red);
  color: #fff !important;
}

/* ── Dark mode toggle ──────────────────────────────────────── */
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--lu-red); }

/* ── About / Profile layout ────────────────────────────────── */
.about-container { display: block; width: 100%; }

.profile-sidebar {
  float: left;
  width: 28%;
  min-width: 220px;
  margin-right: 32px;
  margin-bottom: 20px;
  padding-right: 24px;
  border-right: 2px solid var(--lu-grey-tint);
}

.profile-sidebar img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

.profile-info {
  margin-top: 18px;
  font-size: 0.9rem;
  line-height: 1.75;
}

.profile-info strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 14px;
  margin-bottom: 3px;
  font-family: 'Source Sans 3', sans-serif;
}

.profile-info a {
  color: var(--lu-blue);
  display: block;
}
.profile-info a::before {
  content: '→ ';
  color: var(--lu-red);
  font-size: 0.75rem;
}
.profile-info a:hover { color: var(--lu-red); }

.bio-text h2:first-child {
  margin-top: 0;
  font-size: 1.3rem;
}

/* Mentor/highlight callout */
.mentor-callout {
  background: #fdf5f5;
  border-left: 4px solid var(--lu-red);
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  font-size: 0.92rem;
  color: #333;
  margin-top: 1.2rem;
}
:root[data-theme='dark'] .mentor-callout {
  background: #1f1010;
  border-left-color: var(--lu-red);
  color: #ccc;
}

/* ── Section heading style (red rule) ──────────────────────── */
.section-rule {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 2.5rem 0 1.2rem;
}
.section-rule h2 {
  border-bottom: none;
  margin: 0;
  padding: 0;
  font-size: 1.3rem;
}
.section-rule::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--lu-red);
  opacity: 0.2;
}

/* ── News items ─────────────────────────────────────────────── */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  align-items: baseline;
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lu-red);
}
.news-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--lu-red);
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Research paper cards ───────────────────────────────────── */
.paper-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--lu-blue);
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
  transition: border-left-color 0.15s;
}
.paper-card:hover { border-left-color: var(--lu-red); }
.paper-card.policy  { border-left-color: var(--lu-green); }
.paper-card.forthcoming { border-left-color: var(--lu-orange); }
.paper-card.book    { border-left-color: var(--lu-grey); }

.paper-title {
  font-family: 'Bitter', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.paper-authors {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.paper-venue {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--lu-blue);
  font-weight: 600;
}
.paper-venue.policy-venue { color: var(--lu-green); }
.paper-venue.forthcoming  { color: var(--lu-orange); }

.paper-links { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.paper-link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--lu-pale);
  border-radius: 2px;
  color: var(--muted);
  transition: all 0.15s;
  text-decoration: none;
}
.paper-link:hover {
  background: var(--lu-red);
  color: white !important;
  border-color: var(--lu-red);
  text-decoration: none;
}

.research-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.75rem;
}

/* ── Page content ───────────────────────────────────────────── */
.page-content { padding: 2.5rem 0 3rem; }
.post { }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--lu-red);
  margin-top: 3rem;
  padding: 1.2rem 0 1.6rem;
}
.footer-note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-note a { color: var(--muted); }
.footer-note a:hover { color: var(--lu-red); }

/* ── Focus / accessibility ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--lu-red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .profile-sidebar {
    float: none !important;
    width: 100% !important;
    min-width: unset;
    margin: 0 0 1.5rem 0 !important;
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    text-align: center;
  }
  .profile-sidebar img { margin: 0 auto; max-width: 180px; }
  .header-inner { flex-wrap: wrap; }
  .site-nav label { display: inline-flex; align-items: center; cursor: pointer; color: var(--text); }
  .site-nav .trigger {
    display: none;
    width: 100%;
    padding-top: 0.5rem;
  }
  .site-nav .nav-trigger:checked ~ .trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
}
