/* Wildlands — yuenye-inspired portfolio (distinct palette & fonts) */
:root{
  --bg:#0b0d0f;
  --fg:#e6efe8;
  --muted:#b6c7bf;
  --ink1:#5ad1b5;     /* seafoam */
  --ink2:#0ea5a0;     /* teal */
  --accent:#ffd166;   /* amber */
  --border:#1b2024;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font-family:'Space Grotesk',system-ui,ui-sans-serif;line-height:1.45;overflow-x:hidden}

.site-header{position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--border);backdrop-filter:saturate(120%) blur(8px);background:rgba(7,9,11,0.6);z-index:100}
.logo{font-weight:700;letter-spacing:.5px;text-decoration:none;color:var(--fg)}
.site-nav{display:flex;gap:14px;align-items:center}
.site-nav a{color:var(--muted);text-decoration:none}
.site-nav a:hover{color:var(--fg)}
.btn-pill{border:1px solid var(--fg);border-radius:999px;padding:6px 12px}
.view-toggle{display:flex;border:1px solid var(--border);border-radius:999px;overflow:hidden}
.vt{background:transparent;color:var(--muted);border:0;padding:6px 10px;cursor:pointer}
.vt[aria-pressed="true"]{color:#0b0d0f;background:var(--fg)}

.loader{position:fixed;inset:0;display:grid;place-items:center;background:var(--bg);z-index:200;transition:opacity .6s ease,visibility .6s ease}
.loader{
  /* Hide the loading overlay.  Since we are not preloading images anymore, we can skip the loader entirely. */
  display:none !important;
}
.loader.hidden{opacity:0;visibility:hidden}
.loader .small{color:var(--muted);letter-spacing:2px}
.counter{font-size:clamp(40px,8vw,120px);font-weight:700}

.ink{position:fixed;inset:0;pointer-events:none;z-index:0;mix-blend-mode:screen;opacity:.35}
/* Re‑enable the ink cursor canvas.  The decorative ink canvas tracks the cursor and emits
   a teal glow, so do not hide it. */

main{position:relative;z-index:1}
.hero{min-height:80vh;padding:120px 24px 60px;display:grid;gap:36px;align-content:end; background: url(images/mark-mc-neill-JNC32GqudJ8-unsplash.jpg);
}}
.hero .intro h1{font-family:'Instrument Serif',serif;font-size:clamp(36px,6vw,84px);line-height:1.0;margin:.2em 0}
.hero .intro em{
  /* Remove any colored background highlight on the emphasised word and set the text to black for better legibility */
  /* Override any inherited colour for the location text */
  /* Set the location text to the site’s teal accent colour for better contrast against
     the dark background.  The text shadow is removed to allow the color itself to stand out. */
  color:var(--ink2) !important;
  font-style:italic;
  background:none !important;
  text-shadow:none;
}

p {
  font-size:1.3rem;
}

.sub{color:var(--muted);font-size: 1.6rem;}
.hero-stats{display:flex;gap:24px;flex-wrap:wrap}
.hero-stats{
  /* Ensure no background is applied behind the stats bar */
  background:none;
}
.stat{border-top:1px solid var(--border);padding-top:8px}
.stat .num{font-variation-settings:'wght' 700;font-size:28px;margin-right:8px}

.home-cards{display:grid;grid-template-columns:repeat(12,1fr);gap:18px;padding:40px 24px 90px}
.card{grid-column:span 4;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#0f1316,#0b0d0f)}
.card .cover{aspect-ratio:16/10;background:radial-gradient(600px 300px at calc(10%*var(--i)) 40%, rgba(90,209,181,.18), transparent 60%), radial-gradient(600px 300px at 60% 80%, rgba(14,165,160,.18), transparent 60%)}
.card .meta{padding:12px 14px;color:white}
.card:hover{border-color:#163b38;transform:translateY(-2px);transition:.2s ease}

.works-head{padding:120px 24px 0}
.works-list{padding:24px;display:grid;gap:22px}
.works-list.view-grid{grid-template-columns:repeat(12,1fr)}
.works-list.view-grid .work{grid-column:span 6;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#0f1316,#0b0d0f)}
.works-list.view-grid .thumb{display:block}
.thumb .cover{aspect-ratio:16/9;background:radial-gradient(500px 260px at 30% 50%, rgba(90,209,181,.2), transparent 60%), radial-gradient(500px 260px at 70% 40%, rgba(14,165,160,.16), transparent 60%)}
.work .meta{padding:12px 14px}
.tags{display:flex;gap:8px;list-style:none;margin:8px 0 0;padding:0}
.tags li{border:1px solid var(--border);border-radius:999px;padding:4px 8px;color:var(--muted)}

.works-list.view-linear{display:block}
.works-list.view-linear .work{display:flex;gap:18px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}
.works-list.view-linear .thumb{width:240px;flex:0 0 auto}
.works-list.view-linear .thumb .cover{border-radius:8px}

.info .info-wrap{padding:120px 24px;max-width:980px;margin:0 auto}
.two{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-top:20px}
.bullets{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.archive{padding:120px 24px}
.filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.filters .filter{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:6px 10px;cursor:pointer}
.filters .filter.active{background:var(--fg);color:#0b0d0f}
.archive-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}
.arch{grid-column:span 2;border:1px solid var(--border);border-radius:12px;padding:18px;text-decoration:none;color:var(--fg);background:linear-gradient(180deg,#0f1316,#0b0d0f)}
.arch:hover{border-color:#163b38}

.nf{min-height:70vh;padding:120px 24px}

.site-footer{padding:24px;border-top:1px solid var(--border);text-align:center;color:var(--muted)}

/* Footer link colour should use the site’s teal accent for a cohesive look */
.site-footer a{color:var(--ink2);text-decoration:none;}
.site-footer a:hover{color:var(--ink1);}/* lighten on hover */

/* Starry background canvas. Positioned behind everything with fixed positioning. */
#starsBg{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:-2;
  pointer-events:none;
  /* Use a solid black background instead of the radial galaxy pattern for a cleaner look */
  background:#000;
}

/*
 * Align the home page cards consistently.  By using space‑between on the flex
 * container we ensure the cover and meta areas stretch evenly within each
 * card, so all cards have equal height regardless of their content.
 */
.card{
  justify-content:space-between;
}

/* Call to action button in the hero section */
.hero-cta{
  border:1px solid var(--fg);
  border-radius:999px;
  padding:8px 20px;
  background:transparent;
  color:var(--fg);
  display:inline-block;
  font-size:16px;
  transition:background .2s ease,color .2s ease;
  text-decoration:none;
}
.hero-cta:hover{
  background:var(--fg);
  color:#0b0d0f;
}

/* Set a photographic background for the info page */
.info{
  background:url('images/bailey-zindel-NRQV-hBF10M-unsplash.jpg') center/cover no-repeat;
}

/* Lightbox overlay for project details */
.lightbox{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,0.75);
  z-index:300;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .3s ease, visibility .3s ease;
}

/* When the lightbox has the .open class added by JS, reveal it and allow interaction */
.lightbox.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.lightbox-inner{
  position:relative;
  width:min(900px, 92vw);
  /* Limit modal height so it never exceeds the viewport. Content will scroll inside */
  max-height:90vh;
  overflow-y:auto;
  background:linear-gradient(180deg,#0f1316,#0b0d0f);
  border:1px solid var(--border);
  border-radius:14px;
  padding:24px;
  color:var(--fg);
}
.lightbox-inner img{
  width:100%;
  /* Limit image height so that the modal content stays centered on larger screens. */
  max-height:50vh;
  height:auto;
  object-fit:cover;
  margin-bottom:16px;
  border-radius:12px;
}
/* Close button inside the lightbox
   Position it relative to the modal content so it remains accessible on all devices.
   The button sits in the top-right corner of the lightbox inner container. */
.lightbox-close{
  position:absolute;
  top:16px;
  right:16px;
  font-size:32px;
  line-height:1;
  background:transparent;
  border:0;
  color:#ffffff;
  cursor:pointer;
  padding:4px;
  z-index:1;
}
.lightbox-close:hover{
  color:var(--fg);
}

@media (max-width:900px){
  .card{grid-column:span 12}
  .arch{grid-column:span 6}
  .two{grid-template-columns:1fr}
  .works-list.view-linear .thumb{width:40vw}
  /* Stack works grid on small screens */
  .works-list.view-grid .work{grid-column:span 12;}
}

/* --- Mobile Menu Enhancement (non-intrusive) --- */
.hamburger{display:none;position:relative;width:42px;height:42px;border:1px solid var(--border);border-radius:10px;background:transparent;cursor:pointer;align-items:center;justify-content:center;gap:6px}
.hamburger span{display:block;width:22px;height:2px;background:var(--fg);transition:transform .25s ease,opacity .2s ease}
.hamburger:focus{outline:2px solid var(--accent);outline-offset:2px}

/* Small screens */
@media (max-width: 860px){
  .site-header{gap:12px;padding:10px 14px}
  .site-header .logo{z-index:100}
  .hamburger{display:flex;z-index:100}
  /* Hide nav by default on mobile */
  #primary-nav{position:fixed;inset:56px 10px auto 10px;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--border);border-radius:14px;background:rgba(11,13,15,0.98);backdrop-filter:saturate(120%) blur(8px);max-height:70vh;overflow:auto;transform:translateY(-8px);opacity:0;pointer-events:none;transition:opacity .2s ease, transform .2s ease}
  .nav-open #primary-nav{opacity:1;transform:translateY(0);pointer-events:auto}
  /* Animate hamburger into an X */
  .nav-open .hamburger span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .nav-open .hamburger span:nth-child(2){opacity:0}
  .nav-open .hamburger span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
  /* Keep the view-toggle visible inside the dropdown */
  .site-header .view-toggle{margin-top:8px;border-top:1px solid var(--border);padding-top:8px}
  /* Prevent layout shift: hide inline nav in header row */
  .site-header > #primary-nav{position:fixed}
}

/* -------------------------------------------------------------------
   Custom additions for project
   The following rules ensure that image covers fill their container and
   implement a subtle multi‑shadow hover effect on works, cards and archive
   items.  
   ------------------------------------------------------------------- */

/* Ensure image covers scale properly */
.card .cover,
.thumb .cover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hide any img elements inside thumbnail covers.  On some cards (e.g. the
   "Visual Designer" project) the cover content is rendered using inline
   images rather than a background.  When replacing covers with our own
   ambient artwork, these inline images would show on top of the new
   backgrounds.  To ensure the ambient images remain visible, hide any
   <img> elements that appear inside a thumbnail. */
.thumb img {
  display: none !important;
}

/* Force the last work (project-15) to display the ambient image on top of
   whatever contents its cover may contain.  The Digital Dream project uses
   a custom thumbnail markup with multiple inline elements, which would
   otherwise show through our background replacement.  By overlaying our
   ambient artwork via a pseudo‑element we ensure the cover matches the
   aesthetic of the other cards. */
#project-15 .cover {
  position: relative;
  overflow: hidden;
}
#project-15 .cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/ambient5.png') center/cover no-repeat;
  z-index: 1;
  pointer-events: none;
}

/* Multi‑shadow hover effect inspired by the provided CodePen */
.card:hover,
.works-list .work:hover,
.archive-grid .arch:hover {
  box-shadow:
    0 4px 0 0 rgba(14, 165, 160, 0.25),
    0 8px 0 0 rgba(14, 165, 160, 0.15),
    0 12px 0 0 rgba(14, 165, 160, 0.05);
  transform: translateY(-4px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* === Modal/Lightbox Centering Patch (2025-11-12) === */
.lightbox,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.lightbox.open,
.modal-overlay.open {
  display: flex;
}

.lightbox .lightbox-content,
.modal,
.project-modal,
.modal-content {
  position: relative;
  background: rgba(10,10,10,0.98);
  color: #fff;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 9999;
}

.lightbox img,
.modal img,
.project-modal img,
.modal-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.modal-close,
.lightbox-close,
.project-modal .close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
}

@media (max-width: 768px) {
  .lightbox .lightbox-content,
  .modal,
  .project-modal,
  .modal-content {
    width: 95vw;
    max-height: 88vh;
    padding: 16px;
  }
}

/* Prevent background scroll when a modal/lightbox is open */
body.modal-open {
  overflow: hidden;
}


/* === Modal Carousel Controls (2025-11-12) === */
.modal-content {
  position: relative;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 10001;
  backdrop-filter: blur(2px);
}
.modal-prev { left: 10px; }
.modal-next { right: 10px; }

.modal-nav:focus,
.modal-close:focus {
  outline: 2px solid rgba(0, 255, 200, 0.6);
  outline-offset: 2px;
}

.modal-body {
  /* leave room so arrows don't overlap content too much on small screens */
  padding: 8px;
}

@media (max-width: 768px) {
  .modal-nav {
    font-size: 24px;
    padding: 8px 12px;
  }
}

/* === Lightbox Carousel Controls (2025-11-12) === */
#lightbox .lightbox-inner { position: relative; }
#lightbox .lightbox-prev,
#lightbox .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 10001;
  backdrop-filter: blur(2px);
}
#lightbox .lightbox-prev { left: 10px; }
#lightbox .lightbox-next { right: 10px; }
@media (max-width: 768px){
  #lightbox .lightbox-prev, #lightbox .lightbox-next{
    font-size: 24px; padding: 8px 12px;
  }
}

/* === Lightbox Carousel Controls v3 (2025-11-12) === */
#lightbox .lightbox-inner { position: relative; overflow: visible; }
#lightbox .lightbox-content { max-height: 80vh; overflow: auto; }
#lightbox .lightbox-prev,
#lightbox .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 30px;
  padding: 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 10010;
  pointer-events: auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
#lightbox .lightbox-prev { left: 8px; }
#lightbox .lightbox-next { right: 8px; }

@media (max-width: 768px) {
  #lightbox .lightbox-prev,
  #lightbox .lightbox-next {
    font-size: 26px;
    padding: 10px 12px;
    opacity: 0.95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
  }
}

/* Ensures consistent thumbnail sizing */
.thumb .thumb-img { width: 100%; padding-top: 66%; border-radius: 10px; }
