/* Shared appearance for all pages. Change the values here to restyle the site. */
:root {
  --page-width: 668px;
  --panel-heading: #e0e0e0;
  --panel-border: #222;
  --text: #111;
  --link: #555;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  color-scheme: light;
  /* Keep the layout width stable when moving between short and long pages. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 8px 16px 36px;
  color: var(--text);
  background: white url("assets/tensor-network-background.png") repeat;
  font: 16px/1.25 Cambria, Georgia, "Times New Roman", serif;
}
.site { width: min(100%, var(--page-width)); margin-inline: auto; }
.site-header {
  padding-block: 28px;
  background: url("assets/navigation-top.png") center top / 100% 29px no-repeat,
              url("assets/navigation-bottom.png") center bottom / 100% 28px no-repeat;
  /* Hide the page background through the transparent tensor artwork. */
  background-color: #fff;
}
nav {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 0 24px;
  background: #fff;
}
nav a {
  padding: 2px 4px 5px;
  color: #111;
  font-size: 21px;
  text-decoration: none;
}
nav a[aria-current="page"] { font-weight: bold; }
nav a:hover { text-decoration: underline; }
main { margin: 26px 25px 0; }
.panel { margin: 0 0 28px; border: 1px solid var(--panel-border); background: #fff; }
.panel-title {
  margin: 0;
  padding: 2px 8px;
  background: var(--panel-heading);
  font-size: 23px;
  line-height: 1.2;
  font-weight: normal;
  text-align: center;
}
.panel-body { padding: 4px 8px 10px; }
p { margin: 16px 0; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #111; }
a:focus-visible { outline: 2px solid #2b4c75; outline-offset: 3px; }
h2:not(.panel-title), h3 { margin: 18px 0 8px; font-size: 17px; }
ul { margin: 8px 0 18px; padding-left: 25px; }
li { margin: 5px 0; }
li::marker { color: #4a6082; }
img { max-width: 100%; height: auto; }
.profile-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.3fr) 143px;
  gap: 14px;
  padding: 0 8px;
  align-items: start;
}
address { padding-top: 18px; font-style: normal; }
.contact { margin: 18px 0 12px; }
.contact dt { font-style: italic; }
.contact dd { margin: 0 0 18px; overflow-wrap: anywhere; }
.contact a { color: inherit; text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.inline-term, .inline-value { display: inline; }
.portrait { display: block; width: 143px; height: 186px; object-fit: cover; }
.support-image { display: block; margin: 14px auto 8px; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 8px; background: white; }
.skip-link:focus { top: 8px; z-index: 1; }

/* Narrow screens: wrap the menu and stack the contact card naturally. */
@media (max-width: 600px) {
  body { padding-inline: 12px; }
  main { margin-inline: 0; margin-top: 20px; }
  nav { padding-inline: 4px; }
  nav a { font-size: 18px; }
  .profile-body { grid-template-columns: minmax(0, 1fr) 143px; gap: 0 12px; padding: 0 12px 12px; }
  .profile-body address { grid-column: 1; grid-row: 1; }
  .contact { grid-column: 1; grid-row: 2; }
  .portrait { grid-column: 2; grid-row: 1 / span 2; margin-top: 18px; }
}
@media (max-width: 380px) {
  .profile-body { grid-template-columns: 1fr; }
  .portrait { grid-column: 1; grid-row: 3; margin-top: 0; }
}
@media print {
  body { padding: 0; background: white; font-size: 11pt; }
  .site { width: 100%; }
  .site-header, .skip-link { display: none; }
  main { margin: 0; }
  .panel { break-inside: avoid; }
}
