:root{
    /* Typography */
    --font-body: "Poppins", sans-serif;
    --font-size-100: 14px;
    --font-size-200: 16px;
  
    /* Colors */
    --color-bg: #fffffb;
    --color-surface: #ECDABF;
    --color-text: #077A7A;
    --color-muted: #000000;
    --color-brand: #a5dfdf;
    --color-accent: #ECDABF;
    --color-border: hsla(0,0%,100%,0.08);
  
    /* Radius & spacing */
    --radius-lg: 16px;
    --radius-md: 12px;
  
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
  
    --container: 1120px;
  
    /* Motion */
    --ease: cubic-bezier(.2,.8,.2,1);
    --speed-1: 150ms;
    --speed-2: 240ms;
  }
  
  *{ box-sizing:border-box; }
  html{ scroll-behavior:smooth; }
  body{
    margin:0; font-family: var(--font-body); font-size:var(--font-size-200);
    line-height:1.6; background:var(--color-bg);
    -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
  }
  a{ color:inherit; text-decoration:none; }
  img{ display:block; max-width:100%; height:auto; }
  
  .container{ max-width:var(--container); margin-inline:auto; padding-inline:var(--space-4); }
  .section{ padding-block:clamp(56px, 8vw, 120px); }
  
  .section-head{
    display:flex; align-items:end; justify-content:space-between;
    gap:var(--space-4); margin-bottom:var(--space-6);
  }
  

  .muted{ color:var(--color-muted); }
  
  .visually-hidden{
    position:absolute; height:1px; width:1px; overflow:hidden;
    clip:rect(1px,1px,1px,1px); white-space:nowrap; border:0; padding:0; margin:-1px;
  }
  body, p, a, li, input, textarea {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    color: #333;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    color: var(--color-text);
  }
  h1 {
    font-size: clamp(2.5rem, 1rem + 1vw, 4rem);
    line-height: 1;
  }
  .project-title,
  .section-head h2 {
    font-weight: 600;
  }
  
  .project-desc {
    font-weight: 400;
    color: #333;
  }
  
  .nav a, .btn {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
  }
  /* HEADER / NAV */
  .header{
    position:sticky; top:0; z-index:40;
    background:color-mix(in oklab, var(--color-bg), transparent 10%);
    backdrop-filter:saturate(160%) blur(10px);
    border-bottom:1px solid var(--color-border);
  }
  .header-inner{
    display:flex; align-items:center; justify-content:space-between;
    gap:var(--space-4); min-height:64px;
  }
  .nav{ display:flex; gap:24px; list-style:none; padding:0; margin:0; }
  .nav a{ color:var(--color-muted); transition:color var(--speed-1) var(--ease); }
  .nav a:hover, .nav a:focus{ color:var(--color-text); }
  
  /* mobile nav */
  #nav-toggle:checked ~ nav > .nav { opacity:1; transform:none; pointer-events:auto; }
  .nav-btn{ display:none; border:1px solid var(--color-border); border-radius:var(--radius-md); padding:8px 10px; }
  .nav-btn .bars{ display:inline-block; width:22px; height:2px; background:var(--color-text); position:relative; }
  .nav-btn .bars::before, .nav-btn .bars::after{
    content:""; position:absolute; left:0; right:0; height:2px; background:var(--color-text);
  }
  .nav-btn .bars::before{ top:-6px; } .nav-btn .bars::after{ top:6px; }

  #nav-toggle {
    display: none;
  }
  @media (max-width:800px){
    .nav{
      position:fixed; inset:72px 16px auto 16px; flex-direction:column; gap:8px;
      background:var(--color-surface); border:1px solid var(--color-border);
      border-radius:var(--radius-md); padding:12px;
      opacity:0; transform:translateY(-8px); pointer-events:none;
      transition:opacity var(--speed-2) var(--ease), transform var(--speed-2) var(--ease);
    }
    .nav-btn{ display:inline-flex; align-items:center; gap:8px; }
    #nav-toggle:checked ~ .nav{ opacity:1; transform:none; pointer-events:auto; }
  }
  
  /* HERO */
  .hero{
    display:grid; grid-template-columns:1.1fr 0.9fr;
    gap:clamp(24px, 4vw, 56px); align-items:center;
  }
  .hero .eyebrow{
    text-transform:uppercase; letter-spacing:.14em; color:var(--color-muted);
    font-size:var(--font-size-100); margin:0 0 var(--space-2);
  }
  .hero p{ color:var(--color-muted); margin:0 0 var(--space-5); }
  .hero .cta{ display:flex; flex-wrap:wrap; gap:12px; }
  
  .btn{
    display:inline-flex; align-items:center; justify-content:center;
    padding:12px 16px; border-radius:var(--radius-md); border:1px solid transparent; font-weight:600;
    transition:transform var(--speed-2) var(--ease), filter var(--speed-2) var(--ease), border-color var(--speed-2) var(--ease);
  }
  .btn-primary{ background:linear-gradient(135deg, var(--color-brand), var(--color-accent)); color:#0a0a0a; }
  .btn-primary:hover, .btn-primary:focus-visible{ filter:brightness(1.05); transform:translateY(-1px); }
  .btn-ghost{ border-color:var(--color-border); color:var(--color-text); background:transparent; }
  .btn-ghost:hover, .btn-ghost:focus-visible{ border-color:hsla(0,0%,100%,0.24); transform:translateY(-1px); }
  
  @media (max-width:980px){ .hero{ grid-template-columns:1fr; } }

  /* PROJECTS */
  .projects{
    display:grid; grid-template-columns:repeat(2, 1fr);
    gap:24px; align-items:stretch;
  }
  @media (max-width:768px){ .projects{ grid-template-columns:1fr; } }
  
  .project-card{
    display:flex; flex-direction:column; justify-content:space-between;
    border-radius:var(--radius-lg); border:1px solid var(--color-border);
    background:var(--color-surface); overflow:hidden; height:100%;
  }
  .project-link{ position:relative; display:block; }
  .project-media{ aspect-ratio:16/9; background:#0f1116; position:relative; overflow:hidden; }
  .project-media img{ width:100%; height:100%; object-fit:cover; display:block; }
  
  .project-overlay{
    position:absolute; inset:0; background:rgba(0,0,0,0);
    display:grid; place-items:end start; padding:var(--space-4);
    transition:background var(--speed-2) var(--ease), opacity var(--speed-2) var(--ease);
  }
  .project-title{
    margin:0; font-family: var(--font-body);
    opacity:0; transform:translateY(6px);
    transition:transform var(--speed-2) var(--ease), opacity var(--speed-2) var(--ease);
  }
  .project-link:hover .project-overlay,
  .project-link:focus-visible .project-overlay{ background:rgba(0,0,0,0.32); }
  .project-link:hover .project-title,
  .project-link:focus-visible .project-title{ opacity:1; transform:translateY(0); color: #fff;}
  
  .project-body{ font-size: 0.9rem; padding:15px 15px 1px; }
  .project-meta{ color:var(--color-muted); font-family: var(--font-body); margin:1px 0 8px; font-weight: bold; }
  .project-desc{ font-size: 0.90rem;
    line-height: 1.4;
    color: #333; }

  /* === FOOTER ==== */
  .footer{ border-top:1px solid var(--color-border); padding-block:24px; color:var(--color-muted); }
  .footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
  
  /* ==== UTILITIES ==== */

  .brand-with-back {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px; /* size of the arrow */
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
  }
  
  .back-arrow:hover {
    color: var(--color-brand);
    transform: translateX(-4px);
  }
  
  /* ===== Project navigation footer ===== */
.project-nav {
  border-top: 1px solid var(--color-border);
  padding-block: 48px;
  background: var(--color-bg);
}

.project-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.project-prev,
.project-next {
  color: var(--color-text);
  text-decoration: none;
  font-size: 30px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.project-prev:hover,
.project-next:hover {
  color: var(--color-brand);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .project-nav-inner {
    flex-direction: column;
    gap: 16px;
  }
}

.hotspot-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* invisible clickable boxes */
.hotspot {
  position: absolute;
  display: block;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 10;   
}

/* --- popup image --- */
.popup {
  display: none;             
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8); 
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-inner {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.popup-inner img {
  width: 700px;
  height: auto;
  border-radius: 10px;
}
.popup .close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 32px;
  cursor: pointer;
}
.section-hero,
.hero {
  padding-block: 10px;  
}

.hero img {
  max-width: 350px;    
}

/* --- COMPACT CARDS --- */
.project-card--compact {
  min-width: 260px;
  max-width: 350px;
}
.project-card--compact .project-media img {
  height: 160px;
  object-fit: cover;
  width: 100%;
  display: block;
  border-radius: 8px;
}
.project-card--compact .project-meta { font-size: .85rem; opacity: .8; }
.project-card--compact .project-desc { font-size: .9rem; line-height: 1.2; }

/* CAROUSEL LAYOUT */
.shelf-wrap {
  position: relative;
  display: flex;
  align-items: center;    
  gap: 1rem;              
}

.shelf {
  flex: 1;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: .25rem 0 .75rem;
  scroll-snap-type: x mandatory;
  scroll-padding: 1rem;
  -webkit-overflow-scrolling: touch;
}
.shelf::-webkit-scrollbar { height: 8px; }
.shelf::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 4px; }
.shelf--compact .project-card { scroll-snap-align: start; }

/* arrow buttons */
.shelf-btn {
  position: static; 
  top: auto;
  left: auto;
  right: auto;
  transform: none;

  flex-shrink: 0;
  height: 42px;
  width: 42px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.shelf-btn:hover:not(:disabled) {
  background: #111;
  color: #fff;
  border-color: #111;
}
.shelf-btn:disabled { opacity: .4; cursor: default; }

@media (max-width: 640px) {
  .shelf-wrap { gap: .5rem; }
  .shelf-btn { height: 36px; width: 36px; }
}

.project-card--compact .project-body {
  padding: 4px 10px 6px;
  background: var(--color-surface); 
}

.project-card--compact .project-media {
  background: none; 
  height: auto; 
}
.project-card--compact .project-title {
  font-size: 0.9rem;
}

/* IMAGE SWAP ON HOVER */
.project-media .img-default,
.project-media .img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
  border-radius: inherit; 
}

.project-media .img-default { opacity: 1; }
.project-media .img-hover  { opacity: 0; }


.project-link:hover .project-media .img-default,
.project-link:focus-visible .project-media .img-default {
  opacity: 0;
}
.project-link:hover .project-media .img-hover,
.project-link:focus-visible .project-media .img-hover {
  opacity: 1;
}

.project-link:hover .project-media .img-hover,
.project-link:focus-visible .project-media .img-hover {
  transform: scale(1.01);
}

.project-link:hover .project-overlay,
.project-link:focus-visible .project-overlay {
  background: rgba(0,0,0,0.18);
}

.shelf .project-card.project-card--compact .project-link:hover .project-overlay,
.shelf .project-card.project-card--compact .project-link:focus-visible .project-overlay {
  background: rgba(0,0,0,0.12);
}

.project-link:hover .project-title,
.project-link:focus-visible .project-title { color:#fff; }
.project-card--compact .project-title { font-size: .6rem; }
.project-card--compact .project-link:hover .project-title,
.project-card--compact .project-link:focus-visible .project-title { font-size: .8rem; }

/* Make sure hotspots sit on top */
.hotspot {
  position: absolute;
  z-index: 3;
}
.overlay-video {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
  object-fit: contain; 
  top: auto;
  left: auto;
  width: auto;
  height: auto;
}
.hotspot-wrap {
  display: block;
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;      
}