
@font-face {
    font-family: 'Satoshi';
    src: url('../assets/fonts/satochi/Satoshi-Variable.woff2') format('woff2');
    font-weight: 500; /* Fallback for variable fonts */
    font-style: normal;
    font-display: swap;
  }
  
  @font-face {
    font-family: 'Satoshi';
    src: url('../assets/fonts/satochi/Satoshi-VariableItalic.woff') format('woff2');
    font-weight: 500; /* Fallback for variable fonts */
    font-style: italic;
    font-display: swap;
  }



html, body {
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #7c7c7c;
}
canvas {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
}

#introCanvas {
  transition: opacity 2s ease;
}

@media (max-width: 768px) {
  #introCanvas {
    transition: opacity 1.2s ease; /* shorter fade-out for small screens */
  }
}



.project-info {
    position: absolute;
    top: 50%;
    left: 40vw;
    width: 50vw;
    transform: translateY(-50%);
    opacity: 0;
    
    pointer-events: none;
}


.project-image {
    /* aspect-ratio: 1.41 / 1; */
    height: 0;
    padding-bottom: 70.92%; /* 1 / 1.41 = 0.7092 */
    width: 100%;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
    
.project-title {
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 1.8rem;
    color: #444;
}
.project-description {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    padding-top: 0.5rem;
    color: #444;
}

.project-date {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #444;
    text-align: right;
    margin-top: -1.6rem;
}

.grid-mode #infoContainer {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  padding: 6rem 1rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  box-sizing: border-box;
}
.grid-mode .project-info {
    width: 100% !important;
    box-sizing: border-box;
    padding: 1.5rem; /* Increased padding for better margins */
    margin-bottom: 2rem;
    opacity: 1 !important;
    pointer-events: auto;
    position: relative !important;
}

/* 2 columns at ≥ 800px for stability on tablets */
@media (min-width: 800px) {
  .grid-mode .project-info {
    width: 50% !important;
  }
}

/* 3 columns at ≥ 1024px */
@media (min-width: 1024px) {
  .grid-mode .project-info {
    width: 33.33% !important;
  }
}

/* 4 columns at ≥ 1280px */
@media (min-width: 1280px) {
  .grid-mode .project-info {
    width: 25% !important;
  }
}



.project-more {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #888888;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
  }
  

.grid-mode .project-more {
    display: none;
}

.grid-mode .project-title {
    font-family: 'Satoshi', sans-serif;
    font-weight: 450;
    color: #444;
    font-size: 1.1rem;
    margin: 0;
  }
  
  .grid-mode .project-description {
    font-family: 'Satoshi', sans-serif;
    font-weight: 300;
    color: #444;
    font-size: 0.9rem;
    padding: 0;
    margin-top: 0.4rem;
  }

  .grid-mode .project-date {
    font-family: 'Satoshi', sans-serif;
    text-align: left;
    margin-top: 0;
    font-size: 0.75rem;
  }  

  .grid-mode .project-image:hover {
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12); 
  }

  #gridToggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #888888;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
  }
  
  #gridIcon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    pointer-events: none;
  }
  

/* PAGES */

.project-page .back-button {
position: fixed;
top: 20px;
left: 20px;
width: 50px;
height: 50px;
background: #888888;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: none;
cursor: pointer;
text-decoration: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
z-index: 10;
margin: 8px;
}

.project-page .project {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
}

.project-page .hero {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
  }
  
  .project-page .hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    pointer-events: none;
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 50%,
      rgba(0, 0, 0, 0.15) 70%,
      rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  

.project-page .project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.project-page .project video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow:
    inset 0 0 0 1px #ccc,               
    0 2px 8px rgba(0, 0, 0, 0.08);      
    cursor: pointer;
    box-sizing: border-box;
}

.project-page .project .splideVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 0px;
    box-shadow: none;
    cursor: pointer;
    box-sizing: border-box;
}

.project-page .project h1 {
font-family: 'Satoshi', sans-serif;
font-weight: 500;
font-size: 1.8rem;
color: #444;
margin: 0;
}

.project-page .project p {
font-family: 'Satoshi', sans-serif;
font-weight: 400;
font-size: 1.1rem;
color: #444;
margin: 0;
}

.project-page .text-description {
font-family: 'Satoshi', sans-serif;
font-weight: 300;
font-size: 0.9rem;
line-height: 1.4;
color: #7c7c7c;
text-align: left;
padding: 1rem;
transition: opacity 0.3s ease;
}

#orbitHints {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100;
  font-family: 'Satoshi', sans-serif;
  opacity: 0;                 
  pointer-events: none;       
  transition: opacity 0.5s ease;
}

#orbitHints.visible {
  opacity: 1;
}

.pulse-hint {
  position: absolute;
  font-size: 1.5rem;
  color: #888;
  animation: pulse 1.5s ease-in-out infinite;
  text-align: center;
  display: block;
}

.hint-text {
  font-size: 1rem;
  color: #444;
}

.grid-mode .pulse-hint {
  display: none !important;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}   

@media (max-width: 768px) {
  #gridToggle {
    display: none !important;
  }

  .project-page, .project-page body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    margin: 0;
    padding: 0;
    padding-bottom: 3rem !important;
  }

  .parent {
    display: flex !important;
    flex-direction: column;
    /* gap: 1.8rem !important; */
    padding: 0;
    height: auto !important;
  }

  .parent > * {
    margin-bottom: 1.8rem;
  }

  .hero {
    margin: 0;
    padding: 0;
  }

  .hero img {
    width: 100vw;
    height: 25vh !important;
    object-fit: cover;
    border-radius: 0 !important;
    display: block;
    box-shadow: none !important;
    border: none !important;
  }

  .back-button {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    top: 8px;
    left: 8px;
    z-index: 50 !important;
  }

  .project-page .project h1 {
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #444;
    margin: 0;
    }
    
    .project-page .project p {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #444;
    margin: 0;
    }
    
    .project-page .text-description {
    font-family: 'Satoshi', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #7c7c7c;
    text-align: left;
    padding: 1rem;
    transition: opacity 0.3s ease;
    }
    
}

/* PORTRAIT ORBIT POSITIONING */
@media (max-width: 800px) and (orientation: portrait) {
    .project-info {
        left: 5vw !important;
        width: 90vw !important;
        top: 65vh !important;
        transform: translateY(0) !important;
        text-align: center;
    }
    .project-title { font-size: 1.5rem; }
    .project-description { font-size: 1rem; }
    .project-date {
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* ROTATION OVERLAY (v13) */
#rotate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f7f7f7;
    z-index: 20000;
    display: none; /* Default hidden */
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    text-align: center;
    font-family: 'Satoshi', sans-serif;
    color: #444;
}

#rotate-overlay .phone-icon {
    width: 60px;
    height: 100px;
    border: 3px solid #888;
    border-radius: 10px;
    margin-bottom: 24px;
    position: relative;
    -webkit-animation: rotatePhone 2s ease-in-out infinite;
    animation: rotatePhone 2s ease-in-out infinite;
}

#rotate-overlay .phone-icon:after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    margin-left: -5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #888;
}

@-webkit-keyframes rotatePhone {
    0%, 20% { -webkit-transform: rotate(0deg); }
    80%, 100% { -webkit-transform: rotate(90deg); }
}

@keyframes rotatePhone {
    0%, 20% { transform: rotate(0deg); }
    80%, 100% { transform: rotate(90deg); }
}

@media (orientation: portrait) {
    #rotate-overlay {
        display: -webkit-flex !important;
        display: flex !important;
    }
}