/* azevedo.info — site styles
   Keeps the look of the old PerfectCV theme (dark red accents, serif headings,
   label-on-the-left layout) with cleaner type, more contrast and a mobile menu. */

:root {
  --red: #a81a00;          /* links, accents (7:1 on white) */
  --red-dark: #7d1300;
  --red-bar: #9b0500;
  --ink: #2b2b2b;          /* body text */
  --muted: #595959;        /* secondary text (7:1 on white) */
  --line: #e2ded8;
  --bg: #f3f1ed;
  --card: #ffffff;
  --chip: #f6efe9;
  --serif: "Arvo", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover, a:focus-visible { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
strong { color: #1d1d1d; }

/* ---------- top bar & navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; min-height: 60px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--red); text-decoration: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; padding: 18px 12px 16px; color: var(--red); font-family: var(--serif);
  font-size: .98rem; border-top: 4px solid transparent;
}
.nav a:hover { text-decoration: none; color: var(--red-dark); border-top-color: #e7c9c2; }
.nav a[aria-current="page"] { color: #5a5a5a; border-top-color: var(--red-bar); }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit;
}
.menu-toggle svg { display: block; }

/* ---------- page frame ---------- */
.page {
  max-width: var(--wrap); margin: 28px auto 0; background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 28px rgba(0,0,0,.05); border-radius: 4px;
}
.hero { text-align: center; padding: 44px 24px 34px; border-bottom: 1px solid var(--line); }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; line-height: 1.15; color: #3a3a3a; }
.hero p { margin: 8px 0 0; color: var(--muted); font-family: var(--serif); font-size: 1.1rem; }

.row { display: grid; grid-template-columns: 230px 1fr; gap: 0 36px; padding: 44px 48px; }
.row + .row { border-top: 1px solid var(--line); }
.row-label { text-align: right; }
.row-label h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0; line-height: 1.2; color: #3a3a3a; }
.row-label p { margin: 6px 0 0; color: var(--red); font-size: .95rem; line-height: 1.35; }
.row-body { border-left: 1px solid var(--line); padding-left: 36px; min-width: 0; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 230px; gap: 36px; }
.about-photo {
  float: left; width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  margin: 4px 22px 10px 0; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line);
}
.about-text p:first-child { margin-top: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; font-size: .97rem; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--muted); }
.contact-list svg { flex: 0 0 20px; margin-top: 3px; color: #3a3a3a; }
.contact-list a { word-break: break-word; }
.cv-cta { display: inline-block; margin-top: 6px; }

/* ---------- timeline (education / experience) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 0 0 22px; }
.timeline .when { color: var(--red); font-size: .95rem; padding-top: 2px; }
.timeline h3 { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; margin: 0; color: #2f2f2f; }
.timeline .where { color: var(--muted); margin: 2px 0 0; }
.timeline ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.timeline ul li { display: list-item; padding: 0 0 4px; }

/* ---------- generic prose (projects, teaching, blog) ---------- */
.prose h2 { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: #3a3a3a; margin: 34px 0 14px; padding-bottom: 6px; border-bottom: 2px solid var(--chip); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; margin: 22px 0 2px; color: #2f2f2f; }
.prose .meta, .prose p.meta { color: var(--red); font-size: .93rem; margin: 0 0 4px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; }
.prose iframe { max-width: 100%; aspect-ratio: 4 / 3; height: auto; border: 0; }

/* ---------- publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 8px; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-filters button {
  font: inherit; font-size: .9rem; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.pub-filters button:hover { border-color: #c9b8ad; }
.pub-filters button[aria-pressed="true"] { background: var(--red-bar); border-color: var(--red-bar); color: #fff; }
.pub-filters .n { opacity: .75; margin-left: 4px; }
.pub-search { flex: 1 1 220px; min-width: 0; }
.pub-search input {
  width: 100%; font: inherit; font-size: .95rem; padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--ink);
}
.pub-search input:focus { outline: 2px solid #e8c2b8; border-color: #c9a596; }
.pub-count { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.pub-year { font-family: var(--serif); font-size: 1.25rem; color: #3a3a3a; margin: 30px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--chip); }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.pub-title a { color: var(--red); }
.pub-details { color: var(--muted); font-size: .95rem; margin-top: 3px; }
.pub-details p { margin: 0; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.tag { font-size: .75rem; letter-spacing: .02em; text-transform: uppercase; color: #6b4a3d; background: var(--chip); border-radius: 4px; padding: 1px 7px; }
.chip { font-size: .8rem; border: 1px solid #e6d3cb; border-radius: 999px; padding: 1px 9px; }
.chip:hover { background: var(--chip); text-decoration: none; }
.pub-note { color: var(--muted); font-size: .85rem; margin-top: 30px; }

/* ---------- students ---------- */
.people { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: #fff; }
.person .name { font-weight: 600; color: #222; }
.person .sub { color: var(--muted); font-size: .9rem; }
.person .topic { font-size: .93rem; font-style: italic; margin-top: 4px; color: #3d3d3d; }
.msc-list summary { cursor: pointer; color: var(--red); margin: 6px 0 10px; }
.msc-list li { margin-bottom: 6px; color: var(--muted); }

/* ---------- blog ---------- */
.post + .post { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.post h2 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; margin: 0 0 4px; }
.post .date { color: var(--red); font-size: .93rem; margin: 0 0 14px; }

/* ---------- footer / contact ---------- */
.site-footer { background: #eef3f5; border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; }
.site-footer .row-body p { margin: 0 0 10px; }
.button {
  display: inline-block; background: var(--red-bar); color: #fff; padding: 10px 22px; border-radius: 4px; font-weight: 600;
}
.button:hover { background: #6e0d00; color: #fff; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.colophon { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 40px; color: var(--muted); font-size: .85rem; text-align: center; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(60,60,60,.75); color: #fff; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: #333; color: #fff; text-decoration: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .row { grid-template-columns: 1fr; padding: 32px 22px; }
  .row-label { text-align: left; margin-bottom: 16px; }
  .row-label p br { display: none; }
  .row-body { border-left: 0; padding-left: 0; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .page { margin-top: 0; border-radius: 0; }
  .site-footer { border-radius: 0; }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: 0 8px 18px rgba(0,0,0,.08); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 6px 0; }
  .nav a { padding: 12px 24px; border-top: 0; border-left: 4px solid transparent; }
  .nav a[aria-current="page"] { border-left-color: var(--red-bar); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .hero { padding: 30px 18px 24px; }
}

@media print {
  .topbar, .site-footer, .to-top, .pub-tools { display: none !important; }
  body { background: #fff; }
  .page { box-shadow: none; margin: 0; }
}
