@font-face {
  font-family: "RMNeue-Regular";
  src: url("RMNeue-Regular.woff2") format("woff2"),
    url("RMNeue-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RMNeue-Bold";
  src: url("RMNeue-Bold.woff2") format("woff2"),
    url("RMNeue-Bold.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "RMNeue-Regular";
  font-weight: normal;
  background-color: white;
  color: black;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 0 2rem;
}

header {
  margin-bottom: 6rem;
  max-width: 90%;
}

h1,
h3 {
  font-family: "RMNeue-Bold";
  font-weight: normal;
}

h1 {
  font-size: 3rem;
  margin-top: 1rem;
  margin-bottom: 0;
  padding: 0;
}

h2 {
  font-family: "RMNeue-Bold";
  font-weight: normal;
  font-size: 3rem;
  margin-top: 0;
  padding-top: 0;
  color: lightgray;
}

p {
  margin-bottom: 1rem;
  max-width: 65%;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* News Grid Styles */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.news-column {
  margin-bottom: 1rem;
}

.news-column h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.news-column p {
  max-width: 100%;
}

#news,
#projects,
#tools,
#expertise,
#contact,
#get-in-touch,
#open-source,
#experiments {
  margin: 0.25rem 0 6rem 0;
}

.card {
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.card-content {
  padding: 1rem;
}

.card h3 {
  margin-top: 0;
}

#projects .card {
  margin-bottom: 3rem;
}

a {
  color: #ff0000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#expertise h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.divider {
  border: 0;
  height: 1px;
  background-color: black;
  margin: 0;
  padding: 0;
  width: 100%;
}

.divider-projects {
  border: 0;
  height: 1px;
  background-color: lightgray;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Additional styles for clickable cards */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-content {
  padding: 15px;
}

.card p {
  max-width: 100%;
}

footer {
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-column {
  margin-bottom: 1rem;
}

.footer-column h3 {
  margin-top: 0;
}

.footer-column p {
  max-width: 100%;
}

.subscribe-form {
  margin-top: 1rem;
}

.subscribe-form input[type="email"] {
  width: 75%;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: black;
  font-family: "RMNeue-Regular";
}

.subscribe-form input[type="submit"] {
  padding: 0.5rem 1rem;
  background-color: black;
  color: white;
  border: none;
  cursor: pointer;
  font-family: "RMNeue-Regular";
  transition: background-color 0.3s ease;
  min-width: 26%;
}

.subscribe-form input[type="submit"]:hover {
  background-color: #333;
}

/* Hamburger menu styles */
.hamburger {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  cursor: pointer;
  background: none;
  border: none;
  padding: 15px;
  transition: all 0.3s ease-in-out;
}

.hamburger.active {
  top: 20px;
  right: 20px;
}

.hamburger span {
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 6px;
  position: relative;
  background: black;
  border-radius: 3px;
  z-index: 1;
  transition: all 0.3s ease-in-out;
}

/* Adaptive hamburger color for light backgrounds (dark video) */
.hamburger.light-bg span {
  background: white;
}

.hamburger.active span {
  background: white;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.menu {
  position: fixed;
  top: 0;
  right: -640px;
  width: 540px;
  height: 100%;
  background-color: black;
  padding: 100px 40px 50px 40px;
  transition: right 0.3s ease-in-out;
  text-align: right;
}

.menu.active {
  right: 0;
}

.menu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.menu ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 2rem;
  font-family: "RMNeue-Regular";
  line-height: 1.5;
  display: block;
  text-align: right;
}

.menu ul li a:hover {
  text-decoration: underline;
}

.get-in-touch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.get-in-touch-grid p {
  max-width: 100%;
}

.get-in-touch-column h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.expertise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.expertise-grid p {
  max-width: 100%;
}

.expertise-column h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Media query for screens smaller than iPad */
@media (max-width: 767px) {
  .grid,
  .footer-grid,
  .get-in-touch-grid,
  .expertise-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  p,
  .expertise ul {
    max-width: 100%;
  }
}

/* Media query for iPads (2 columns) */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid,
  .footer-grid,
  .get-in-touch-grid,
  .expertise-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Media query for large screens (3 columns) */
@media (min-width: 1024px) {
  .grid,
  .footer-grid,
  .get-in-touch-grid,
  .expertise-grid,
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Audio Player Base Styles */
.card-audio {
  width: 100%;
  padding: 10px 0;
  display: flex;
  align-items: left;
  justify-content: left;
  margin-bottom: 2rem;
}

.audio-player {
  width: 100%;
  background: lightgray;
  border-radius: 4px;
  padding: 8px 12px;
  color: #000;
  font-family: "RMNeue-Regular";
  font-weight: normal;
  font-size: medium;
  margin: 0;
  box-sizing: border-box;
}

.audio-player .controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
}

.audio-player button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #000;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-player button:hover {
  opacity: 0.8;
}

.audio-player .progress-container {
  flex: 1 1 auto;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-player .progress-bar {
  flex-grow: 1;
  height: 4px;
  background: #999;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  min-width: 50px;
}

.audio-player .progress {
  height: 100%;
  background: #000;
  border-radius: 2px;
  position: absolute;
  pointer-events: none;
}

.audio-player .time {
  font-size: 12px;
  min-width: 45px;
  text-align: center;
  flex-shrink: 0;
}

.audio-player .volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.audio-player .volume-slider {
  width: 60px;
  height: 4px;
  background: #999;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.audio-player .volume-progress {
  height: 100%;
  background: #000;
  border-radius: 2px;
  position: absolute;
  pointer-events: none;
}

.audio-player .material-icons {
  font-size: 24px;
}

/* Hide default audio player */
.card-audio audio {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .audio-player {
    padding: 6px 8px;
  }

  .audio-player .controls {
    gap: 6px;
  }

  .audio-player button {
    width: 28px;
    height: 28px;
  }

  .audio-player .material-icons {
    font-size: 20px;
  }

  /* Stack time and progress bar on narrow screens */
  .audio-player .progress-container {
    width: 100%;
    order: 2;
  }

  .audio-player .volume-container {
    order: 1;
  }

  /* Adjust volume slider width */
  .audio-player .volume-slider {
    width: 40px;
  }

  .audio-player .time {
    min-width: 40px;
    font-size: 11px;
  }
}

/* Hero Section Styles */
.hero-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* Hidden by default */
  overflow: hidden;
  z-index: -1;
}

.hero-section p {
  display: none; /* Hide p element by default */
}

.hero-caption {
  display: none;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure image covers the area without distortion */
  display: block;
}

/* Show hero image only on desktop/laptop */
@media (min-width: 1024px) {
  .hero-section {
    display: block;
  }

  header {
    position: relative;
    z-index: 1;
  }

  /* Adaptive text color for header over video */
  header h1,
  header > p {
    transition: color 0.3s ease;
  }

  header h1.light-text,
  header > p.light-text {
    color: white;
  }

  /* Hero caption below the image */
  .hero-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: calc(100vh - 6rem);
    margin-bottom: 4rem;
  }

  .hero-caption a {
    text-decoration: none;
    display: flex;
    align-items: center;
  }
}
