/* tovigrossman.com
 *
 * Layout breakpoints (unchanged from the 2019-2025 design):
 *   small phone  <= 345px   single column, no photo
 *   phone        346-574px  photo beside contact info, filter shown as a dropdown
 *   tablet       575-960px  thumbnails beside citations, filter buttons inline
 *   desktop      >= 961px   fixed 960px page, grey header band, photo beside bio
 */

:root {
  --page-width: 960px;
  --bg: #E8E8E8;
  --paper: #FFFFFF;
  --band: #C0C0C0;
  --footer: #CFCFCF;
  --nav: #333;
  --nav-text: #f2f2f2;
  --highlight: #FFEEE6;
  --award-text: #953100;
  --muted: #7f7f7f;
  --gutter: 20px;
}

@font-face {
  font-family: Chicago;
  src: url(fonts/ChiKareGo2.ttf);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
}

a:link {
  color: black;
}

p.spaced {
  margin-bottom: 6px;
}

hr.center,
hr.left {
  border: 0;
  height: 1px;
}

hr.center {
  width: 300px;
  margin: 0 auto;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

hr.left {
  width: 60%;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

/* ------------------------------------------------------------ top navigation */

.topnav {
  max-width: var(--page-width);
  margin: auto;
  overflow: hidden;
  background-color: var(--nav);
}

.topnav a {
  float: left;
  display: block;
  color: var(--nav-text);
  text-align: center;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav-toggle {
  display: none;
  float: right;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--nav-text);
  background: none;
  border: 0;
  cursor: pointer;
}

@media (max-width: 650px) {
  .topnav { position: relative; }
  .topnav a { display: none; }
  .topnav-toggle { display: block; }
  .topnav.open .topnav-toggle { position: absolute; top: 0; right: 0; }
  .topnav.open a { float: none; display: block; text-align: left; }
}

.to-top {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 99;
  font-size: 14px;
  border: none;
  background-color: var(--nav);
  color: white;
  cursor: pointer;
  padding: 10px;
  opacity: 0.8;
}

.to-top:hover {
  background-color: #555;
}

/* ------------------------------------------------------------ page + intro */

.page {
  background-color: var(--paper);
}

.intro {
  display: grid;
  grid-template-columns: 40% 60%;
  grid-template-areas:
    "name    name"
    "photo   contact"
    "bio     bio";
}

.intro-name {
  grid-area: name;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  font-family: "Times New Roman", Times, serif;
  font-size: 32px;
  background-color: var(--band);
}

.intro-contact {
  grid-area: contact;
  padding: 15px var(--gutter) 0;
  font-size: 14px;
  text-align: left;
}

.intro-photo {
  grid-area: photo;
  padding: 10px var(--gutter) 0 0;
  text-align: right;
}

.intro-photo img {
  height: 180px;
}

.intro-bio {
  grid-area: bio;
  padding: var(--gutter);
}

.social-icons {
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
}

.social-icons img {
  width: 30px;
  height: 30px;
}

.announcement {
  background-color: var(--highlight);
  padding: var(--gutter);
  text-align: center;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------ section blocks */

.section-head {
  padding: 0 0 18px var(--gutter);
}

.team-section .section-head {
  padding-top: 18px;
}

.pubs .section-head {
  padding-bottom: 0;
}

.text-block {
  padding: 0 var(--gutter);
  font-size: 14px;
}

.text-block p.group {
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

/* team cards */
.team {
  display: flex;
  flex-wrap: wrap;
  margin: 0 5px;
}

.member {
  width: 145px;
  margin: 0 5px 20px;
  text-align: center;
  font-size: 14px;
}

.member img {
  width: 120px;
  height: 150px;
  border: 1px solid #333333;
}

.member .role {
  font-size: 13px;
}

/* ------------------------------------------------------------ publication filter */

.filters {
  position: relative;
  padding: 5px 0 5px var(--gutter);
}

.btn {
  border: 0.5px solid #999999;
  padding: 4px;
  margin: 4px;
  background-color: #f1f1f1;
  font: inherit;
  font-size: 13.33px;
  color: black;
  cursor: pointer;
}

.btn:hover {
  background-color: #ddd;
}

.btn.active {
  background-color: #666;
  color: white;
}

.filter-toggle {
  border: 0.5px solid #999999;
  padding: 10px;
  margin-bottom: 2px;
  background-color: #666;
  color: white;
  font: inherit;
  font-size: 13.33px;
  cursor: pointer;
}

.filter-toggle:hover,
.filter-toggle:focus {
  background-color: #444;
}

/* phone: the buttons live in a dropdown under the toggle */
.filter-menu {
  display: none;
  position: absolute;
  z-index: 1;
  width: 80%;
  background-color: var(--paper);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.filters.open .filter-menu {
  display: block;
}

/* ------------------------------------------------------------ publications */

.pub-list {
  transition: opacity 0.25s linear;
}

.pub-list.fading {
  opacity: 0;
}

.pub-header {
  display: flex;
  align-items: center;
  height: 20px;
  padding-left: var(--gutter);
  background-color: #000000;
  color: white;
  font-size: 18px;
}

.pub {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "venue"
    "thumb"
    "info";
}

/* the thin divider under each entry (not after the last one in a group) */
.pub::after {
  content: "";
  height: 1px;
  width: calc((100% - var(--gutter)) * 0.6);
  margin-left: var(--gutter);
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

.pub.last::after {
  display: none;
}

.pub-venue {
  grid-area: venue;
  padding: 10px 0 10px var(--gutter);
  font-weight: bold;
}

.pub-thumb {
  grid-area: thumb;
  padding: 0 var(--gutter);
}

.pub-thumb img,
.pub-thumb video {
  display: block;
  width: 100%;
  max-width: 212px;
  max-height: 159px;
  object-fit: contain;
  object-position: left;
}

.pub-info {
  grid-area: info;
  padding: 10px var(--gutter);
  font-size: 14px;
}

.pub-cite {
  margin-bottom: 1.15em;
}

.pub-cite.has-awards {
  margin-bottom: 0;
}

.pub-links img {
  height: 16px;
  vertical-align: text-bottom;
}

/* award banners */
.awards {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 10px 0;
}

.award {
  display: flex;
  align-items: center;
  gap: 2px;
  background-color: var(--highlight);
  color: var(--award-text);
  font-weight: bold;
}

.award img {
  height: 32px;
  border: 5px solid var(--highlight);
}

.award a:link {
  color: var(--award-text);
}

.award-classic {
  background: url(icons/back.gif);
}

.award-classic span {
  width: 160px;
  margin: 0 auto;
  padding: 2px 0;
  background-color: var(--paper);
  color: black;
  text-align: center;
  font-family: Chicago, monospace;
  font-size: 20px;
}

/* ------------------------------------------------------------ footer */

.footer {
  padding: 10px var(--gutter) 10px 0;
  background-color: var(--footer);
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  text-align: right;
}

/* ============================================================ small phone */
@media (max-width: 345px) {
  .intro {
    grid-template-columns: 100%;
    grid-template-areas: "name" "contact" "bio";
  }
  .intro-name { font-size: 20px; text-align: center; }
  .intro-photo { display: none; }
  .intro-contact { text-align: center; }
  .social-icons { justify-content: center; }
  hr.left, hr.center { width: 100%; }
  .pub::after { width: calc(100% - var(--gutter)); }
}

/* ============================================================ tablet + desktop */
@media (min-width: 575px) {
  .filters { padding-left: var(--gutter); }
  .filter-toggle { display: none; }
  .filter-menu {
    display: block;
    position: static;
    width: auto;
    box-shadow: none;
  }

  .pub {
    grid-template-columns: 232px 1fr;
    grid-template-areas:
      "thumb venue"
      "thumb info";
    align-items: center;
  }
  .pub::after { grid-column: 1 / -1; }

  .pub-venue {
    align-self: end;
    padding: 10px var(--gutter) 1.15em;
    font-size: 16px;
  }
  .pub-thumb {
    padding: 10px 0 10px var(--gutter);
    display: flex;
    justify-content: center;
  }
  .pub-thumb img,
  .pub-thumb video { object-position: center; }
  .pub-info {
    align-self: start;
    padding-top: 0;
    font-size: 16px;
  }
}

/* ============================================================ tablet only */
@media (min-width: 575px) and (max-width: 960px) {
  .intro { grid-template-columns: 30% 70%; }
  .intro-photo { padding: 20px var(--gutter) 0 0; height: 250px; }
  .intro-photo img { height: 230px; }
  .intro-contact {
    display: flex;
    align-items: center;
    height: 265px;
    font-size: 16px;
  }
}

/* ============================================================ desktop */
@media (min-width: 961px) {
  .page {
    width: var(--page-width);
    margin: 0 auto;
  }

  .intro {
    grid-template-columns: 30% 70%;
    grid-template-areas:
      "name    name"
      "contact contact"
      "photo   bio";
  }
  .intro-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 245px;
    padding: 0 calc(15% + var(--gutter));
    background-color: var(--band);
    font-size: 16px;
    text-align: center;
  }
  .social-icons { justify-content: center; }
  .intro-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 430px;
    padding: 0;
  }
  .intro-photo img { height: 400px; }
  .intro-bio { padding: 10px; }
}
