/* ===========================
   Global
=========================== */
:root {
  --bar-bg: #fff;
  --bar-padding: 20px;
  --bar-border: 1px solid #eaeaea;
  --content-max: 1280px;
  --icon-size: 24px;
  --text: #333;
  --muted: #555;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Helvetica', Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background: #f5f5f5;
  overflow-x: hidden;
}

/* Keep content clear of fixed bars */
main {
  padding-top: 80px; /* header height buffer */
  padding-bottom: calc(2 * var(--bar-padding) + var(--icon-size)); /* footer buffer */
}

/* ===========================
   Header (fixed) + Nav
=========================== */
header {
  position: fixed; top: 0; left: 0; right: 0;
  background: #fff;
  padding: var(--bar-padding);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 20px;
}

header .logo {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

/* Main nav (desktop baseline) */
#site-nav { transition: max-height .25s ease, visibility .25s ease; }
#site-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
}
#site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  font-size: 16px;
  white-space: nowrap;
}

/* Hamburger button */
.menu-toggle {
  display: none;           /* hidden on desktop */
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;       /* pushes burger to the right edge on mobile */
}

/* ===========================
   Projects Section
=========================== */
#projects {
  padding: 20px;
  text-align: center;
}
#projects h2 {
  font-size: 36px;
  margin: 20px 0 30px;
  font-weight: bold;
}

/* Column list (you can swap to grid later if you want 3/4 cols) */
.video-gallery {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20px;
}

/* Individual item */
.video-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.video-item h3 {
  margin-bottom: 6px;
  font-size: 18px;
  pointer-events: none;
}

/* Image/link containers */
.video-thumbnail { /* legacy wrapper if you use <a class="video-thumbnail">… */
  display: block;
  width: 100%;
  max-width: 739px;
  height: auto;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.image-wrapper {
  position: relative;
  width: 100%;
  height: 415px;
  border-radius: 10px;
  overflow: hidden;
}
.image-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Rollover swap */
.thumbnail-image,
.gif-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
  border-radius: 10px;
}
.thumbnail-image { opacity: 1; z-index: 1; }
.gif-image       { opacity: 0; z-index: 2; }

.image-wrapper:hover .thumbnail-image { opacity: 0; }
.image-wrapper:hover .gif-image       { opacity: 1; }

/* Optional description block under gallery */
.project-description {
  margin: 15px auto 0;
  text-align: left;
  max-width: 640px;
}
.project-description h4 {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 8px;
  color: #111;
}
.project-description p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  color: var(--muted);
}

/* ===========================
   Modal
=========================== */
.modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 1001;
  background-color: rgba(0,0,0,.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 1920px;
  height: 80%;
  max-height: 1080px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
iframe {
  width: 100%; height: 100%;
  border: none;
  border-radius: 10px;
}
.close {
  position: absolute; top: 10px; right: 10px;
  font-size: 28px; font-weight: bold; color: #333; cursor: pointer;
}

/* ===========================
   Footer (fixed) – matches header
=========================== */
footer.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bar-bg);
  border-top: var(--bar-border);
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: var(--bar-padding) 0;
}
footer.site-footer .footer-content {
  width: 100%;
  max-width: var(--content-max);
  padding: 0 var(--bar-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer.site-footer .footer-logo {
  font-size: 24px; font-weight: bold; line-height: 1;
}
footer.site-footer .social-icons {
  display: flex; align-items: center; gap: 20px; line-height: 0;
}
footer.site-footer .social-icons a {
  display: inline-flex; align-items: center; text-decoration: none; color: var(--text);
  transition: transform .15s ease, opacity .15s ease;
}
footer.site-footer .social-icons a:hover,
footer.site-footer .social-icons a:focus-visible {
  transform: translateY(-1px); opacity: .8; outline: none;
}
footer.site-footer .social-icons img {
  display: block; width: var(--icon-size); height: var(--icon-size);
}

/* iOS safe-area nicety */
@supports (padding: max(0px)) {
  footer.site-footer { padding-bottom: max(var(--bar-padding), env(safe-area-inset-bottom)); }
  main { padding-bottom: calc(2 * var(--bar-padding) + var(--icon-size) + env(safe-area-inset-bottom)); }
}

/* ===========================
   Responsive
=========================== */

/* Desktop (force normal nav, hide burger) */
@media (min-width: 769px) {
  header .menu-toggle { display: none !important; }

  #site-nav {
    max-height: none !important;
    visibility: visible !important;
    overflow: visible !important;
    width: auto !important;
  }
  #site-nav ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* Mobile (collapse nav, show burger) */
@media (max-width: 768px) {
  header { gap: 12px; }

  .menu-toggle {
    display: inline-block !important;
    z-index: 1001;
  }

  #site-nav {
    overflow: hidden;
    max-height: 0;
    visibility: hidden;
    width: 100%;
    order: 3;
  }

  #site-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    margin: 0;
  }

  header.nav-open #site-nav {
    max-height: 320px;
    visibility: visible;
  }

  /* ✅ This only applies on mobile */
  .logo { margin-right: auto; }
}

@media (min-width: 769px) {
  header {
    justify-content: space-between !important; /* ✅ Forces right-aligned nav */
  }
}

