/* ===========================
   1) TOKENS (Design system)
   =========================== */
:root {
  --color-main: red;
  --color-link: #007BA7;
  --color-border: #555;
  --color-select: #98B4D4;
  --color-accent: rebeccapurple;
  --color-background: #f8f9fa;
  --color-header: rgb(250, 250, 250);

  --font-sans: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
  --font-title: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;

  --radius-card: 0.8rem;

  /* Type scale (1rem = 10px trick) */
  --fs-100: 1.2rem; /* 12px */
  --fs-200: 1.4rem; /* 14px */
  --fs-300: 1.6rem; /* 16px, body */
  --fs-400: 1.8rem; /* 18px, header */
  --fs-500: 2.0rem; /* 20px, h2 */
  --fs-600: 2.4rem; /* 24px, h1 */

  /* Page widths */
  --page-px: 5%;
  --page-max: 85rem;
}

/* ===========================
   2) BASE
   =========================== */
html {
  font-size: 62.5%; /* 1rem ≈ 10px */
  font-family: var(--font-sans);
}

body {
  font-size: var(--fs-300);
  margin: 0;
  background-color: var(--color-background);
}

p { text-align: justify; }

::selection {
  background: var(--color-select);
  color: black;
}

a {
  color: var(--color-link);
  text-decoration: none;
}
a:hover {
  color: var(--color-border);
  text-decoration-color: var(--color-accent);
}

/* Better sizing math */
*,
*::before,
*::after {
  box-sizing: border-box;
}


/* Prevent horizontal scrolling caused by long words/links */
body {
  overflow-x: hidden;
}

main, p, a, li {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Headings */
h1 { font-size: var(--fs-600); }
h2 { font-size: var(--fs-500); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===========================
   Header & Footer
   =========================== */

header {
  margin: 0 0 4rem;
  padding: 1.5rem 0rem;
  background-color: var(--color-header);
  box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.10);
}

.header-row {
  font-size: var(--fs-400);
  display: flex;
  justify-content: space-between;
}

.header-row .title {
  font-weight: 500;
  font-size: 2rem;
  color: black;
  text-decoration: none;
  font-family: var(--font-title);
  display: inline-flex;   /* or flex */
  align-items: center;
  gap: 4px;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  color: grey;
  text-decoration: none;
}

nav .active {
  color: black;
  text-decoration: none;
}

.column {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem)
}


/* Footer */
footer {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  padding: 1.2rem 0;
  font-size: var(--fs-200);
  text-align: center;
}

/* Logo + separators */
.logo { text-align: center; margin: 1rem auto 3rem; }
.logo a { font-weight: bold; color: black; text-decoration: none; }

.separator {
  margin: 0 0.75rem;
  border: 0.6px solid;
}



.card {
  /* border: 0.5px solid #ddd; */
  background: #fff;
  padding: 1rem 3rem 1rem;
  box-shadow: 1px 1px .25rem rgba(0,0,0,.1);
}

/* ===========================
   CV
   =========================== */

.favicon {
  height: 16px;
  vertical-align: middle;
  margin-right: 10px;
  padding-top: 2px;
}

.entry{
  flex: auto;
}

.line-with-icon {
  display: flex;
}


article .header {
  font-size: var(--fs-200);
  font-style: italic;
  color: var(--color-border);
}

/* Publications */
.publication .series { font-weight: 600; }
.publication .title { font-style: normal; font-weight: 600; }
.publication .metadata .author.hg { font-weight: 500; }
.publication .abstract {
  margin-left: 0.5em;
  padding-left: 1.5rem;
  /* border-left: 1px solid var(--color-accent); */
}
.publication .abstract > p:first-child { margin-top: 0; }
.publication .abstract > p:last-child  { margin-bottom: 0; }
.publication summary:hover { cursor: pointer; color: var(--color-border); }

/* Cards (e.g., with Bootstrap) */
.card { border-radius: var(--radius-card); /* remove !important if possible */ }

/* @media (max-width: 768px) {

  Make header vertical instead of squeezed
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  Navigation: stack links + bigger tap targets
  nav {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  nav a {
    padding: 0.8rem 0;
    width: 100%;
  }

  Improve margin/padding on small screens
  header {
    margin-bottom: 2rem;
    padding: 1rem 0;
  }

  .column {
    padding-inline: 1rem;
  }

  Ensure text remains readable on small screens
  body {
    font-size: var(--fs-300);
    line-height: 1.5;
  }

  Prevent long justified text rivers on narrow screens
  p {
    text-align: left;
  }

  Footer: center everything
  footer {
    flex-direction: column;
    gap: 0.5rem;
  }
} */
