/* Reset */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

html {
  font-family: 'PP Neue Montreal', sans-serif;
  font-size: 1rem;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #000;
  color: #fff;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header Menu */
header {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.menu {
  display: flex;
  gap: 1.5rem;
  border-radius: 1.5rem;
  background-color: #111;
}

.menu a {
  text-decoration: none;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.menu a:hover {
  background-color: white;
  color: black;
}

/* Introduction */
.introduction {
  max-width: 50rem;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 1.2rem;
  color: #ddd;
}

.introduction span a {
  font-family: "Playfair Display", serif;
  color: #EBF44B;
  font-style: italic;
  text-decoration: none;
}

/* Projects Slider */
.projects {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* hide Firefox scrollbar */
}

.projects::-webkit-scrollbar {
  display: none; /* hide Chrome/Safari scrollbar */
}

.slides {
  display: flex;
  width: max-content;
  scroll-behavior: smooth;
}

.card {
  position: relative;
  flex: 0 0 20rem;
  margin-right: 1rem;
  scroll-snap-align: start;
  border-radius: 0.6rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Card image behavior */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.card:hover img {
  filter: grayscale(0%);
}

/* Overlay text */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 60%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.overlay .week {
  font-size: 0.9rem;
  opacity: 0.8;
}

.overlay .title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: auto;
}

.overlay .course {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #000000;
  color: #fff;
  font-size: 1rem;
  margin-top: auto;          /* key: pushes footer to bottom */
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
}


/* Project Detail Layout */
.project-detail {
  max-width: 80rem;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.thumbnail {
  flex: 1 1 100%;
  display: flex;           
  justify-content: center;
  align-items: center;
}

.thumbnail img {
  width: 80%;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.project-meta {
  width: 80%;
  margin: 2.5rem auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Title */
.project-title {
  font-size: 2rem;
  font-weight: bold;
  flex: 1;
  text-align: left;
  margin: 0;
}

/* Description */
.left-meta {
  flex: 2;
  min-width: 12rem;
}

.project-desc {
  font-size: 1rem;
  color: #ddd;
  max-width: 24rem;
  margin: 0;
  line-height: 1.6;
}

/* Course info */
.right-meta {
  flex: 1;
  min-width: 10rem;
  max-width: 15rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.course-title {
  font-size: 1rem;
  opacity: 0.7;
  margin: 0;
}

.course-link {
  color: white;
  opacity: 0.7;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.course-link:hover {
  opacity: 1;
}

@media (max-width: 48rem) {
  .project-meta {
    flex-direction: column;    /* stack vertically */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .project-title {
    text-align: center;
  }

  .right-meta {
    text-align: center;
    max-width: 100%;
    min-width: auto; /* allow full width */
  }

  .left-meta {
    max-width: 100%;
    min-width: auto;
  }

  .project-desc {
    max-width: 100%;
  }
}

/* Content Section Wrapper */
.content {
  width: 60%;
  max-width: 60rem;      /* optional: limit width on very wide screens */
  margin: 0 auto;        /* center horizontally */
}

/* Toggle Heading */
.hidden {
  display: none;
}

.toggle-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0.4rem;
  margin-top: 1.5rem;
}

.toggle-heading h2 {
  font-size: 1.4rem;
  font-weight: bold;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* Section Body */
.section-body {
  margin: 1rem 0 2rem;
}

.section-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.section-body p {
  margin-bottom: 1rem;
}

.section-body p span a {
  color: #4da6ff;
  text-decoration: underline;
}

/* Images */
.video-container {
  position: relative;
  width: 100%;           /* takes full width of parent (.content at 60%) */
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 0.6rem;  /* optional: match your rounded style */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.6rem;  /* same rounding for iframe */
}

.single-img {
  width: 100%;
  border-radius: 0.4rem;
  margin: 1rem auto;
  display: block;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.image-grid img {
  width: 100%;
  border-radius: 0.4rem;
}

/* List styling */
ul, ol {
  margin: 1rem 0 1.5rem 2rem;
  padding: 0;
}

li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
  color: #ddd;
}

/* ---------- Responsive ---------- */
@media (max-width: 48rem) {
  .content {
    width: 90%; /* wider on tablets/phones */
  }

  .image-grid {
    grid-template-columns: 1fr; /* stack images */
  }
}

/* Prev / Next Navigation */
.project-nav {
  display: flex;
  justify-content: space-between;
  margin: 3rem 0;
}

.project-nav a {
  text-decoration: none;
  font-weight: bold;
  color: #4da6ff;
}

.project-nav a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 48rem) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .thumbnail img {
    max-width: 100%;
  }

  .project-meta {
    width: 100%;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 48rem) {
  .card {
    flex: 0 0 15rem;
  }
}

@media (max-width: 30rem) {
  .footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}

/* Mobiles: single card view */
@media (max-width: 30rem) {
  .card {
    flex: 0 0 12rem;
  }

  .overlay {
    padding: 0.6rem;
  }

  .overlay .title {
    font-size: 1rem;
  }

  .overlay .course {
    font-size: 0.8rem;
  }
}