/* Limit text width for readability */
.container p,
.container li,
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
.project-about p {
    max-width: 70%;
    margin-left: 0;
    margin-right: 0;
    word-break: break-word;
}

/* navigation links should never wrap mid-word */
.overlay-nav .nav-menu-main li,
.overlay-nav .nav-menu-sub li,
.overlay-nav .nav-menu-socials li {
    word-break: normal;
    overflow-wrap: normal;
}

/* Allow text to span full width on home page only */
.home-page .container p,
.home-page .container li,
.home-page .container h1,
.home-page .container h2,
.home-page .container h3,
.home-page .container h4,
.home-page .container h5,
.home-page .container h6 {
    max-width: none;
}
:root{
    --bg:#1c1c1e;
    --muted:#9aa0a6;
    --accent:#e6e6e6;
    --accent-2:#f4f4f4;
    /* Share button scale factor (1 = default, 1.5 = 50% larger, etc) */
    --share-btn-scale: 1.3;
    /* Unified offset used by filter labels, buttons and project title */
    --filter-offset: 10px;
    /* Row height for virtualised grid (matched by JS getRowHeight) */
    --row-height: 450px;
} 
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;overflow-x:hidden}
body{background:var(--bg);color:var(--accent);-webkit-font-smoothing:antialiased}

main,
.content,
.other-works,
p,
h1, h2, h3, h4, h5, h6,
.project-title,
.project-location,
.project-year,
.other-work-title,
.other-work-location {
  user-select: text;
}

.container {
    max-width: none;
    width: 75vw;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}
.site-header .container,
.site-footer .container {
    width: 92%;
    margin-left: 4%;
    margin-right: 4%;
    box-sizing: border-box;
}
.site-header{position:fixed;left:0;right:0;top:0;z-index:1010;background:transparent;pointer-events:none}
/* ensure logo/nav toggle sit above overlay */
.site-header .logo{z-index:1011;}
.site-header .nav-toggle{z-index:1011;}
/* allow clicks on interactive elements inside header */
.site-header .logo,
.site-header .nav-toggle,
.site-header .nav-toggle * { /* include inner parts of button */
    pointer-events:auto;
}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:30px 0}
.logo{font-weight:800;letter-spacing:1px;color:#f4f4f4;user-select: none;cursor: default;text-shadow: 0 1px 10px rgba(0,0,0,0.5);}

.nav-toggle{display:block;background:none;border:0;color:var(--accent);font-size:20px}

.hero{
  /* Make the hero always fill the viewport height so the background image is cropped to device height */
  position:relative;
    --hero-gradient: linear-gradient(180deg, rgba(28,28,30,0), rgba(28,28,30,0.4));
        --hero-offset-x: 12.5vw;
        --hero-offset-y: -14vh;
  min-height:100vh;
  height:100vh;
  width:100vw;
  overflow:hidden;
  display:flex;
  align-items:center;
}

.hero-scroll-indicator {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto; 
    bottom: 10px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-2);
    z-index: 5;
    background: transparent;
    border: none;
    cursor: pointer;
    animation: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 4000ms ease;
}

.hero-scroll-indicator.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* 3. Keyframes are now clean and only handle movement */
@keyframes hero-scroll-pulse {
    0%   { transform: translateX(0); }
    45%  { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.hero-scroll-indicator svg{
    width:100%;
    height:100%;
    display:block;
    rotate: -90deg;
    fill:currentColor;
    stroke: currentColor; /* use the button's color (set to var(--accent-2)) */
    stroke-width: 5px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
    animation: hero-scroll-pulse 3s infinite ease-in-out;
}

.hero-swiper{
  position:absolute;
  inset:0;
  height:100%;
  width:100%;
  z-index:0;
  touch-action:pan-y;
}
.hero-swiper .swiper-slide{
  width:100%!important;
  max-width:100%!important;
  height:100%;
    position:relative;
    display:flex;
        align-items:flex-end;
        justify-content:flex-end;
        z-index:0;
}

.hero-inner{
    position:absolute;
    bottom:0;
    left:0;
    z-index:4;
    padding:0;
    color:var(--accent-2);
    text-align:left;
    opacity:0;
    transition:opacity .35s ease;
    pointer-events:none;
}
.hero-inner.container{
    width:auto;
    max-width:calc(100vw - var(--hero-offset-x));
    margin-left:0;
    margin-right:0;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.home-page .hero-swiper .hero-inner{transform:translate(var(--hero-offset-x), var(--hero-offset-y))}
.hero.hero-ready .hero-inner{opacity:1}
.hero-fade{opacity:1;transition:opacity 800ms cubic-bezier(0.455, 0.03, 0.515, 0.955)}
.hero-fade.is-fade-prep{opacity:0;transition:none}
.hero-fade.is-fade-out{opacity:0;transition:opacity 200ms cubic-bezier(0.455, 0.03, 0.515, 0.955)}
.hero-fade.is-fade-in{opacity:1;transition:opacity 800ms cubic-bezier(0.455, 0.03, 0.515, 0.955)}
.hero .hero-inner h1,
.hero .hero-inner h2,
.hero .hero-inner h3,
.hero .hero-inner h4,
.hero .hero-inner h5,
.hero .hero-inner h6,
.hero .hero-inner p{
    /* Override global .container text width/margins so hero text stays centered */
    max-width:none;
    margin-left:auto;
    margin-right:auto;
}
.hero-inner h1 {
  /* Minimum size: 2.5rem, Preferred size: 10vw, Maximum size: 5rem */
  font-size: clamp(2.5rem, 10vw, 5rem); 
}

.hero-meta{color:var(--accent-2);margin-bottom:40px;letter-spacing:0.28em;text-transform:uppercase;font-size:12px;font-weight:300}
.hero-controls{display:flex;align-items:center;gap:12px;justify-content:center;margin-top:22px}
.hero-controls .hero-dots{display:flex;gap:8px}
.hero-controls .hero-dots button{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,0.15);border:0;padding:0}
.hero-controls .hero-dots button.active{background:var(--accent-2)}
.hero-prev,.hero-next{background:transparent;border:0;color:var(--accent-2);font-size:28px;line-height:1;padding:6px 10px}
.hero-link{margin-top:18px;display:inline-block;pointer-events:auto}
.hero-title{font-size:52px;margin-bottom:40px;line-height:1.08;font-weight:300;letter-spacing:0.02em}
.hero-sub{color:var(--accent-2);max-width:640px;margin-bottom:40px;font-size:15px;letter-spacing:0.24em;text-transform:uppercase;font-weight:300}
.hero-swiper .swiper-pagination{
    position:absolute;
    z-index:2;
    right:0;
    left:0;
    bottom:0;
    width:100%;
    margin:0;
    padding:0 4vw 14vh 0;
    text-align:right;
    pointer-events:none;
    line-height:0;
    --swiper-pagination-bullet-horizontal-gap: 6px;
}
.hero-swiper .swiper-pagination-bullet{
    position:relative;
    width:9px;
    height:9px;
    border-radius:50%;
    background:transparent;
    border:1px solid rgba(255,255,255,0.9);
    opacity:0.6;
    pointer-events:auto;
    margin:0 8px;
    vertical-align:middle;
    /* Smoothly animate border, background color, and margin for gap changes */
        transition: border-color .5s ease-in, background-color .5s ease-in, margin .5s ease-in, width .5s ease-in, height .5s ease-in;
    will-change: border-color, background-color;
}
.hero-swiper .swiper-pagination-bullet-active{
    /* Keep border to white when active and fill background */
    border-color:#ffffff;
    background-color:#ffffff;
}
.btn-primary{display:inline-flex;align-items:center;gap:10px;background:transparent;color:var(--accent-2);padding:0 0 6px;border-radius:0;text-decoration:none;font-weight:300;letter-spacing:0.36em;text-transform:uppercase;font-size:12px;position:relative}
.btn-primary::after{content:"";display:block;position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(255,255,255,0.7);transform-origin:left;transform:scaleX(0.7);transition:transform 0.3s ease,opacity 0.3s ease;opacity:0.9;pointer-events:none}
.btn-primary:hover::after{transform:scaleX(1);opacity:1}
.btn-load-more{display:inline-flex;align-items:center;gap:8px;margin:40px 0 0;background:transparent;color:var(--accent-2);padding-left:var(--filter-offset);border-radius:6px;border:none;font-weight:600;cursor:pointer;font-size:20px;text-align:left}
.btn-chevron{display:flex;align-items:center;justify-content:center;transition:transform 0.4s ease;transform:scaleX(1.2) translateY(2.5px);width:1em;height:1em}
.btn-load-more:hover .btn-chevron{transform:scaleX(1.25) translateY(4px)}
.btn-text{display:inline-flex;align-items:center;line-height:1}
    .btn-spinner{
        width:0.75em;
        height:0.75em;
        margin-bottom:0.1em; /* visible spacing below spinner so it sits slightly above the button bottom */
        border:2px solid rgba(255,255,255,0.25);
        border-top-color:var(--accent-2);
        border-radius:50%;
        display:none;
        align-items:center;
        justify-content:center;
        opacity:0;
        transform:scale(0.6);
        transition:opacity 0.2s ease, transform 0.2s ease;
        vertical-align:middle; /* align inline with text baseline */
        align-self:flex-end; /* keep spinner anchored to the bottom of the button */
    }
.btn-load-more.is-loading{cursor:progress;pointer-events:none;animation:btnPulse 2s ease-in-out infinite}
    .btn-load-more.is-loading .btn-spinner{display:inline-flex;opacity:1;transform:scale(1);animation:btnSpin 1.6s linear infinite}
.btn-load-more.is-loading .btn-chevron{opacity:0;transform:scaleX(1.1) translateY(2px)}

@keyframes btnSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes btnPulse{0%,100%{opacity:0.5}50%{opacity:1}}

.projects-section{padding:85px 0 80px;background:var(--bg);color:var(--accent-2)}
.projects-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:0 0 18px;border-bottom:none;flex-wrap:nowrap}
.projects-title-wrap{display:flex;flex-direction:column;gap:6px}
.projects-title{margin:0;font-size:40px;font-weight:600;color:var(--accent-2);padding-left:var(--filter-offset)}
.view-toggle{display:flex;gap:8px}
.view-btn{height:28px;width:28px;border-radius:3px;border:none;background:transparent;color:var(--accent-2);cursor:pointer;opacity:0.5;transition:transform .12s ease,opacity .18s ease}
.view-btn:hover{transform:translateY(-1px)}
.view-btn.active{background:transparent;opacity:1}

.filter-row{display:flex;gap:20px;flex-wrap:wrap;align-items:center;padding:18px 0 65px}
.filter-group{display:flex;flex-direction:column;gap:10px;font-size:12px;color:var(--muted);text-transform:lowercase;letter-spacing:0.6px}
.filter-group > span{padding-left:var(--filter-offset)}
.filter-group select{min-width:180px;background:transparent;color:var(--accent-2);border:1px solid rgba(255,255,255,0.08);border-radius:10px;padding:10px var(--filter-offset);font-size:15px;appearance:none;outline:none}

/* Filter dropdowns (custom select) */
.filter-group .dropdown{position:relative;width:fit-content}
.filter-group .dropbtn{
    width:fit-content;
    font-size:24px;
    font-weight:300;
    border:none;
    outline:none;
    color:var(--accent-2);
    padding:var(--filter-offset);
    background:transparent;
    margin:0;
    text-align:left;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.filter-group .dropbtn:hover{cursor:pointer}
.filter-group .dropdown-selected-col{display:flex;align-items:center}
.filter-group .dropdown-icon{margin-left:14px;display:flex;align-items:center}
.filter-group .dropdown-icon svg{width:20px;height:20px}
.filter-group .dropdown-content{
    display:block;
    position:absolute;
    background-color: rgba(28, 28, 30, 0.9);
    min-width:0;
    width:max-content;
    max-width:none;
    box-shadow:0 8px 16px rgba(0,0,0,0.2);
    z-index:20;
    max-height:315px;
    overflow:auto;
    border-radius:0;
    margin-top:8px;
    left:0;
    padding-left:0;
    opacity:0;
    transform:scale(0);
    transform-origin:50% 0%;
    visibility:hidden;
    pointer-events:none;
    transition: opacity 0.3s ease, transform 0.2s ease, visibility 0s linear 0.3s;
}
.filter-group .dropdown-content.is-open{
    opacity:1;
    transform:scale(1);
    visibility:visible;
    pointer-events:auto;
    transition: opacity 0.3s ease, transform 0.2s ease, visibility 0s;
}
.filter-group .dropdown-content .dropdown-item{
    float:none;
    color:var(--accent-2);
    font-size:15px;
    padding:10px var(--filter-offset);
    text-decoration:none;
    display:block;
    text-align:left;
}

/* Ensure dropdown button labels and items are capitalised (words) while
   keeping the small filter-group label lowercase. This makes location
   values match the button text appearance. */
.filter-group .dropbtn .dropdown-selected-title,
.filter-group .dropdown-content .dropdown-item-title {
    text-transform:capitalize;
}
.filter-group .dropdown-content .dropdown-item:hover{cursor:pointer;background:rgba(255,255,255,0.05)}
.filter-group .dropdown-content .dropdown-item.dropdown-selected{
    /* keep selected option visible but disabled-style */
    opacity:0.5;
    cursor:default;
    pointer-events:none;
}

.projects-grid{display:block;margin-top:var(--filter-offset);padding-bottom:10px;width:100vw;max-width:100vw;margin-left:calc((100vw - 100%) / -2);padding-left:0;padding-right:0}
.projects-grid.list-view{display:block;width:75vw;max-width:none;margin-left:auto;margin-right:auto;padding-left:0;padding-right:0}
.scroll-container{position:relative;width:100%}
.list-row{display:grid;grid-template-columns:repeat(2, 1fr);gap:30px;position:absolute;left:0;right:0;width:100%}
.project-row{display:flex;gap:5px;width:100%;max-width:100%;position:absolute;left:0;right:0}
/* Gallery debug stats overlay (hidden by default) */
.gallery-stats{position:fixed;top:10px;right:10px;background:rgba(0,0,0,0.75);padding:10px 16px;border-radius:6px;font-size:13px;z-index:100;line-height:1.7;pointer-events:none;display:none;color:var(--accent-2)}
.gallery-stats.is-visible{display:block}
.project-group{display:flex;gap:5px;width:calc(50% - 2.5px)}
.project-card{position:relative;display:flex;flex-direction:column;background:transparent;border:none;border-radius:0;overflow:hidden;text-decoration:none;color:var(--accent-2);transition:opacity 0.8s ease;flex:0 0 auto;opacity:0;contain:layout style}
.project-card.is-visible{opacity:1}
.card-50{width:calc(50% - 2.5px)}
.card-70{width:calc(70% - 2.5px)}
.card-30{width:calc(30% - 2.5px)}
.project-card_img{width:100%;height:450px;position:relative;overflow:hidden;opacity:0;transition:transform 1s ease, opacity 0.8s ease}
.project-card_img.is-loaded{opacity:1}
.project-card:hover .project-card_img{transform:scale(1.04)}
.project-card_body{display:none}
.project-card_meta{display:none}
.project-card_tags{display:none}
.project-card_tag{display:none}

/* Project card info overlay - fade in on hover */
.project-card_info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
    transition: opacity 0.2s ease-in-out;
    transition-delay: 0.3s;
  pointer-events: none;
}

/* Slide-nav overlay styles (from slide-nav.html) */
.nav-toggle { position: relative; width: 28px; height: 28px; background: transparent; border: none; z-index: 510; cursor: pointer; user-select: none; padding: 0; }
.nav-toggle-text { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; transition: transform 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955); }
.nav-toggle-text-inner { position: absolute; top: -15px; left: 0; width: 100%; text-align: center; font-size: 10px; font-weight: 800; line-height: 10px; letter-spacing: 0.02em; color: var(--accent); transition: color 0.3s; }

.nav-toggle-line { position: absolute; width: 24px; height: 2px; background-color: var(--accent); transition: background-color 0.3s, top 0.2s ease-in-out, left 0.2s ease-in-out, transform 0.2s ease-in-out; }
.nav-toggle-line.line-1 { top: 13px; left: 4px; transform-origin: center; }
.nav-toggle-line.line-2 { top: 20px; left: 12px; transform-origin: center; }

/* Active State */
body.is-nav-open .nav-toggle-text-inner { color: var(--accent-2); }
body.is-nav-open .nav-toggle-line { background-color: var(--accent-2); }
body.is-nav-open .nav-toggle-text { transform: translateX(-28px); }
body.is-nav-open .nav-toggle-line.line-1 { top: 16px; left: 4px; transform: rotate(-45deg); }
body.is-nav-open .nav-toggle-line.line-2 { top: 16px; left: 4px; transform: rotate(45deg); }

/* Add drop shadows to the nav trigger icon and its label for better legibility */
.nav-toggle,
.nav-toggle-text-inner {
    filter: drop-shadow(0 1px 10px rgba(0,0,0,0.5));
}

.nav-toggle-line {
    box-shadow: 0 1px 7px rgba(0,0,0,0.4);
    transition: box-shadow 0.25s ease, background-color 0.3s, top 0.2s ease-in-out, left 0.2s ease-in-out, transform 0.2s ease-in-out;
}

body.is-nav-open .nav-toggle-line {
    box-shadow: 0 1px 12px rgba(0,0,0,0.5);
}

.nav-toggle-text-inner {
    text-shadow: 0 1px 7px rgba(0,0,0,0.4);
}

/* OVERLAY NAVIGATION */
/* use a very high stack level so it truly sits above page content */
.overlay-nav { position: fixed; top: -110vh; left: 0; width: 100%; height: 100vh; background-color: var(--bg); z-index: 1000; pointer-events: none; overflow: hidden; transition: top 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955); }
body.is-nav-open .overlay-nav { top: 0; pointer-events: auto; }
/* full-screen transparent background layer also must capture clicks */
.nav-overlay-bg { position: absolute; inset: 0; background: transparent; z-index: 1001; cursor: default; pointer-events: none; }
.nav-content { position: absolute; top: 50%; left: 220px; width: 530px; height: 365px; z-index: 1002; transform: translateY(-50%); }

/* --- Active Page Nav Links --- */
.overlay-nav li:has(a.is-active) {
    cursor: default;
    pointer-events: none; /* Kills the hover state and click on the entire list item */
}

.overlay-nav a.is-active {
    color: var(--muted) !important; 
}

@media (min-width: 768px) and (max-width: 1024px) { .nav-content { left: 60px; } }
@media (max-width: 768px) { .nav-content { transform: translateY(0); top: 135px; left: 4%; width: 92%; } }

/* Nav Items Animation & Stagger */
.nav-menu-main li, .nav-menu-sub li, .nav-menu-socials li { opacity: 0; transition: opacity 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955); }
/* Overlay-specific resets to avoid site-wide overrides */
.overlay-nav ul { list-style: none; margin: 0; padding: 0; }
.overlay-nav a { text-decoration: none; color: var(--accent-2); outline: none; }
.overlay-nav .nav-menu-main li a { color: var(--accent-2); font-size: inherit; }
.overlay-nav .nav-menu-main { color: var(--accent-2); }
.overlay-nav .nav-menu-main li { list-style: none; }

/* Ensure large typography for menu items (override other rules) */
.overlay-nav .nav-menu-main li { font-size: 42px; line-height: 1; font-weight: 300; }
.overlay-nav .nav-menu-sub li { font-size: 20px; }

body.is-nav-open .nav-menu-main li, body.is-nav-open .nav-menu-sub li, body.is-nav-open .nav-menu-socials li { opacity: 1; }

/* --- Overlay Nav Automatic Stagger Math --- */

/* 1. Define the delays and intervals for each section */
.nav-menu-main {
  --section-delay: 0.4s;
  --item-interval: 0.1s;
}

.nav-menu-sub {
  --section-delay: 0.55s;
  --item-interval: 0.1s;
}

.nav-menu-socials {
  --section-delay: 0.85s;
  --item-interval: 0.1s;
}

/* 2. The formula: Initial Delay + (Item Index * Interval) */
body.is-nav-open .nav-menu-main li,
body.is-nav-open .nav-menu-sub li,
body.is-nav-open .nav-menu-socials li {
  opacity: 1;
  transition-delay: calc(var(--section-delay) + (var(--item-index, 0) * var(--item-interval)));
}

/* Keep the fast fade out on close */
body:not(.is-nav-open) .nav-menu-main li,
body:not(.is-nav-open) .nav-menu-sub li,
body:not(.is-nav-open) .nav-menu-socials li { 
  transition-delay: 0s; 
  transition-duration: 0.2s; 
}

/* Nav Typography & Layout */
.nav-menu-main { position: absolute; top: 0; left: 0; }
.nav-menu-main li { margin-bottom: 35px; font-size: 42px; line-height: 1; font-weight: 300; cursor: pointer; }
.nav-menu-main li a { transition: color 0.2s; }
.nav-menu-main li:hover a { color: var(--muted); }

.nav-menu-sub li a { transition: color 0.2s; }
.nav-menu-sub li:hover a { color: var(--muted); }

.nav-menu-socials a { color: var(--muted); transition: color 0.3s ease; display: flex; align-items: center; justify-content: center; }
.nav-menu-socials a:hover { color: var(--accent-2); }
.nav-menu-socials svg { width: 18px; height: 18px; fill: currentColor; }



/* The new wrapper controls the exact position */
.nav-menu-secondary { position: absolute; top: 17px; left: 345px; }

/* Remove absolute positioning, let it flow naturally */
.nav-menu-sub { position: relative; }
.nav-menu-sub li { margin-bottom: 57px; font-size: 20px; line-height: 1; }

/* Remove absolute positioning. The margin from the li above pushes this down perfectly */
.nav-menu-socials { display: flex; gap: 20px; align-items: center; }

@media (max-width: 768px) {
        .nav-menu-main li { margin-bottom: 35px; font-size: 30px; }
        .nav-menu-secondary { top: 290px; left: 0; }
        .nav-menu-sub li { margin-bottom: 30px; font-size: 18px; }
        .nav-menu-socials { gap: 30px; }
        .nav-menu-socials svg { width: 22px; height: 22px; }
}

.project-card:hover .project-card_info {
  opacity: 1;
    transition-delay: 0.3s;
}

.project-card_title {
  font-size: 24px;
  font-weight: 400;
  margin: 0;
  color: var(--accent-2);
  text-align: left;
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}
.projects-grid.empty::before{content:"No projects match these filters.";color:var(--muted);padding:20px 0;font-size:16px}

.section-title{color:var(--accent-2);margin-top:48px;margin-bottom:20px;font-size:28px}
.services-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.service{background:rgba(255,255,255,0.03);padding:28px;border-radius:8px}
.service .icon{font-size:32px;margin-bottom:12px}

.work-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:40px}
.work-item{background:linear-gradient(135deg,#111,#0f0f0f);padding:48px;border-radius:6px;color:var(--muted);display:flex;align-items:center;justify-content:center}

.site-footer{border-top:1px solid rgba(255,255,255,0.03);padding:28px 0 70px 0;margin-top:40px}
.footer-inner{display:flex;justify-content:space-between;align-items:center;color:var(--muted);gap:24px;padding:0}
.footer-left{display:flex;align-items:center;gap:48px;flex:1}
.footer-logo{color:var(--accent-2);font-weight:600;font-size:14px;white-space:nowrap}
.footer-link{color:var(--accent-2);text-decoration:none;font-size:14px;transition:color 0.2s ease}
.footer-link:hover{color:var(--accent)}
.footer-socials{display:flex;gap:16px;align-items:center}
.social-link{color:var(--muted);display:flex;align-items:center;justify-content:center;transition:color 0.2s ease;text-decoration:none}
.social-link:hover{color:var(--accent-2)}
.social-link svg{display:block}
.footer-back-to-top{position:relative;background:none;border:none;color:var(--accent-2);cursor:pointer;padding:6px;display:flex;align-items:center;justify-content:center;line-height:1;}
.footer-back-to-top::after{content:"";position:absolute;inset:5px;}
.footer-back-to-top svg{display:block;transform:scale(1.5);transition:transform 0.2s ease-in;}
.footer-back-to-top:hover svg{transform:translateY(-5px) scale(1.6)}

@media (max-width:1024px){
    :root{--row-height:324px}
        .container p,
        .container li,
        .container h1,
        .container h2,
        .container h3,
        .container h4,
        .container h5,
        .container h6 {
            max-width: 95%;
        }
    .site-header .container,
    .site-footer .container,
    .container {
        width: 92%;
        margin-left: 4%;
        margin-right: 4%;
        box-sizing: border-box;
    }
    .header-inner{padding:22px 0}
    .footer-inner{padding:0}
    .filter-group select{min-width:150px}
    .projects-grid{width:100vw;margin-left:calc((100vw - 100%) / -2)}
    .projects-grid.list-view{width:92%;margin-left:4%;margin-right:4%}
    .project-row{display:flex;gap:5px;width:100%;max-width:100%;position:absolute;left:0;right:0}
    .project-card_img{height:324px}
    .hero{height:60vh;}
    .hero-inner{padding:0}
    .hero-meta{font-size:12px}
    .hero-title{font-size:52px}
    .hero-sub{font-size:15px;letter-spacing:0.24em}
    .btn-primary{font-size:12px;letter-spacing:0.36em}
    .services-grid{grid-template-columns:1fr}
    .work-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:768px){
    :root{--row-height:252px}
    .footer-inner{
        flex-direction:column;
        align-items:stretch;
        gap:20px
    }
    .projects-section{padding:80px 0}
    .hero-meta{font-size:12px}
    .hero-title{font-size:52px}
    .hero-sub{font-size:15px;letter-spacing:0.24em}
    .btn-primary{font-size:12px;letter-spacing:0.36em}
    .projects-header{flex-direction:row;align-items:flex-end;flex-wrap:nowrap}
    .projects-grid{width:100vw;margin-left:calc((100vw - 100%) / -2)}
    .project-row{flex-direction:row;position:absolute;left:0;right:0}
    .project-row:has(.project-group){flex-direction:column}
    .project-row:has(.project-group) > .card-50{width:100%!important}
    .project-group{width:100%;flex-direction:row}
    .project-group .card-50{width:calc(50% - 2.5px)!important}
    .card-50{width:calc(50% - 2.5px)!important}
    .project-card_img{height:252px}
    .projects-grid.list-view{width:92%;margin-left:4%;margin-right:4%;padding-left:0;padding-right:0}
    .list-row{grid-template-columns:1fr}
    .footer-left{
        flex-direction:column;
        align-items:flex-start;
        gap:28px;
        order:1
    }
    .footer-logo{
        order:3;
        font-size:20px
    }
    .footer-link{
        order:1;
        font-size:18px
    }
    .footer-socials{
        order:2
    }
    .footer-back-to-top{
        order:2;
        align-self:flex-end;
        margin-top:-46px
    }
}

/* Project hero styles */

/* <picture> wrapper is transparent in layout for absolutely-positioned hero images */
.hero > picture{display:contents}

.hero-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  z-index:0;
}
.hero.is-parallax .hero-img,
.hero.is-parallax .hero-parallax-target{
    transform:translateY(0) scale(1.08);
    transform-origin:center;
    will-change:transform;
}
.hero::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
    background:var(--hero-gradient);
  transition:opacity 2.5s ease;
  opacity:1;
  will-change:opacity;
  backface-visibility:hidden;
}
.home-page .hero::before{display:none}
.hero.fade-out::before{
  opacity:0; /* change to 1 for checking matching opacity*/
  pointer-events:none;
}
.hero .hero-inner{position:absolute;z-index:2;bottom:0;left:0}
.park-content{padding:48px 20px;color:var(--accent)}
.park-content p{max-width:840px;margin:0 auto 28px;line-height:1.7;color:var(--accent-2)}
.park-placeholder{display:block;margin:0 auto 28px;max-width:100%;height:auto;border-radius:6px}

/* Project page share button */
.project-upload{
    display:inline-block;
    margin-left:calc(12px * var(--share-btn-scale));
    font-size:calc(20px * var(--share-btn-scale));
    color:var(--accent-2);
    text-decoration:none;
    cursor:pointer;
    opacity:0.9;
    transition:opacity .18s ease,transform .12s ease;
}
.project-upload:hover{opacity:1;transform:translateY(-1px)}

/* make the inline share SVG larger (scale up 2x) */
.project-upload svg{
    width:calc(35px * var(--share-btn-scale));
    height:calc(35px * var(--share-btn-scale));
    display:inline-block;
}

/* Toast for copy/share feedback */
.project-toast{position:fixed;right:20px;bottom:20px;background:#0f1720;color:#fff;padding:10px 14px;border-radius:6px;box-shadow:0 6px 20px rgba(0,0,0,0.4);z-index:9999;font-size:14px}

/* --- Gallery/Lightbox Styles --- */

/* The images on the page */

/* Ensure gallery-trigger images (non-hero) behave as contained elements
   and can be sized by JS without breaking layout. Add a toggleable
   `cropped-viewport` class to force full-width + viewport-height crop
   (object-fit:cover) for tall images, matching hero thumbnail behavior. */
.gallery-trigger {
    cursor: pointer;
    display: block;
    margin: 0.5rem auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Applied by JS when an image's natural height exceeds the viewport.
   Keeps full width and crops vertically like the hero thumbnail. */
.gallery-trigger.cropped-viewport {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 40px);
    object-fit: cover;
    object-position: center;
    display: block;
}

/* <picture> wrapper for gallery images */
picture:has(.gallery-trigger) {
    display: block;
    max-width: 100%;
    margin: 0.5rem 0 0.5rem 0;
}
/* Center gallery triggers inside a <picture> wrapper too.
   Previously we removed the margin to avoid doubling, but the outer
   .gallery-trigger rule already provides `auto` horizontal margins.
   Keeping a small vertical gap while allowing horizontal centering. */
picture > .gallery-trigger {
    margin: 0.5rem auto;
}
/* Gallery images display at natural aspect ratio, not cover-fill */
picture > .gallery-trigger,
.gallery-trigger {
    object-fit: contain;
    height: auto;
}

/* ===== <picture> element support (AVIF/WebP with fallback) ===== */

/* Grid card picture fills the container */
.card-picture{display:block;width:100%;height:100%}

/* Hero slide background via <picture> */
.hero-bg-wrapper,
.hero-gradient-overlay{
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  pointer-events:none
}
.hero-bg-wrapper{z-index:0}
.hero-gradient-overlay{z-index:1}
.hero-picture{display:block;width:100%;height:100%}

/* Fallback <img> inside all <picture> elements — acts like background-size:cover */
.picture-fallback-img{
  width:100%;height:100%;
  object-fit:cover;object-position:center;
  display:block
}

/* Panorama 360 viewer - match gallery width */
.panorama-360-viewer {
    display: block;
    max-width: 100%;
    width: 100%;
    height: 600px;
    margin: 2rem 0 1rem 0;
}

/* Keep the viewer title bar full width inside .container layouts */
.panorama-360-viewer .sceneName {
    max-width: min(60vw, calc(100vw - 160px));
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.lightbox {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9); 
    align-items: center;
    justify-content: center;
    /* Stack image and caption vertically */
    flex-direction: column;
    /* Reserve a fixed caption height so images keep consistent max-height
       whether or not a caption is shown. Adjust this value if you want
       a larger/smaller caption area. */
    --lightbox-caption-height: 64px;
    animation: fadeIn 1s ease forwards; 
}

.lightbox.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal Content (The Image) */
.lightbox-content {
    /* Avoid using margin:auto in the column flex layout — it can absorb
       extra space and cause the image element to appear taller than the
       visible image (creating a gap before the caption). */
    margin: 0;
    align-self: center;
    display: block;
    max-width: 100vw;
    /* Leave room at the bottom for a caption bar (fixed height reserved) */
    max-height: calc(100vh - var(--lightbox-caption-height));
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Caption shown under the lightbox image */
.lightbox-caption {
    color: #f1f1f1;
    max-width: min(100vw, 1200px);
    width: 100%;
    height: var(--lightbox-caption-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* When hidden keep the reserved height but visually hide content */
.lightbox-caption.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Class to trigger the animation on the image tag */
.lightbox-content.fade-transition {
    animation: fadeIn 600ms ease-in forwards;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Next & Previous Buttons */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    user-select: none;
    z-index: 10000;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Position Next 35px from right */
.lightbox-next {
    right: 35px;
}

/* Position Prev 35px from left */
.lightbox-prev {
    left: 35px;
}

/* --- THE FIX: Invisible Buffers --- */
/* These extend the "clickable" area inwards so the mouse doesn't "fall off" when the button moves */

/* Extends the Left button's hit area to the right */
.lightbox-prev::before {
    content: '';
    position: absolute;
    top: 0;
    right: -20px; /* Buffer size */
    width: 20px;
    height: 100%;
}

/* Extends the Right button's hit area to the left */
.lightbox-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px; /* Buffer size */
    width: 20px;
    height: 100%;
}

/* --- Hover Animations --- */

/* Only apply slide effect on devices that actually have a cursor (Desktop) */
@media (hover: hover) {
    /* Slide Right on hover */
    .lightbox-next:hover {
        background-color: rgba(0, 0, 0, 0);
        transform: translateX(10px); 
    }

    /* Slide Left on hover */
    .lightbox-prev:hover {
        background-color: rgba(0, 0, 0, 0);
        transform: translateX(-10px); 
    }
}

/* On Mobile, just darken the background without moving the button */
@media (hover: none) {
    .lightbox-next:active, .lightbox-prev:active {
        background-color: rgba(0, 0, 0, 0);
    }
}

/* --- Project Content Typography Scaling --- */
/* Increase overall text size within project content pages */
.content.container {
    font-size: 17px; /* up from default ~16px */
}

/* Comfortable reading line-height for paragraphs under content */
.content.container p {
    line-height: 1.8;
}

/* Project header: title, meta, and about heading */
.project-title {
    /* scale the h1 a bit more than default */
    font-size: 2.5em;
    margin: 0 0 8px;
}
.project-header {
    margin-top: 75px;
}
.project-meta {
    font-size: 1.2em;
    color: var(--muted);
}
.project-location,
.project-year {
    margin-top: 4px;
}
.project-about-heading {
    font-size: 1.6em;
    color: var(--muted);
    margin: 6px 0 14px;
}

.project-about {
    margin-bottom: 60px;
}

/* --- Other Works Section --- */
.other-works {
    padding: 0;
    margin-top: 80px;
}

.other-works-title {
    font-size: 35px;
    color: var(--muted);
    margin: 0 0 50px;
    text-align: left;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.other-works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 100%;
    margin-bottom: 40px;
}

.other-work-item {
    position: relative;
    display: block;
    text-decoration: none;
}

.other-work-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.other-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    transition: transform 1.2s ease, opacity 0.8s ease;
}

.other-work-item img.is-loaded {
    opacity: 1;
}

.other-work-item:hover img {
    transform: scale(1.015);
}

.other-work-info {
    padding: 7px 0 0;
    position: relative;
}

.other-work-info h4 {
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 5px 0;
    color: var(--accent-2);
}

.other-work-arrow {
    position: absolute;
    top: 17px;
    right: 0;
    font-size: 2.3em;
    line-height: 10px;
    color: var(--accent-2);
    transition: transform 0.6s ease-out;
    transform: scaleY(0.7);
}

.other-work-item:hover .other-work-arrow {
    transform: translateX(5px) scaleY(0.7);
}

.other-work-info .location {
    font-size: 14px;
    color: var(--muted);
    display: block;
}

@media (max-width: 768px) {
    .other-works {
        padding: 0;
        margin-top: 60px;
    }
    
    .other-works-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    
    .other-works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    .hero-swiper .swiper-pagination {
        --swiper-pagination-bullet-horizontal-gap: 5px;
    }
    .hero-swiper .swiper-pagination-bullet {
        width:5px;
        height:5px;
    }
}

/* --- Dynamic Social Icons Sizing --- */

/* Header Icons Base Size */
.nav-menu-socials .social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

/* Footer Icons Base Size */
.footer-socials .social-link svg {
    width: 18px;  /* You can change this to fit your footer */
    height: 18px;
    fill: currentColor;
    display: block;
}

/* Mobile Sizing Adjustments */
@media (max-width: 768px) {
    .nav-menu-socials .social-link svg {
        width: 22px;
        height: 22px;
    }
    
    .footer-socials .social-link svg {
        width: 26px; /* Slightly larger on mobile for easier tapping */
        height: 26px;
    }
}

/* Lightbox button drop shadows (match .project-card_title) */
.lightbox-prev,
.lightbox-next,
.lightbox-close,
.lightbox-prev svg,
.lightbox-next svg,
.lightbox-close svg {
    filter: drop-shadow(0 1px 5px rgba(0,0,0,0.6));
    text-shadow: 0 1px 5px rgba(0,0,0,0.6);
    transition: filter 0.2s ease, text-shadow 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover,
.lightbox-prev:hover svg,
.lightbox-next:hover svg,
.lightbox-close:hover svg {
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6));
}
