/* ============================================================
   Warm Sand Design System — Sofie Goethals Academic Website
   ============================================================
   Palette (monochromatic — no colors outside this set):
     --bg:      #FDFAF6  page background
     --surface: #F7F0E4  cards, sidebars
     --border:  #E5D5B8  dividers, outlines (1px only)
     --accent:  #C9A66B  icons, tags, highlights (≤10% of screen)
     --cta:     #8B6220  links, buttons
     --text:    #2C1F0E  body text (never pure black)
     --white:   #FFFFFF  card faces, content areas
   Rules: no gradients · no drop shadows · border+bg contrast for depth
   ============================================================ */

/* --- Google Fonts (Inter + Lora) -------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* --- Design tokens ---------------------------------------------- */
:root {
  --bg:      #FDFAF6;
  --surface: #F7F0E4;
  --border:  #E5D5B8;
  --accent:  #C9A66B;
  --cta:     #8B6220;
  --cta-hover: #6B4A18;
  --text:    #2C1F0E;
  --text-muted: rgba(44, 31, 14, 0.55);
  --white:   #FFFFFF;

  --r-sm:   8px;
  --r-md:   12px;
  --r-pill: 999px;
}

/* --- Base typography -------------------------------------------- */
html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
}

/* Display headings (h1, h2): elegant serif */
h1, h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
/* UI headings (h3–h6): clean sans */
h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; margin-top: 0; margin-bottom: 0.4rem; }

p { line-height: 1.7; margin: 1.25rem 0; color: var(--text); }

a { color: var(--cta); text-decoration: none; transition: color 0.15s; }
a:hover, a:focus { color: var(--cta-hover); }

strong { font-weight: 600; }

/* --- Navbar ----------------------------------------------------- */
/* Flat dark warm brown — no gradients, no shadows */
.navbar-custom {
  background-color: var(--text) !important;
  border-bottom: 1px solid rgba(201, 166, 107, 0.2) !important;
  box-shadow: none !important;
}
.navbar-custom .navbar-brand,
.navbar-custom .navbar-nav .nav-link {
  color: var(--surface) !important;
  font-family: 'Inter', sans-serif;
  font-weight: 500 !important;
  letter-spacing: 0.05em;
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus {
  color: var(--accent) !important;
}
.navbar-custom .nav-item.dropdown .dropdown-menu {
  background-color: var(--text) !important;
  border: 1px solid rgba(201, 166, 107, 0.2) !important;
}
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item {
  background-color: var(--text) !important;
  color: var(--surface) !important;
}
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item:hover {
  color: var(--accent) !important;
}
.navbar-custom .navbar-toggler {
  border-color: rgba(201, 166, 107, 0.4);
}
.navbar-custom .navbar-toggler-icon { filter: invert(0.9); }

/* --- Header / page title --------------------------------------- */
/* Flat dark fill — no gradient */
.header-section {
  background: var(--text);
}
.intro-header { color: var(--white); }
.intro-header h1 {
  color: var(--white);
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.intro-header .page-heading h1 { margin-top: 0; }
.intro-header .page-subheading {
  color: rgba(253, 250, 246, 0.78);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
}

/* --- Footer ---------------------------------------------------- */
footer {
  background-color: var(--text) !important;
  border-top: 1px solid rgba(201, 166, 107, 0.2) !important;
}
footer p.text-muted   { color: rgba(245, 232, 212, 0.55) !important; }
footer a              { color: var(--surface) !important; }
footer a:hover,
footer a:focus        { color: var(--accent) !important; }

/* --- Content area ---------------------------------------------- */
/* Max width + section padding */
main.container-md {
  max-width: 1100px !important;
  padding-top: 80px;
  padding-bottom: 80px;
}
@media (max-width: 768px) {
  main.container-md { padding-top: 48px; padding-bottom: 48px; }
}

/* Reset Beautiful Jekyll body font to ours */
body { font-family: 'Inter', system-ui, sans-serif !important; }

/* --- Publication entries --------------------------------------- */
.pub-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: none !important;
  transition: background 0.15s;
}
.pub-entry:hover {
  background: var(--surface);
  transform: none; /* no lift — flat design */
}
.pub-entry p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.pub-entry .pub-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
}

/* --- Publication link badges (monochromatic) ------------------- */
.pub-links {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pub-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  /* Warm sand — all badge types share the same palette */
  background: var(--surface);
  color: var(--cta);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}
.pub-link-badge:hover,
.pub-link-badge:focus {
  background: var(--border);
  color: var(--cta-hover);
  text-decoration: none !important;
}
/* Override old color-coded variants */
.badge-pdf, .badge-doi, .badge-arxiv, .badge-link, .badge-acl {
  background: var(--surface) !important;
  color: var(--cta) !important;
  border-color: var(--border) !important;
}
.badge-pdf:hover, .badge-doi:hover, .badge-arxiv:hover,
.badge-link:hover, .badge-acl:hover {
  background: var(--border) !important;
  color: var(--cta-hover) !important;
}

/* --- Research interest tags ------------------------------------ */
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.research-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.85rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
}
.research-tag i { color: var(--accent); font-size: 0.75rem; }

/* --- Teaching course cards ------------------------------------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 1.5rem 0;
}
.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: none !important;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
/* Accent stripe — flat single color, no gradient */
.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.course-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: none;
}
.course-card .course-icon {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
  display: block;
}
.course-card h4 {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.course-card .course-level {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--cta);
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
}
.course-card p {
  font-size: 0.9rem;
  color: rgba(44, 31, 14, 0.72);
  margin: 0;
  line-height: 1.65;
}
.course-card .course-meta {
  margin-top: 1rem;
  font-size: 0.79rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.course-card .course-meta i { color: var(--accent); }

/* --- News list ------------------------------------------------- */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text);
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cta);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.08rem 0.45rem;
  border-radius: 6px;
  margin-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}

/* --- Profile hero ---------------------------------------------- */
.profile-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.profile-hero img {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: none;
  flex-shrink: 0;
}
.profile-hero-text { flex: 1; min-width: 240px; }
.profile-hero-text p { margin: 0 0 0.9rem; }

/* --- Publication section titles -------------------------------- */
.pub-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pub-section-title i { color: var(--accent); }
.pub-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.5rem;
}

/* --- Collapsible year sections (details/summary) --------------- */
details { margin-bottom: 4px; }
.year-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  list-style: none;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.year-toggle::-webkit-details-marker { display: none; }
.year-toggle::before {
  content: '▶';
  font-size: 0.58rem;
  color: var(--accent);
  transition: transform 0.18s;
  flex-shrink: 0;
}
details[open] > .year-toggle::before { transform: rotate(90deg); }
.year-toggle:hover { background: var(--border); }
details[open] > .year-toggle {
  background: var(--surface);
  border-color: var(--accent);
}

/* --- Section h3 underline -------------------------------------- */
.page-content h3,
main h3 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  display: inline-block;
  padding-right: 1.5rem;
}

/* --- CTA buttons ----------------------------------------------- */
/* Background #8B6220, white text, 8px radius, no shadow */
a.pub-link-badge[href][download],
.btn-download {
  background: var(--cta);
  color: var(--white) !important;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-download:hover { background: var(--cta-hover); color: var(--white) !important; }

/* CV download button specifically */
a[href*="cv_sofie"] {
  background: var(--cta) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--r-sm) !important;
  padding: 0.45rem 1.1rem !important;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}
a[href*="cv_sofie"]:hover {
  background: var(--cta-hover) !important;
  color: var(--white) !important;
}

/* --- Responsive ------------------------------------------------ */
@media (max-width: 768px) {
  .profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .courses-grid { grid-template-columns: 1fr; }
  main.container-md { padding-top: 48px; padding-bottom: 48px; }
  .pub-entry { padding: 18px 20px; }
  .course-card { padding: 20px; }
}
