/* Enrico Barausse - personal site
   Palette taken from the original Wix theme:
   navy   rgb(39,34,62)   headers / nav
   beige  rgb(223,207,186) projects & publications sections
   grey   #dfdfdf         plain content sections
   sand   rgb(241,235,227) light accents
*/

:root {
  --navy: #27223e;
  --navy-dark: #171424;
  --beige: #dfcfba;
  --beige-dark: #d2c0a8;
  --sand: #f1ebe3;
  --grey: #dfdfdf;
  --grey-light: #f2f2f2;
  --btn: #dcdcdc;
  --text: #27223e;
  --text-muted: #5a556e;
  --font-serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --content-width: 980px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  background-color: #e0e0e0;
}

/* faded, slightly blurred chalk photo behind the whole page, as on the Wix site */
body::before {
  content: "";
  position: fixed;
  inset: -20px;
  z-index: -1;
  background: url("../images/bg-chalk.jpg") center / cover no-repeat;
  opacity: 0.35;
  filter: blur(4px);
}

a { color: inherit; }
a:hover { color: var(--text-muted); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 48px 0 32px;
}

.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.site-title a { text-decoration: none; color: #fff; }

.site-subtitle {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-subtitle a { text-decoration: none; color: #fff; }

/* ---------- Navigation ---------- */

.site-nav {
  background: var(--navy);
  padding: 20px 0;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 40px;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #b7b3cf; }

/* ---------- Sections ---------- */

.section {
  padding: 60px 0;
}
.section--grey  { background: var(--grey); }
.section--beige { background: var(--beige); }
.section--sand  { background: var(--sand); }

.section h2 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--text);
  margin-top: 10px;
}
.section h2 + * { margin-top: 28px; }

.section h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  margin: 40px 0 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--text);
  background: var(--btn);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn:hover { background: #fff; color: var(--text); }
.btn--small { text-transform: none; letter-spacing: 0; font-weight: 700; font-family: var(--font-serif); font-size: 12px; padding: 6px 18px; }

/* ---------- Home: about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 265px;
  gap: 60px;
  align-items: start;
}
.about-grid p { margin: 0 0 1.2em; }
.portrait {
  width: 263px;
  height: 320px;
  object-fit: cover;
  object-position: 55% 30%;
  display: block;
  margin-left: auto;
}

/* ---------- Home: projects & career ---------- */

.entry { margin: 0 0 32px; }
.entry .label {
  display: block;
  font-weight: 700;
  font-size: 13px;
}
.entry .date {
  display: block;
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 2px;
}
.entry .title { display: block; font-weight: 700; }
.entry p { margin: 2px 0; }
.entry .btn { margin-top: 10px; }

/* ---------- Publications ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin: 24px 0 40px;
}
.badges img { height: 58px; width: auto; }

.prose p { margin: 0 0 1.2em; max-width: 720px; }

/* ---------- Lectures ---------- */

.lead { font-size: 20px; margin: 0 0 36px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 30px 44px;
}
.video-grid figure { margin: 0; }
.video-grid figcaption { margin-top: 10px; font-size: 20px; }

/* click-to-play video: thumbnail with a play button, replaced by the player on click */
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
  overflow: hidden;
}
.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  background: rgba(30, 30, 30, 0.85);
  border-radius: 12px;
}
.video__play::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}
.video:hover .video__play { background: #e00; }
.video--single { max-width: 480px; margin-bottom: 14px; }
.video--featured { max-width: 760px; }
.video-caption { margin: 10px 0 40px; font-size: 15px; }

.lecture-list {
  font-family: var(--font-serif);
  margin: 0 0 40px 20px;
  padding: 0;
  font-size: 15px;
}
.lecture-list li { margin: 4px 0; }

/* ---------- Press & outreach ---------- */

.press-list { list-style: none; margin: 0; padding: 0; }
.press-item { margin: 0 0 26px; max-width: 760px; }
.press-item .headline { font-style: italic; font-size: 16px; }
.press-item .headline a { text-decoration: underline; }
.press-item .date {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.press-item audio { display: block; margin-top: 8px; width: 100%; max-width: 480px; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-grid h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  margin: 0 0 30px;
}
.contact-grid p { margin: 0 0 1.1em; font-size: 13px; }

.contact-form { display: grid; gap: 8px; margin-top: 30px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #ccc;
  background: #f4f4f4;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button {
  justify-self: end;
  width: 140px;
  padding: 7px;
  border: 1px solid #bbb;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.contact-form button:hover { background: var(--grey); }
.contact-form .hint { font-size: 12px; color: var(--text-muted); margin: 0; }

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

.site-footer {
  background: var(--grey-light);
  border-top: 2px solid #c9c9c9;
  border-bottom: 2px solid #c9c9c9;
  padding: 60px 0;
}
.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px;
}
.logo-row img { height: 120px; width: auto; max-width: 180px; object-fit: contain; }
.logo-row img.tall { height: 150px; }
.logo-row a { line-height: 0; }

/* leave some of the chalk background visible under the footer, as on Wix */
.bg-tail { height: 200px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .two-col, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .portrait { margin-left: 0; }
  .site-title { font-size: 34px; }
  .video-grid { grid-template-columns: 1fr; }
  .logo-row img, .logo-row img.tall { height: 100px; }
  .bg-tail { height: 100px; }
}
