/* ============================================================
   Modern Design for HunoldScience
   Overrides Blackburn theme with a clean, professional look
   ============================================================ */

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

/* --- Variables --- */
:root {
  --accent:       #2563eb;
  --accent-dark:  #1d4ed8;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --bg:           #f1f5f9;
  --sidebar-bg:   #0f172a;
  --sidebar-line: #1e293b;
  --border:       #e2e8f0;
  --card:         #ffffff;
  --link-visited: #6d28d9;
}

/* --- Base --- */
body {
  color: var(--text);
  background: var(--bg);
  font-family: 'Inter', 'Raleway', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

/* --- Links --- */
a {
  color: var(--accent);
  transition: color 0.15s ease;
}
a:hover,
a:focus {
  color: var(--accent-dark);
  text-decoration: none;
}
a:visited {
  color: var(--link-visited);
}

/* --- Sidebar --- */
#menu {
  background: var(--sidebar-bg);
}
#menu a {
  color: #94a3b8;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, background 0.15s ease;
}
#menu .pure-menu li a:hover,
#menu .pure-menu li a:focus {
  background: var(--sidebar-line);
  color: #e2e8f0;
}
#menu .pure-menu-selected,
#menu .pure-menu-heading {
  background: var(--accent);
}
#menu .pure-menu-selected a {
  color: #fff;
}
#menu .pure-menu ul,
#menu .pure-menu .menu-item-divided {
  border-top: 1px solid var(--sidebar-line);
}
/* Brand */
#menu .pure-menu-heading.brand,
#menu a.pure-menu-heading.brand {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f1f5f9;
  background: transparent;
}

/* --- Page header (non-home pages) --- */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 2.5em 2.5em 1.5em;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.header h1 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.1em 0 0.3em;
}
.header h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0;
  margin: 0;
}

/* --- Main content area --- */
.content {
  background: var(--card);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  line-height: 1.75;
  padding: 1.75em 2.5em 2.5em;
  max-width: 800px;
  margin-bottom: 2em;
}

/* Section headings */
.content h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2.25em;
  margin-bottom: 0.6em;
  border-bottom: none;
}
.content h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5em;
}
.content p {
  color: #334155;
  margin-bottom: 0.9em;
}
.content ul {
  padding-left: 1.3em;
  margin-top: 0.4em;
  margin-bottom: 0.6em;
}
.content li {
  margin-bottom: 0.45em;
  line-height: 1.65;
  color: #334155;
}

/* Social badge links on index page */
.content p a:has(i.fa-github),
.content p a:has(i.fa-linkedin),
.content p a:has(i.fa-orcid) {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0.75em;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none !important;
  margin-right: 0.4em;
  transition: opacity 0.15s ease;
  background: #f1f5f9;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.content p a:has(i.fa-github):hover,
.content p a:has(i.fa-linkedin):hover,
.content p a:has(i.fa-orcid):hover {
  background: #e2e8f0;
  text-decoration: none !important;
}
.content p a:has(i.fa-github):visited,
.content p a:has(i.fa-linkedin):visited,
.content p a:has(i.fa-orcid):visited {
  color: var(--text) !important;
}

/* Publication badge links (PDF / code icons) */
.content li a:has(i.fa-file-pdf),
.content li a:has(i.fa-file-code) {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none !important;
  vertical-align: middle;
  margin-left: 0.25em;
  transition: opacity 0.15s ease;
}
.content li a:has(i.fa-file-pdf) {
  background: #fef2f2;
  color: #b91c1c !important;
  border: 1px solid #fecaca;
}
.content li a:has(i.fa-file-code) {
  background: #eff6ff;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe;
}
.content li a:has(i.fa-file-pdf):hover,
.content li a:has(i.fa-file-code):hover {
  opacity: 0.75;
}
.content li a:has(i.fa-file-pdf):visited,
.content li a:has(i.fa-file-code):visited {
  color: inherit !important;
}
/* Add text label after icon via sibling pseudo approach — use shortcode override instead */

/* Publications — tighten journal/conference entries */
.content ol {
  padding-left: 1.5em;
}
.content ol li {
  margin-bottom: 0.85em;
  line-height: 1.6;
}

/* --- Home page profile block --- */
#mainblock {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  padding: 2.5em 2.5em 2em;
  max-width: 800px;
  margin: 0 auto -1px;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 1em;
}
#textblock {
  display: block !important;
  width: auto !important;
  text-align: center;
}
#textblock h1 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.2em;
}
#textblock h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
}
#avatar {
  position: static !important;
  top: auto !important;
  padding: 0 !important;
  width: 120px !important;
  order: -1;
}
#avatar img {
  border-radius: 50% !important;
  border: 3px solid var(--border) !important;
  width: 120px !important;
  height: 120px !important;
  object-fit: cover;
  display: block !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
}

/* Align the content card flush below the profile block on home page */
#mainblock + .content {
  border-radius: 0 0 8px 8px;
  padding-top: 1.75em;
}

/* --- Content subhead (used in list pages) --- */
.content-subhead {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2.25em;
  margin-bottom: 0.5em;
}

/* --- Footer / small print --- */
.small-print {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* --- Responsive: mobile --- */
@media (max-width: 47.99em) {
  body {
    font-size: 14px;
  }

  /* Full-width cards, no radius on mobile */
  .content,
  #mainblock {
    border-radius: 0;
    box-shadow: none;
    padding-left: 1.25em;
    padding-right: 1.25em;
  }

  /* Fix hardcoded 400px width from theme */
  #textblock {
    width: 100% !important;
    max-width: 100% !important;
  }

  #textblock h1 {
    font-size: 1.4rem;
  }

  /* Smaller avatar on phone */
  #avatar {
    width: 80px !important;
  }
  #avatar img {
    width: 80px !important;
    height: 80px !important;
  }

  /* Make content readable — no overflow */
  .content {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Social + publication badges wrap nicely */
  .content p,
  .content li {
    line-height: 1.7;
  }

  /* Publication entries: badges drop to next line cleanly */
  .content ol li,
  .content ul li {
    overflow-wrap: break-word;
  }

  /* Header on inner pages */
  .header {
    padding: 1.5em 1.25em 1em;
    border-radius: 0;
  }
  .header h1 {
    font-size: 1.4rem;
  }
}
