/* ===========================
   Variable Controllers
   =========================== */
:root {
  --bg-color: #fff;
  --text-color: #222;
  --accent-color: #444;
  --link-color: #065a9a;
  --fade-duration: 4s;
  --menu-hover-bg: #2d2d2d;
  --menu-hover-text: #e6e6e6;
  --menu-focus-text: #ffa500;
  --submenu-hover-bg: #0a0a0a;
  --submenu-hover-text: #e6e6e6;
  --content-widths: 80vw;
  --lightbox-labels: #eee;
}

body.welcome {
  --bg-color: #000201;
  --text-color: #eee;
  --accent-color: #ccc;
  --link-color: #82aaff;
  --menu-hover-bg: #fdfdfd;
  --menu-hover-text: #222;
  --menu-focus-text: #ffa500;
  --submenu-hover-bg: #a9a9a9;
  --submenu-hover-text: #222;
}

/* ===========================
   Reset basics
   =========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', sans-serif;
  line-height: 1.4;
  background: var(--bg-color);
  color: var(--text-color);
  background: var(--bg-color) url("images/bg4.png") repeat;
  background-size: auto; /* keeps original tile size */
}

/* ===========================
   Layout
   =========================== */
body {
  display: flex;
  flex-direction: column; /* header → main → footer */
  min-height: 100vh;        /* background fills viewport */
  color: var(--text-color);
}

body.welcome {
  /* keep the body layout so that it doesn’t break centering */
  display: flex;              /* NOT block */
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
}

body.welcome main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;              /* or whatever height you want */
  margin: 0 auto;
  padding: 0;
  width: var(--content-widths);
  max-width: var(--content-widths);
  margin-left: auto;
  margin-right: auto;
}

/* Page container */
#page {
  flex: 1; /* allow header + footer to hug edges */
  display: flex;
  flex-direction: column;
}


/* ===========================
   Header / Nav
   =========================== */
header {
  background: transparent;
  padding: 2rem 0;      /* remove side padding so centering works */
  flex-shrink: 0;
  width: var(--content-widths);          /* match main width */
  max-width: var(--content-widths);
  margin: 0 auto;       /* center it */
}

.navv2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  flex-shrink: 0;
}

.logo a.navheader {
  font-weight: 700;
  font-size: 1.5rem;
  color: inherit;
  text-decoration: none;
}

.navsub {
  font-size: 0.8rem;
  color: inherit;
  opacity: 0.7;
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* Menu */
.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu li > a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.menu li.has-subnav {
  position: relative;
}

.menu li.has-subnav > ul.subnav {
  position: absolute;
  top: 100%;
  left: 0;
  list-style: none;
  padding: 0.5rem 1rem;
  margin-top: 0.3rem;
  display: none;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  background: var(--submenu-hover-bg);
  color: var(--submenu-hover-text);
  z-index: 1000;
}

.menu li.has-subnav > a {
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.menu li.has-subnav:hover > a,
.menu li.has-subnav:focus-within > a {
  background-color: var(--menu-hover-bg);
  color: var(--menu-hover-text);
}

/* Highlight states */
.menu li.has-subnav > a:hover,
.menu li.has-subnav > a:focus {
  color: var(--menu-focus-text);
}

.menu li.has-subnav > ul.subnav a:hover,
.menu li.has-subnav > ul.subnav a:focus {
  color: var(--menu-focus-text);
}

/* Show submenu */
.menu li.has-subnav:hover > ul.subnav,
.menu li.has-subnav:focus-within > ul.subnav {
  display: block;
}

.subnav li {
  margin: 0.3rem 0;
}

.subnav a {
  color: inherit;
  text-decoration: none;
  font-weight: normal;
  font-size: 0.9rem;
  display: block;
}

.pale {
  opacity: 0.6;
  font-size: 0.8rem;
  margin-right: 0.3rem;
}

.toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: inherit;
  cursor: pointer;
}

/* ===========================
   Main content
   =========================== */
main {
  flex: 1;                 /* grow to fill available space */
  display: flex;
  justify-content: center;
  align-items: flex-start; /* keep content below header */
  width: var(--content-widths);
  max-width: 1499px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Welcome page main */
body.welcome main {
  flex: none;
  height: 80vh;
  overflow: hidden;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
}
body.welcome main {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Welcome image */
.welcome-image {
  width: var(--content-widths);
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.welcome-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.welcome-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

/* ===========================
   Resume Section
   =========================== */
.resume-content {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 2rem;
}

.resume-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto; /* centers the image */
}


/* Resume Links Layout */
.resume-links {
  display: flex;
  justify-content: space-around; /* spreads links evenly */
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem auto 0;
  width: 60vw;
  max-width: 60vw;   /* limit row width */
}


.resume-links p {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
}

/* Link Styling */
.resume-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Icon Styling */
.resume-links svg {
  width: 1.5em;
  height: 1.5em;
  fill: var(--text-color);
  transition: fill 0.3s ease;
}

/* Hover / Focus Effects */
.resume-links a:hover,
.resume-links a:focus {
  color: var(--menu-focus-text); /* e.g. orange */
}

.resume-links a:hover svg,
.resume-links a:focus svg {
  fill: var(--menu-focus-text);
}

/* Optional: Responsive layout */
@media (max-width: 600px) {
  .resume-links {
    flex-direction: column;
    align-items: stretch;
  }

  .resume-links p {
    justify-content: flex-start;
  }
}



/* ===========================
   Footer
   =========================== */
footer#foot {
  flex-shrink: 0;           /* stick to bottom of flex column */
  width: 100%;
  text-align: right;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  background: transparent;  /* or var(--bg-color) */
}

#foot {
  border-top: none;
  font-size: 0.7rem;
  text-align: right;   /* keep text tucked right */
  padding: 0.5rem 1rem;
  background: transparent;
  width: 100%;         /* span full width */
  margin-top: auto;    /* push footer to bottom */
  position: relative;  /* behave normally */
  box-sizing: border-box;
}

body.welcome #foot {
  background: var(--bg-color);
  color: var(--text-color);
  border-top-color: #444;
}


/* ===========================
   Fade-in animation
   =========================== */
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadein var(--fade-duration) ease forwards;
}

/* ===========================
   Responsive (mobile)
   =========================== */
@media (max-width: 900px) {
  .menu {
    display: none;
    flex-direction: column;
    background: inherit;
    position: absolute;
    top: 100%;
    right: 2rem;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 1rem;
  }

  .menu.active {
    display: flex;
  }

  .menu li.has-subnav > ul.subnav {
    position: relative;
    top: 0;
    right: 0;
    box-shadow: none;
    border-radius: 0;
    padding-left: 1rem;
  }

  .toggle {
    display: block;
  }

  .navv2 {
    position: relative;
  }
}


/* ===========================
   General Wrapper
   =========================== */
.project-wrapper {
  margin: 0 auto;
  padding: 20px;
  max-width: 1600px;
  width: 100%;
}


/* ===========================
   Carousel (Responsive)
   =========================== */
.carousel {
  margin: 2rem auto;
  position: relative;
  overflow: hidden;
}

.carousel-wrapper {
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100vh; /* Responsive height relative to viewport */
  max-height: 1600px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.carousel-slide img {
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  max-width: 100%;
  max-height: 100%;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
}

.carousel-button.prev { left: 1rem; }
.carousel-button.next { right: 1rem; }

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px; /* adjust spacing between dots */
  max-width: 80%;
  margin: 1em auto 0 auto;
  padding: 0 10px;
}

.carousel-dots .dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border: none;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex: 0 0 auto; /* Prevent stretching */
}

.carousel-dots .dot.active {
  background-color: orange;
}



/* ===========================
   Moving Media Section
   =========================== */
   
.moving-media .movies {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap; /* allows stacking on small screens */
}

.moving-media .video-embed {
  flex: 2 1 60%;
  aspect-ratio: 16 / 9; /* keeps it proportional */
}

.moving-media .video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.moving-media .video-description {
  flex: 1 1 35%;
}


/* ===========================
   Highlights (Responsive Grid)
   =========================== */

.highlight-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1rem;
  margin-top: 3rem;
}

.highlight-item {
  overflow: hidden;
  border-radius: 6px;
}

.highlight-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

/* Right Column */
.highlight-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Top row (2 left + 1 right) */
.highlight-top {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1rem;
  align-items: stretch; /* keep portrait and stacked column equal height */
}

.highlight-top-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-item.small,
.highlight-item.portrait {
  flex: 1 1 0;
  height: 100%;
}

.highlight-item.small img,
.highlight-item.portrait img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Bottom landscape */
.bottom-landscape img {
  height: auto;
}

/* Large left image */
.large-left img {
  height: 100%;
  object-fit: cover;
}

/* ===========================
   Lightbox Stylinggg
   =========================== */

/* Lightbox Overlay */
.lightbox-overlay {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  color: var(--lightbox-labels);
}

.lightbox-overlay.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 95%;
  max-height: 95%;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}
/* Navigation buttons */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border: none;
  cursor: pointer;
  z-index: 10000;
  user-select: none;
  transition: background 0.2s;
}
.lightbox-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}
.lightbox-arrow.left {
  left: 1rem;
}
.lightbox-arrow.right {
  right: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

.hidden {
  display: none !important;
}


/* Lightbox content styling */
.lightbox-content {
  color: var(--lightbox-labels);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.6;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Lighten text inside the form */
.lightbox-content input,
.lightbox-content textarea {
  color: #222;
  font-size: 1.05rem;
  width: 100%;
  display: block;
  margin-bottom: 1rem;
}

/* Input and textarea styles */
.lightbox-content input,
.lightbox-content textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fdfdfd;
}

/* Submit button */
.lightbox-content button[type="submit"] {
  background: #222;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.lightbox-content button[type="submit"]:hover {
  background: #444;
}

.g-recaptcha {
  margin: 1rem 0;
}

button.g-recaptcha {
  display: inline-block;
  background: #007BFF;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  cursor: pointer;
}



/* ===========================
   Pointless Photos Gallery
   =========================== */
   
#pointless-photos-gallery {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0px;
  list-style: none;
}

li.ppgal-list  {
  height: 40vh;
  flex-grow: 1;
  padding: 0.2em;
}

.ppgal-list li:last-child {
  flex-grow: 10;
}

.ppgal-item {
  max-height: 100%;
  min-width: 100%;
  object-fit: cover;
  vertical-align: bottom;
  border-radius: 1em;
}



/* ===========================
   Responsivity Tweaks
   =========================== */

@media (max-width: 1024px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .highlight-right,
  .highlight-top-left {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .highlight-top {
    grid-template-columns: 1fr;
  }

  .carousel-inner {
    height: 50vh;
  }
}

@media (max-width: 900px) {
  .carousel-dots {
    display: none;
  }
}

@media (max-width: 768px) {
  .carousel-inner {
    height: 45vh;
  }

  .carousel-button {
    font-size: 1.5rem;
    padding: 0.25rem 0.75rem;
  }

  .highlight-top-left {
    flex-direction: column;
  }

  .highlight-grid {
    gap: 0.75rem;
  }
  
  .lightbox-content {
    max-width: 700px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .carousel-inner {
    height: 40vh;
  }

  .highlight-grid {
    gap: 0.5rem;
  }
}

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
#pointless-photos-gallery {
    flex-direction: row;
  }

.ppgal-list li {
    height: auto;
    width: 100%;
  }
.ppgal-item {
    width: 100%;
    max-height: 75vh;
    min-width: 0;
  }
}    
   
@media (max-height: 480px) {
.ppgal-list li {
    height: 80vh;
  }
}

@media (max-aspect-ratio: 1/1) {
.ppgal-list li {
    height: 30vh;
  }
}