/* Enrico Daga — personal site. One column, one typeface, one accent. */

:root {
  --fg: #141414;
  --muted: #5c5c5c;
  --rule: #e2e2e2;
  --link: #1d4f91;
  --bg: #ffffff;
  --note: #f4f6f9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e6;
    --muted: #a3a3a3;
    --rule: #333333;
    --link: #8db4ec;
    --bg: #131313;
    --note: #1c1f24;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main, footer { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
main { padding-top: 3.5rem; padding-bottom: 2.5rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 0.3rem; }
h2 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem; padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}
p { margin: 0 0 0.9rem; }
.sub { color: var(--muted); margin: 0; }
section { margin-top: 2.6rem; }

/* Header */
.id { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.links { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.93rem; }
.photo { width: 104px; height: 104px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

.notice { margin: 2rem 0 0; padding: 0.6rem 0.85rem; background: var(--note); border-left: 3px solid var(--link); font-size: 0.95rem; }
.bio { margin-top: 2.2rem; }


/* Projects: logos with a link, role and years */
.projects {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.6rem 1.5rem;
}
.projects a { display: block; color: inherit; }
.projects a:hover { text-decoration: none; }
.logo { height: 3rem; display: flex; align-items: center; }
.logo img { max-width: 100%; height: auto; filter: grayscale(1); opacity: 0.85; transition: filter .15s, opacity .15s; }
.projects a:hover .logo img { filter: none; opacity: 1; }
@media (prefers-color-scheme: dark) { .logo img { background: #fff; padding: 3px 5px; border-radius: 3px; } }
.wordmark { font-weight: 600; font-size: 1.02rem; line-height: 1.2; letter-spacing: -0.01em; }
.projects a:hover .wordmark { color: var(--link); }
.pname { color: var(--fg); }
.meta { display: block; margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.35; color: var(--muted); }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { margin: 0 0 0.95rem; font-size: 0.95rem; line-height: 1.5; }
.pubs .ti { font-weight: 600; }
.pubs .ve i { font-style: italic; }
.pubs .lk { font-size: 0.85rem; white-space: nowrap; }
.pubs strong { font-weight: 600; }
.year { margin-top: 2.2rem; }
.more { margin-top: 1.2rem; font-size: 0.95rem; }
.back { font-size: 0.93rem; margin-bottom: 1.4rem; }
.back a::before { content: "← "; }

footer { padding-top: 1rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.82rem; }
footer::before { content: ""; display: block; border-top: 1px solid var(--rule); margin-bottom: 1rem; }

@media (max-width: 560px) {
  html { font-size: 16px; }
  main { padding-top: 2rem; }
  .photo { width: 76px; height: 76px; }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  .photo, .notice, footer { display: none; }
  a { color: inherit; }
}
