/* =========================================================
   Francisco Poggi — personal site
   Single stylesheet. Edit colors/spacing here; content
   lives in index.html.
   ========================================================= */

:root {
  --accent:    #2d5873;   /* steel blue — same primary as the old wowchemy theme */
  --text:      #212528;
  --muted:     #64707a;
  --rule:      #e1e7ec;
  --bg:        #fbfcfd;   /* very soft off-white, cool-tinted */
  --serif:     Georgia, "Times New Roman", "Iowan Old Style", serif;
  --max-width: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--accent);   /* full-width accent band anchors the page */
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

.wrap {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.spacer { flex: 1; }  /* pushes the footer to the bottom on short pages */

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

/* ---------- header / masthead ---------- */
header.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 30px 0 22px;
}
header.masthead img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #e8edf2;
}
header.masthead h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
header.masthead .role {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}
header.masthead .role a { color: var(--muted); }

/* ---------- tabs (below the masthead, identical on every page) ---------- */
nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin: 0 0 32px;
  border-bottom: 1px solid var(--rule);
}
nav.tabs a {
  padding: 0 2px 9px;
  margin-bottom: -1px;              /* active border sits on top of the rule */
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 15.5px;
}
nav.tabs a:hover {
  color: var(--accent);
  text-decoration: none;
}
nav.tabs a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- panels (tab content; JS toggles .visible) ---------- */
.panel { display: none; }
.panel.visible {
  display: block;
  /* softens the layout collapse when switching to a short panel */
  min-height: 30vh;
}

/* ---------- body prose ---------- */
.panel > p {
  margin: 0 0 18px;
  max-width: 60ch;   /* keep the measure comfortable */
}

/* ---------- news callout ---------- */
.news {
  border-left: 3px solid var(--accent);
  background: #edf2f6;
  padding: 13px 18px;
  margin: 28px 0;
  font-size: 15.5px;
  line-height: 1.55;
  border-radius: 0 6px 6px 0;
  max-width: 60ch;
}
.news strong { color: var(--accent); }

/* ---------- section heading ---------- */
h2 {
  align-self: flex-start;  /* keep border only as wide as the text */
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  margin: 50px 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ---------- research / paper list ---------- */
.paper {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.paper:first-of-type { padding-top: 14px; }
.paper .paper-head { margin: 0; }
.paper .title {
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
}
.paper .title a { color: var(--accent); }
.paper .title a:hover { text-decoration: underline; }
.paper .meta {
  color: var(--muted);
  font-size: 15px;
}
.paper .status { font-style: italic; }
.paper .abstract {
  margin: 8px 0 2px;
  padding-left: 16px;
  color: #3d454c;
  font-size: 15.5px;
  line-height: 1.6;
  border-left: 2px solid var(--rule);
}

/* ---------- footer ---------- */
footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- responsive ---------- */
@media (max-width: 520px) {
  header.masthead { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 22px; }
  header.masthead img { width: 150px; height: 150px; }
  header.masthead h1 { font-size: 28px; }
}
