/* =========================================================
   Riccardo Lazzarini — personal website
   Stile minimale accademico, adattato da Jon Barron.
   ========================================================= */

:root {
  --text:        #1a1a1a;
  --muted:       #6b6b6b;
  --link:        #1a4f8b;
  --link-hover:  #c0392b;
  --rule:        #e3e3e3;
  --badge-bg:    #eef2f7;
  --badge-text:  #3a5a80;
  --max-width:   820px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text:       #e6e6e6;
    --muted:      #9a9a9a;
    --link:       #7fb2e5;
    --link-hover: #ff8a75;
    --rule:       #333333;
    --badge-bg:   #23303d;
    --badge-text: #9dc0e6;
  }
  body { background: #121212; }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Charter", "Georgia", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ------------------------- Links ------------------------- */

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

/* ------------------------- Intro ------------------------- */

.intro {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.intro-text { flex: 1 1 auto; min-width: 0; }

.intro-photo { flex: 0 0 190px; }

.intro-photo img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.intro p { margin: 0 0 14px; }

.contact { color: var(--muted); }

.links {
  margin-top: 18px;
  font-size: 16px;
}

.links .sep {
  color: var(--muted);
  margin: 0 7px;
}

/* ------------------------- Sections ------------------------- */

section { margin-top: 44px; }

h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ------------------------- Entries ------------------------- */

.entry {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.entry-thumb { flex: 0 0 165px; }

.entry-thumb img {
  width: 165px;
  height: 105px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule);
  display: block;
  background: var(--badge-bg);
}

.entry-body { flex: 1 1 auto; min-width: 0; }

/* Voce senza miniatura */
.entry-text { margin-bottom: 26px; }

.entry-text h3,
.entry-body h3 {
  font-size: 17.5px;
  font-weight: 600;
  margin: 0 0 5px;
  line-height: 1.4;
}

.authors {
  margin: 0 0 7px;
  font-size: 16px;
}

.abstract {
  margin: 0 0 7px;
  font-size: 15.5px;
  color: var(--muted);
}

.entry-links { margin: 0; font-size: 15px; }

.badge {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: 2px;
  margin-left: 6px;
}

/* ------------------------- Lists ------------------------- */

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.plain li {
  margin-bottom: 9px;
  padding-left: 1.1em;
  text-indent: -1.1em;
}

ul.plain li::before {
  content: "\2013";
  color: var(--muted);
  margin-right: .55em;
}

.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14.5px;
  color: var(--muted);
}

.role {
  font-weight: 600;
  font-size: 15.5px;
}

.muted { color: var(--muted); font-size: 15px; }

/* ------------------------- Footer ------------------------- */

footer {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--muted);
}

footer p { margin: 0; }

/* ------------------------- Mobile ------------------------- */

@media (max-width: 640px) {
  body { font-size: 16px; }

  .page { padding: 32px 18px 60px; }

  .intro {
    flex-direction: column-reverse;
    gap: 20px;
    align-items: center;
    text-align: left;
  }

  .intro-photo { flex: none; align-self: flex-start; }

  .intro-photo img { width: 140px; height: 140px; }

  h1 { font-size: 26px; }

  .entry { flex-direction: column; gap: 12px; }

  .entry-thumb { flex: none; }

  .entry-thumb img { width: 100%; height: 160px; }
}
