.projects-main {
  color: var(--cream);
  min-height: 100vh;
  padding-top: 6vh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  cursor: auto;
}

main.projects-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---------- Retro iPad-style menu ---------- */


.project-menu h2 {
  font-family: 'Geo', sans-serif;
  color: var(--cream);
  font-size: 2.5rem;
}
/* ---------- Desktop Folder Style ---------- */
.menu-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4rem;
}

.menu-item {
  display: flex;
  flex-direction: column;
  margin-top: 3em;
  align-items: center;
  text-decoration: none;
  color: var(--cream);
  font-family: 'Geo', sans-serif;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  cursor: pointer;
}

/* Folder icon look */
.menu-item img {
  width: 150px;
  height: 105px;
  object-fit: contain;
  background: var(--black);
  border-radius: 10px 10px 2px 2px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2);
  margin-bottom: 0.5rem;
  padding: 10px;
}

/* Hover animation like Windows desktop icons */
.menu-item:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.menu-item span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  text-align: center;
}


/* ---------- Project sections ---------- */
.project-section {
  background: var(--black);
  border-radius: 1.5em;
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 4rem auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.project-section h2 {
  font-family: 'Geo', sans-serif;
  font-size: 2rem;
  color: var(--gold);
}

.project-section p {
  color: var(--cream);
  font-family: 'Arvo', serif;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .menu-item {
    padding: 1.5rem 1rem;
  }

  .project-section {
    margin: 2rem 1rem;
  }
}




/* ---------- Popup Window ---------- */
.popup-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 700px;
  height: 70%;
  background: #111;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
  cursor: default;
}

/* cursor-hand op de titelbalk */
.popup-bar {
  background: linear-gradient(#e0e0e0, #cfcfcf);
  border-bottom: 1px solid #aaa;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  cursor: move;
  user-select: none;
}


@keyframes popupIn {
  from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Top bar */
.popup-bar {
  background: linear-gradient(#e0e0e0, #cfcfcf);
  border-bottom: 1px solid #aaa;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

/* Buttons like Safari */
.browser-buttons {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.browser-buttons span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.close-btn { background: #ff5f57; cursor: pointer; }
.min-btn { background: #febc2e; }
.max-btn { background: #28c840; }

.browser-title {
  font-family: 'Geo', sans-serif;
  font-size: 1rem;
  color: #111;
  margin-left: 10px;
}

/* Content area */
.popup-content {
  flex-grow: 1;
  background-image: url('media/windows.jpeg');
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* altijd 2 kolommen */
  grid-template-rows: repeat(2, 1fr);     /* precies 2 rijen */
  gap: 1.5rem;
  padding: 1.5rem;
  overflow-y: auto;
  justify-items: center;
  align-items: center;
}


/* Project cards */
.project-card {
  background: #000000;
  height: 25vh;
  width: 25vh;
  border-radius: 10px;
  text-align: center;
  color: var(--cream);
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: scale(1.05);
}

.project-card img {
  width: 20vh;
  height: 15vh;
  border-radius: 8px;

}

/* ---------- Desktop-style Popup Window ---------- */
.popup-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 70%;
  max-width: 1100px;
  height: 70%;
  max-height: 700px;
  background: #1e1e1e;
  border: 2px solid #666;
  box-shadow: 8px 8px 0 #00000070;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  animation: popupIn 0.2s ease forwards;
}

.popup-bar {
  background-color: #6b0707;
  color: white;
  padding: 0.4rem 1rem;
  font-family: 'Geo', sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}

.popup-bar:active {
  cursor: grabbing;
}

/* ---------- Popup Content (like a desktop) ---------- */
.popup-content {
  position: relative;
  flex-grow: 1;
  background-image: url('media/windows.jpeg');
  overflow: hidden;
}

/* ---------- Movable desktop icons ---------- */
.desktop-icon {
  position: absolute;
  width: 120px;
  text-align: center;
  font-family: 'geo', sans-serif;
  cursor: pointer;
  user-select: none;
}

.desktop-icon img {
  -webkit-user-drag: none; /* Safari */
  user-drag: none;
  pointer-events: none; /* maakt dat alleen de container drag krijgt */
}

.desktop-icon img {
  width: 75px;
  height: 75px;
  border-radius: 8px;
  margin-bottom: -5px;
  transition: transform 0.1s ease;
}

.desktop-icon:hover img {
  transform: scale(1.1);
}

/* Trashcan stays fixed bottom-right inside popup */
.trash-icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 80px;
  text-align: center;
  font-family: 'Geo', sans-serif;
  color: var(--cream);
}

.trash-icon img {
  width: 64px;
  height: 64px;
}

/* ---------- Decorative Taskbar inside popup ---------- */
.popup-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 110%;
  height: 25px; /* adjust to your taskbar image height */
  background: #000;
  overflow: hidden;
  pointer-events: none; /* makes it non-interactive */
}

.popup-taskbar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none; /* ensures user can’t drag or click */
}

.popup-content {
  padding-bottom: 60px; /* gives room for taskbar */
}

/* ---------- Loading overlay ---------- */
.popup-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation-delay: 4.5s; 
  opacity: 1;
}

/* loading video styling */
.popup-loading video {
  width: 100%;
  height: auto;
  border-radius: 12px;
}


/* ---------- Sub-popup (binnen code-popup) ---------- */
.sub-popup {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  background: #f4f4f4;
  border: 3px solid #222;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  z-index: 12000;
}

.sub-popup-bar {
  background: linear-gradient(to bottom, #d8d8d8, #b8b8b8);
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  border-bottom: 2px solid #444;
}

.sub-popup-bar .browser-buttons span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
  cursor: pointer;
}

.sub-popup-body {
  flex: 1;
  overflow: hidden;
}

.sub-popup-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* optioneel: fade in animatie */
.sub-popup.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.95);}
  to   {opacity: 1; transform: scale(1);}
}

/* ---------- Sub-popup (smaller, centered) ---------- */
.sub-popup {
  position: absolute;
  top: 20%;           /* push it down a bit */
  left: 25%;          /* center horizontally for smaller width */
  width: 50%;         /* smaller width */
  height: 60%;        /* smaller height */
  background: #f4f4f4;
  border: 2px solid #222;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  z-index: 12000;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

/* Title bar */
.sub-popup-bar {
  background: #6b0707;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #6b0707;
  cursor: move;
}

.sub-popup-bar .browser-buttons span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff5f56;
  cursor: pointer;
  margin-right: 6px;
}

.sub-popup-title {
  font-family: 'Geo', sans-serif;
  color: white;
  flex-grow: 1;
  text-align: left;
  padding-left: 6px;
}

/* Body / iframe area */
.sub-popup-body {
  flex: 1;
  background: white;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

.sub-popup-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Wrapper to allow scaling without cutting off */
.iframe-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto; /* scrollbars appear if content exceeds scaled size */
}

/* Scale down the site inside iframe */
.iframe-wrapper iframe {
  width: 180%;           /* 100 / 0.8 to compensate scale */
  height: 180%;          /* same */
  border: none;
  transform: scale(0.57); /* scale down to 80% */
  transform-origin: top left; /* scale from top-left corner */
}

/* Mini iPhone-style sub-popup for De Poezenboot */
.sub-popup-phone {
  position: absolute;
  top: 20%;
  left: 25%;
  width: 220px;      /* slightly smaller than normal phone */
  height: 400px;     /* adjust for aspect ratio */
  background: #6b0707;
  border-radius: 35px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  z-index: 12000;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

/* Top notch */
.sub-popup-phone::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 5px;
  background: #333;
  border-radius: 10px;
  z-index: 5;
}

/* Browser top / fake status bar */
.sub-popup-phone .browser-top {
  height: 50px;
  background: linear-gradient(#e0e0e0, #cfcfcf);
  border-bottom: 1px solid #aaa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-family: 'Arvo', serif;
  font-size: 0.7rem;
  color: #000;
}

/* URL bar */
.sub-popup-phone .browser-url {
  flex-grow: 1;
  background: #fff;
  margin: 0 6px;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid #bbb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Screen area for iframe */
.sub-popup-phone .phone-screen {
  flex-grow: 1;
  overflow: hidden;
  background: #fff;
  border-radius: 0 0 30px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sub-popup-phone iframe {
  width: 100%;
  height: 100%;
  border: none;
  transform-origin: top center;
}

/* Close button (same as other sub-popups) */
.sub-popup-phone .close-sub {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff5f56;
  cursor: pointer;
}

/* Wrapper for scaling inside phone sub-popup */
.sub-popup-phone .iframe-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto; /* scroll if content is bigger */
}

/* Scale the site down */
.sub-popup-phone .iframe-wrapper iframe {
  width: 190%;           /* compensate for scale */
  height: 180%;
  border: none;
  transform: scale(0.59); /* zoom out the site */
  transform-origin: top left;
}

/* 🔻 Mobiele tab-secties */
.mobile-tab {
  display: none;
  padding: 3rem 2rem;
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 22px;
  color: white;
  font-family: 'Geo', sans-serif;
  text-align: center;
}

/* Alleen zichtbaar op mobiel */
@media (max-width: 768px) {
  .mobile-tab {
    display: block;
  }

  /* popups verborgen op mobiel */
  .popup-window {
    display: none !important;
  }
}

.scrollable-popup {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.5rem;
  gap: 2rem;
}

.project-article {
  background: rgba(0, 0, 0, 0.235);
  padding: 1rem;
  border-radius: 10px;
}

.project-article h3 {
  font-family: 'Geo', sans-serif;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.project-article p {
  font-family: 'Arvo', serif;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-images {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-images img {
  width: 30%;
  border-radius: 8px;
  object-fit: cover;
}

/* Basiskleur voor specifieke popups */
#popup-ontwerp .popup-content,
#popup-groot .popup-content,
#popup-onderzoek .popup-content {
  background-image: none;   /* verwijdert de huidige achtergrondafbeelding */
  background-color: #000000; /* vervang door gewenste kleur */
  padding: 1.5rem;
  overflow-y: auto;        /* maakt content scrollable indien nodig */
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#popup-ontwerp .popup-content {
  background-color: #6b0707;
}

#popup-groot .popup-content {
  background-color: #6b0707;
}

#popup-onderzoek .popup-content {
  background-color: #6b0707;
}

/* Eerste project, twee afbeeldingen kleiner en volledig zichtbaar */
#popup-ontwerp .project-article:first-of-type .project-images img {
  width: 40%;       /* iets kleiner zodat ze naast elkaar passen */
  height: auto;     /* behoudt verhouding */
  object-fit: contain;  /* laat hele afbeelding zien */
  border-radius: 8px;
}

/* Eerste project, twee afbeeldingen kleiner */
#popup-ontwerp .project-article:first-of-type .project-images img {
  width: 20%;       /* kleiner dan 45% voor meer ruimte */
  height: auto;     /* behoudt de originele verhouding */
  object-fit: contain;  /* hele afbeelding zichtbaar */
  border-radius: 8px;
}


.video-wrapper iframe {
  border-radius: 2em;
}

/* Eerste project, twee afbeeldingen kleiner en volledig zichtbaar */
#popup-ontwerp .project-article:nth-of-type(2) .project-images img {
  width: 40%;       /* iets kleiner zodat ze naast elkaar passen */
  height: auto;     /* behoudt verhouding */
  object-fit: contain;  /* laat hele afbeelding zien */
  border-radius: 8px;
}

/* Eerste project, twee afbeeldingen kleiner */
#popup-ontwerp .project-article:nth-of-type(2) .project-images img {
  width: 20%;       /* kleiner dan 45% voor meer ruimte */
  height: auto;     /* behoudt de originele verhouding */
  object-fit: contain;  /* hele afbeelding zichtbaar */
  border-radius: 8px;
}

.scrollable-popup {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.5rem;
  gap: 2rem;
}

.project-article {
  background: rgba(0, 0, 0, 0.235);
  padding: 1rem;
  border-radius: 10px;
}

.project-article h3 {
  font-family: 'Geo', sans-serif;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.project-article p {
  font-family: 'Arvo', serif;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-images {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-images img {
  width: 20%;       /* kleiner, zodat meerdere naast elkaar passen */
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 2em;
}

.video-wrapper p {
  margin-top: 0.5rem;
  font-family: 'Arvo', serif;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  text-align: center;
}

.projects-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
}

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


.popup-content img,
.sub-popup-body img,
.video-wrapper img {
  max-width: 100%;   /* zorgt dat de afbeelding nooit breder wordt dan de container */
  height: auto;      /* behoudt verhouding */
  display: block;    /* voorkomt extra ruimte onder inline images */
}

.avatar{
  width: 300px;
  margin-top: 20vh;
  margin-bottom: -27vh;
}

.project-images {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center; /* center images in popup */
}

.project-images img {
  width: calc(50% - 0.5rem); /* max 2 per row on mobile */
  max-width: 200px;          /* ensures image doesn’t exceed popup */
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Mobile article separation */
@media (max-width: 768px) {
  .mobile-tab .project-article {
    background: rgba(255, 255, 255, 0.05); /* slightly lighter than tab bg */
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;                /* space between articles */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-left: 4px solid var(--gold);   /* accent color line */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .mobile-tab .project-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  }

  /* Article titles bigger and more prominent */
  .mobile-tab .project-article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  /* Paragraph spacing */
  .mobile-tab .project-article p {
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  /* Images in articles */
  .mobile-tab .project-images {
    justify-content: space-around;  /* spread images nicely */
    gap: 0.5rem;
  }

  .mobile-tab .project-images img {
    width: 48%;          /* max 2 per row */
    height: auto;
    border-radius: 12px;
  }

  /* Video wrapper separation */
  .mobile-tab .video-wrapper {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }

  .mobile-tab .video-wrapper iframe {
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  /* Make only Onderzoeksprojecten less wide */
  #tab-onderzoek {
    width: 80%;          /* less than default 90% */
    margin: 2rem auto;   /* center it horizontally */
    padding: 1.5rem;     /* adjust padding if needed */
  }
}

@media (max-width: 768px) {
  .avatar {
    display: none;
  }
}