/* Marco Tibullo — personal website. Style inspired by the al-folio theme. */
:root {
  --bg: #ffffff;
  --text: #212529;
  --muted: #6c757d;
  --accent: #1a3a6b;          /* change this one value to recolour the site */
  --accent-soft: rgba(26, 58, 107, 0.07);
  --border: #e5e7eb;
  --nav-bg: rgba(255, 255, 255, 0.96);
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
:root[data-theme="dark"] {
  --bg: #1c1c1d;
  --text: #e8e8e8;
  --muted: #a0a0a0;
  --accent: #8ab4f0;
  --accent-soft: rgba(138, 180, 240, 0.12);
  --border: #333;
  --nav-bg: rgba(28, 28, 29, 0.96);
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main a { font-weight: 500; }
strong, b { font-weight: 500; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.navbar .inner {
  max-width: 960px; margin: 0 auto; padding: 0 16px;
  height: 58px; display: flex; align-items: center; justify-content: flex-end;
}
.brand { color: var(--text); font-size: 1.15rem; }
.brand b { font-weight: 500; }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text); padding: 6px 12px; border-radius: 4px; font-weight: 400;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); font-weight: 500; }
.theme-toggle {
  background: none; border: 0; cursor: pointer; color: var(--text);
  font-size: 1rem; padding: 6px 10px;
}
.theme-toggle:hover { color: var(--accent); }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.3rem; cursor: pointer; }

@media (max-width: 640px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--nav-bg); padding: 8px 16px 14px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Page ---------- */
main { max-width: 960px; margin: 0 auto; padding: 40px 16px 24px; }
.post-header h1 {
  font-size: 2.6rem; font-weight: 500; margin: 0 0 28px; letter-spacing: -0.5px;
}
.post-header .desc { color: var(--muted); margin: 0 0 28px; }
h2 {
  font-size: 1.45rem; font-weight: 400; color: var(--accent);
  margin: 2.2rem 0 1rem; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.1rem; font-weight: 500; margin: 1.4rem 0 .4rem; }

/* ---------- Profile (home) ---------- */
.profile {
  float: right; width: 38%; max-width: 340px;
  margin: 0 0 20px 32px; text-align: center;
}
.profile img {
  width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); display: block;
}
.profile .address { font-size: .88rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }
@media (max-width: 640px) {
  .profile { float: none; width: 75%; margin: 0 auto 24px; }
}
.clearfix::after { content: ""; display: table; clear: both; }

.social {
  clear: both; text-align: center; margin: 44px 0 8px;
}
.social .contact-note { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.social a {
  color: var(--text); font-size: 1.9rem; margin: 0 10px; display: inline-block;
  transition: color .15s, transform .15s;
}
.social a:hover { color: var(--accent); transform: translateY(-2px); text-decoration: none; }

.interests { list-style: none; counter-reset: item; padding-left: 1.2em; margin: -0.4em 0 1em; }
.interests li { counter-increment: item; margin: 2px 0; }
.interests li::before { content: "(" counter(item, lower-roman) ") "; color: var(--muted); }

/* ---------- Research list ---------- */
.paper { padding: 14px 0 16px; border-bottom: 1px solid var(--border); }
.paper:last-child { border-bottom: 0; }
.paper .title { font-weight: 500; font-size: 1.06rem; }
.paper .authors { color: var(--muted); font-size: .96rem; }
.paper .venue { font-style: italic; font-size: .95rem; }
.paper .buttons { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.btn {
  font-size: .78rem; font-weight: 400; text-transform: uppercase; letter-spacing: .4px;
  padding: 2px 10px; border: 1px solid var(--accent); border-radius: 3px;
  color: var(--accent); background: transparent; cursor: pointer; font-family: inherit;
}
.btn:hover, .btn[aria-expanded="true"] {
  background: var(--accent); color: var(--bg); text-decoration: none;
}
.abstract {
  display: none; margin-top: 10px; padding: 12px 16px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0; font-size: .96rem;
}
.abstract.open { display: block; }
.abstract p { margin: 0 0 .6em; }
.abstract p:last-child { margin-bottom: 0; }
.presented { font-size: .9rem; color: var(--muted); }
.note { font-size: .88rem; color: var(--muted); margin-top: 1.2rem; }

/* ---------- Teaching ---------- */
.course-list { list-style: none; padding: 0; margin: 0; }
.course-list li {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.course-list li:last-child { border-bottom: 0; }
.course-list .course { font-weight: 400; }
.course-list .detail { color: var(--muted); font-size: .92rem; }
.tag {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .4px;
  background: var(--accent-soft); color: var(--accent); padding: 1px 8px; border-radius: 3px;
  margin-left: 6px; vertical-align: 2px; font-weight: 500;
}

/* ---------- Footer ---------- */
footer {
  max-width: 960px; margin: 40px auto 0; padding: 18px 16px 30px;
  text-align: center; font-size: .85rem; color: var(--muted);
  border-top: 1px solid var(--border);
}
