/*!
 * Shared styles for people.math.wisc.edu/~spagnolie
 * Saverio E. Spagnolie / AMEP Lab
 *
 * Loaded by every page after css/bootstrap.min.css.
 * Replaces the old css/1-col-portfolio.css (its two rules are folded in below).
 *
 * The site's one accent color is UW crimson, #b70101. It is defined once here,
 * so changing it changes every heading, rule and border on the site.
 */

:root {
    --crimson: #b70101;
    --ink: #333;
    --muted: #666;
    --hairline: #ddd;
    --nav-link: #b70101;   /* nav bar link color; differs per site */
}

/* --- Base ---------------------------------------------------------- */

body {
    /* Required padding for .navbar-fixed-top; change if the nav height changes. */
    padding-top: 70px;
}

p { margin: .5em 0 .5em 0; }

footer { margin: 50px 0; }

a.pdf-link { white-space: nowrap; }

/* --- Navbar: current-page marker ------------------------------------
   The vendored css/bootstrap.min.css in each site folder was hand-themed years
   ago, and its .active rule was never updated to match:

       personal  color:#fff        on background:#E7D9C1   -> contrast 1.39:1
       AMEP Lab  color:#E7D9C1     on background:#E7D9C1   -> contrast 1.00:1

   Either way the current page's label is unreadable -- on the lab site it is
   literally the same color as the block behind it, so the nav looks like it has
   a blank gap in it. Do NOT fix this by editing bootstrap.min.css; it is a
   vendored file and every site convention here says shared styling lives in
   site.css. Override it instead.

   --nav-link is the bar's own link color and is the ONLY value that differs
   between the two copies of this stylesheet: crimson on the personal site
   (cream bar), white on the lab site (crimson bar). */
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
    color: var(--nav-link);
    background-color: transparent;
    font-weight: bold;
    box-shadow: inset 0 -3px 0 var(--nav-link);
}

/* --- Page header (title + UW logo), used on every page ------------- */

.page-head { margin-bottom: 0; }
/* The <h2> at the very top of every page. It is .page-name on a home page
   (a person's name, or the lab's) and .page-title everywhere else
   ("Publications", "Teaching", "People") -- same slot, same job, so the two
   share one rule and must never be allowed to drift apart again.

   Sept 2026, Saverio's call: the heading is 26px / weight 500 / near-black.
   Weight 500 is Helvetica Neue Medium -- a lighter, wider cut than Bold, which
   is the "cleaner" look he asked for. Crimson is now carried by .page-subtitle
   and the section headings, not by the page heading itself. */
.page-name,
.page-title {
    color: var(--ink);
    font-size: 26px;
    margin: 0 0 6px 0;
    font-weight: 500;
}
/* The crimson lines under a .page-name. Weight 500 to sit below the heading in
   the hierarchy -- at bold they read louder than the name above them. */
.page-subtitle {
    color: var(--crimson);
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 500;
}
.uw-logo { max-width: 200px; width: 100%; }
.uw-logo-sm { max-width: 170px; min-width: 130px; width: 100%; }

/* --- Section headings ---------------------------------------------- */

/* Major division of a page: "Current group", "Alumni", "Courses". */
.group-heading {
    margin: 40px 0 0 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--crimson);
}

/* Subdivision: "Ph.D. students", "Opportunities for undergraduates". */
.role-heading {
    color: var(--crimson);
    margin: 28px 0 14px 0;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: .02em;
}

/* Small label above a list of papers or links. */
.mini-heading {
    color: var(--crimson);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 20px 0 8px 0;
}

/* --- Person cards (People page, current group) --------------------- */

.person { margin-bottom: 26px; }
.person-photo {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center 20%;
    background-color: #f2f2f2;
    /* Thin echo of the 5px crimson frame on the group photos below. */
    border: 2px solid var(--crimson);
    margin-bottom: 8px;
}
.person-name {
    display: block;
    font-size: 16px;
    line-height: 1.3;
}
.person-years {
    color: var(--muted);
    font-size: 13px;
}
.person-note {
    display: block;
    font-size: 13px;
    color: var(--ink);
    margin-top: 2px;
}

/* --- Plain name lists (People page, alumni) ------------------------ */

.name-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.name-list > li { margin-bottom: 10px; }
.row + .name-list { margin-top: 4px; }

/* --- Link lists (Home, Seminars, Teaching) ------------------------- */

.link-list {
    list-style: none;
    padding-left: 0;
}
.link-list > li {
    margin-bottom: 14px;
    line-height: 1.4;
}
/* Entry titles, whether or not they are links, sit at the same size. */
.link-list > li > a,
.link-list > li > .title { font-size: 17px; }
.link-list .note {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 1px;
}

/* Tighter variant for long lists of papers. */
.paper-list {
    list-style: none;
    padding-left: 0;
}
.paper-list > li {
    margin-bottom: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    padding-left: 1em;
    text-indent: -1em;
}

/* --- Tables (Teaching) --------------------------------------------- */

.site-table {
    width: 100%;
    margin-bottom: 20px;
}
.site-table th {
    color: var(--crimson);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 2px solid var(--crimson);
    padding: 6px 12px 6px 0;
    white-space: nowrap;
}
.site-table td {
    padding: 7px 12px 7px 0;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.site-table td.term {
    white-space: nowrap;
    color: var(--muted);
    width: 1%;
}
.site-table td.course {
    white-space: nowrap;
    font-weight: bold;
    width: 1%;
}
.table-scroll { overflow-x: auto; }
.table-note {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* --- Research topics ----------------------------------------------- */

.topic { margin-bottom: 40px; }
.topic h3 {
    margin-top: 0;
    font-size: 22px;
}
.topic figure { margin: 0 0 14px 0; }
.topic figure img { width: 100%; }
.topic figcaption {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
}

/* --- Publication entries ------------------------------------------- */

.pub { margin-bottom: 10px; }
.pub h4 {
    margin-top: 0;
    line-height: 1.35;
}
.pub .authors {
    color: var(--ink);
    margin: 0 0 10px 0;
}
.pub .abstract {
    font-size: 13.5px;
    line-height: 1.5;
}
.pub-figure { margin-bottom: 10px; }
.pub-figure img { width: 100%; }
.movie-list {
    list-style: none;
    padding-left: 0;
    font-size: 13px;
}
.movie-list > li { margin-bottom: 6px; }

/* --- Group photos (People) ----------------------------------------- */

.group-photo { margin: 0 0 45px 0; }
.group-photo img {
    border: 5px solid var(--crimson);
    margin: 0 auto;
}
.group-photo h4 {
    color: var(--crimson);
    text-align: center;
}
.group-photo figcaption {
    font-size: 13px;
    color: var(--crimson);
    margin-top: 10px;
    text-align: center;
}

/* --- Framed images (Home, Contact) --------------------------------- */

.framed-crimson {
    border: 5px solid var(--crimson);
    width: 100%;
}
.framed-grey {
    border: 5px solid #999;
    width: 100%;
}
/* Breathing room when side-by-side figures stack on a phone or tablet. */
@media (max-width: 991px) {
    .stack-gap { margin-top: 20px; }
}

.photo-credit {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    margin-top: 6px;
}

/* --- Callouts ------------------------------------------------------ */

.callout {
    color: var(--crimson);
    text-align: center;
    font-weight: bold;
    margin: 24px 0;
}

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

.site-footer {
    border-top: 1px solid var(--hairline);
    margin-top: 50px;
    padding: 20px 0 70px 0;
    font-size: 13px;
    color: var(--muted);
}

.page-end { margin: 20px 0 80px 0; }
