@import url(https://fonts.googleapis.com/css?family=Lustria|Amatic+SC|Open+Sans|Roboto:300|Lato|Yanone+Kaffeesatz|Source+Sans+3);

:root{
  --accent: #ae0029;
  --text: #4b4b4b;
  --muted: #777;
  --border: rgba(0,0,0,0.06);
  --zebra: #f4f4f4;
}

html{
  overflow-y: scroll;
  overflow-x: hidden;
}

body{
  margin: 0;
  font-family: 'Lustria', serif;
  font-weight: normal;
  color: var(--text);
  font-size: 95%;
  line-height: 170%;
  text-align: justify;
}

.container{
  max-width: 800px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Utilities */
.alignleft{ float: left; }
.alignright{ float: right; }
.aligncenter{ text-align: center; }

/* Headings */
h1{
  /*font-family: "Amatic SC", cursive; */
  font-family: "Yanone Kaffeesatz", sans-serif;
  font-size: 400%;
  text-align: center;
  color: var(--accent);
  line-height: 1;
  display: block;
  font-weight: normal;
}


/* ---------- Homepage name header ---------- */
h1.name{
  margin: 40px 0 -10px;
  text-align: center;
  font-family: "Yanone Kaffeesatz", sans-serif;
  font-size: 64px;
  font-weight: 400;          /* thinner than default */
  letter-spacing: 0.5px;     /* makes it feel less “thick” */
  color: #ae0029;
  line-height: 1.0;
}

p.tagline{
  margin: 0 0 6px;
  text-align: center;
  font-size: 16px;
  color: #666;
}


h2{ font-size: 130%; text-align: center; }
h3{ font-size: 100%; text-align: left; color: var(--text); }
h6{ font-size: 60%; text-align: center; }

#Yanone{
  font-family: 'Yanone Kaffeesatz', sans-serif;
  font-size: 300%;
  line-height: 1.2;
}

/* Links */
a:link{ color: var(--text); }
a:visited{ color: var(--text); }
a:hover{ color: var(--accent); }

/* Misc text helpers you already use */
text.gray{ color: #969696; }
text.modelNames{ font-size: 100%; font-weight: bold; }
text.programVersion{ font-size: 85%; }
text.creditsTitles{ font-size: 85%; line-height: 150%; }
text.code{ font-size: 100%; font-family: Consolas, courier; font-weight: normal; }
text.programName{ font-size: 100%; font-family: 'Open Sans', sans-serif; font-weight: normal; }

img.links{ vertical-align: -15%; }

#end{
  line-height: 120%;
  font-size: 100%;
  color: #969696;
  text-align: center;
}

/* Boxes */
div.textBox{
  font-size: 100%;
  line-height: 170%;
  background-color: #f2f2f2;
  width: 600px;
  border: 0px;
  padding: 30px;
  margin: auto;
}

div.textBoxWarning{
  font-size: 100%;
  line-height: 170%;
  background-color: #ffe5e5;
  width: 600px;
  border: 3px solid var(--accent);
  padding: 30px;
  margin: auto;
}

div.extraComments{
  vertical-align: middle;
  width: 100%;
  border: 1px solid gray;
}

text.ecTitle{
  font-size: 110%;
  font-weight: bold;
}

/* Navigation bar */
.topnav{
  overflow: hidden;
  display: flex;
  background-color: #fff;
  font-family: Lustria, Arial, Helvetica, sans-serif;
  font-weight: normal;
  text-align: center;

  width: 100%;               /* was 800px */
  border: 0px;
  border-style: solid;
  border-color: #d6d6d644;
}

.topnav a{
  flex-grow: 1;
  color: #2e2e2e;
  text-align: center;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 110%;
}

.topnav a:hover{
  background-color: var(--text);
  color: white;
}

.topnav a.active{
  background-color: var(--accent);
  color: white;
}

/* Full-width helpers (kept as-is) */
.w1050{
  left: 175px;
  margin-left: -175px;
}

.full-width{
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: calc(100vw - 10px);
  position: relative;
  right: 50%;
  width: 100vw;
}

/* Tables */
.red-gray-table{
  font-family: 'Lustria', serif;
  border-collapse: collapse;
  width: 100%;
  text-align: center;
}

.red-gray-table td,
.red-gray-table th{
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.red-gray-table caption{
  font-weight: bold;
  color: var(--accent);
}

.red-gray-table tr:nth-child(even){   background-color: var(--zebra); }
.red-gray-table tr:hover{ background-color: #ddd; }

.red-gray-table th{
  padding-top: 12px;
  padding-bottom: 12px;
  background-color: var(--accent);
  color: white;
}

/* Card */
.card{
  margin-right: 0px;
  margin-left: 0px;
  padding: 30px;

  cursor: pointer;
  background-color: rgba(0,0,0,0.05);
  border-width: 0px;
  box-shadow: 0 0 25px rgba(0,0,0,0.15);
  margin-bottom: 20px;
  margin-top: 30px;
}

.card:hover{
  padding-left: 25px;
  padding-right: 25px;
  border-width: 5px;
  border-top: 0px;
  border-bottom: 0px;
  border-style: solid;
  border-color: var(--accent);
}

/* Rotate image animation */
.rotateImageAnimation{
  position: relative;
  text-align: center;
  -webkit-transition: -webkit-transform 0.8s;
}

.rotateImageAnimation:hover{
  -webkit-transform: rotate(-180deg) translateZ(0);
}

/* Swap images (SimTeEx) */
.image-swap-container{
  position: relative;
  margin: auto;
  width: 400px;
}

.hover-image{
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.hover-image:hover{
  opacity: 1;
}


.centered{
  display: block;
  margin: 14px auto;   /* auto left/right centers */
  max-width: 100%;
  height: auto;
}