/* Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Make root elements full-height so flex layouts can fill screen */
html, body {
  height: 100%;
}

/* Body and typography */
body {
  font-family: "Cambria Math", Cambria, "Times New Roman", Georgia, serif;
  color: #f5f5f5;
  background-color: #050507;
  line-height: 1.6;
}

/* Links */
a {
  color: #f5f5f5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout helpers */
.section {
  padding: 80px 20px;
}

.section-narrow {
  max-width: 1100px; /* wider so thumbs can sit side by side */
  margin: 0 auto;
}

/* Site header / nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav a {
  opacity: 0.85;
}

.nav a:hover {
  opacity: 1;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 72px; /* space for fixed header */
}

/* Background image overlay */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/solenoid_pic.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(0.2) contrast(1.1) brightness(0.6);
  transform: scale(1.03);
  z-index: -2;
}

/* Dark overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.1), transparent 55%),
              radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.9), transparent 60%);
  z-index: -1;
}

/* Hero content */
.hero-content {
  text-align: center;
  padding: 40px 20px;
}

/* Math-style logo */
.hero-math {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
}

/* All hero math text in Cambria-style math font */
.tau,
.equals,
.cross,
.em,
.bronze,
.hero-ensemble {
  font-family: "Cambria Math", Cambria, "Times New Roman", Georgia, serif;
}

.tau {
  font-style: italic;
}

.equals,
.cross {
  opacity: 0.8;
}

/* Em and Bronze letterspacing */
.em,
.bronze {
  letter-spacing: 0.08em;
}

/* Vector notation: base letter + combining arrow glyph */
.vector {
  position: relative;
  display: inline-block;
}

/* Arrow above m */
.vector-comb-m {
  display: inline-block;
  margin-left: -0.52em;   /* horizontal centering over m */
  vertical-align: 0.32em; /* lower than previous version */
  font-size: 1.15em;      /* larger arrow */
}

/* Arrow above B */
.vector-comb-B {
  display: inline-block;
  margin-left: -0.50em;   /* horizontal centering over B */
  vertical-align: 0.30em; /* lower than previous version */
  font-size: 1.15em;      /* same size for consistency */
}

/* Ensemble text under the math */
.hero-ensemble {
  margin-top: 16px;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  letter-spacing: 0.18em;
  text-transform: none;    /* keep “Ensemble” as typed */
  opacity: 0.9;
}

/* Sections (for other pages) */
.section h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.section p {
  font-size: 1rem;
  color: #dddddd;
}

/* Media layout (for other pages) */
.media-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.media-images {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.media-images img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

/* Thumbnail row on Em × Bronze page */
.emx-thumbnails {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin: 32px auto;
  max-width: 1100px;
  flex-wrap: nowrap;          /* force a single row on larger screens */
}

/* Base thumbnail size */
.emx-thumbnails img {
  display: block;
  flex: 0 0 22%;
  max-width: 200px;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* First two slightly smaller */
.emx-thumbnails a:nth-child(1) img,
.emx-thumbnails a:nth-child(2) img {
  flex: 0 0 18%;
  max-width: 170px;
}

/* Fullscreen Media page layout */

/* Only affect the Media page when the body has this class */
.media-body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Region between header and footer that should be filled by the video */
.media-fullscreen {
  flex: 1;
  display: flex;
}

/* Make the iframe fill the available space */
.video-fullscreen {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.8rem;
  color: #aaaaaa;
  background: rgba(0, 0, 0, 0.85);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .nav {
    gap: 16px;
    font-size: 0.8rem;
    padding: 12px 16px;
  }

  .hero {
    padding-top: 64px;
  }

  .section {
    padding: 72px 16px;
  }

  .emx-thumbnails {
    gap: 12px;
    max-width: 100%;
    flex-wrap: wrap; /* allow wrapping on phones */
  }

  .emx-thumbnails img,
  .emx-thumbnails a:nth-child(1) img,
  .emx-thumbnails a:nth-child(2) img {
    flex: 0 0 23%;
    max-width: none;
  }
}

/* Thumbnail row above videos */
.emx-thumbnails {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 1100px;
  flex-wrap: nowrap;        /* single row on desktop */
}

.emx-thumbnails a {
  flex: 0 0 22%;            /* 4 per row on large screens */
  max-width: 230px;
}

.emx-thumbnails img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  cursor: pointer;
}

@media (max-width: 900px) {
  .emx-thumbnails {
    flex-wrap: wrap;        /* allow wrapping on tablets/phones */
    max-width: 960px;
  }

  .emx-thumbnails a {
    flex: 1 1 48%;          /* 2 × 2 grid on typical phones/tablets */
    max-width: none;
  }
}

@media (max-width: 500px) {
  .emx-thumbnails a {
    flex: 1 1 100%;         /* stack if the screen is very narrow */
  }
}

