/* --- Reset & Base Typography --- */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-retro);
  font-size: 16px;
  color: var(--text-primary);
  height: 100vh;
  width: 100%;
  background-color: var(--bg-primary);
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

/* --- Typography Styles --- */
p, span, div {
  font-family: var(--font-modern);
}

/* --- Main Layout --- */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: calc(100vh - var(--footer-h));
  padding-top: var(--header-h);
  box-sizing: border-box;
  flex: 1;
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow: hidden;
}

.center-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* --- Eye Section --- */
.eye-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vh, var(--space-40)) 0 clamp(6px, 1.5vh, var(--space-40));
  width: 100%;
}

.eye-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 6%;
}

.eye-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.eye-link:hover .eye,
.eye-link:focus-visible .eye,
.eye-link.is-activated .eye {
  border-color: var(--color-highlight);
  box-shadow: 0 0 14px var(--color-highlight);
}

.eye-link:hover .iris,
.eye-link:focus-visible .iris,
.eye-link.is-activated .iris {
  border-color: var(--color-highlight);
  box-shadow: 0 0 10px var(--color-highlight);
}

.eye-link:hover .iris::after,
.eye-link:focus-visible .iris::after,
.eye-link.is-activated .iris::after {
  background-color: var(--color-highlight);
  box-shadow: 0 0 10px var(--color-highlight);
}

.eye-link:focus-visible {
  outline: none;
}

.eye-label {
  font-family: var(--font-retro);
  font-size: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-highlight);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.eye-link:hover .eye-label,
.eye-link:focus-visible .eye-label,
.eye-link.is-activated .eye-label {
  opacity: 1;
  transform: translateY(0);
}

.eye {
  width: 150px;
  height: 90px;
  border-color: var(--text-primary);
  border-width: 3px;
  border-style: solid;
  border-radius: 60%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eyeFloat 3s ease-in-out infinite;
}

@keyframes eyeFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(2deg); }
}

.iris {
  width: 40px;
  height: 40px;
  background-color: var(--bg-primary);
  border-color: var(--text-primary);
  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
  position: relative;
  pointer-events: none;
}

.iris::after {
  content: '';
  width: 16px;
  height: 16px;
  background-color: var(--text-primary);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Box Grid --- */
.box-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-24);
  width: 100%;
  max-width: 2400px;
  margin: auto;
  padding: clamp(8px, 2vh, var(--space-20)) clamp(12px, 3vw, var(--space-32));
}

/* --- Clickable Box --- */
.clickable-box {
  width: 100%;
  height: 100%;
  min-height: clamp(120px, 18vh, 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);
  border-radius: var(--space-8);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.clickable-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: background-color 0.3s ease;
  pointer-events: none;
  border-radius: var(--space-8);
}

.clickable-box:hover {
  transform: scale(1.05);
}

.clickable-box:active {
  transform: scale(1);
}

.clickable-box:active::after {
  background-color: transparent;
}

.clickable-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: var(--space-8);
}

/* --- Box Ambient Wave Motion --- */
#box1 .ambient-float,
#box2 .ambient-float,
#box3 .ambient-float,
#box4 .ambient-float {
  transform-origin: center;
  will-change: transform;
}

#box1 .ambient-float {
  animation: waveFloatA 5.4s ease-in-out infinite;
  animation-delay: 0s;
}

#box2 .ambient-float {
  animation: waveFloatB 5.8s ease-in-out infinite;
  animation-delay: 0.28s;
}

#box3 .ambient-float {
  animation: waveFloatC 6.2s ease-in-out infinite;
  animation-delay: 0.56s;
}

#box4 .ambient-float {
  animation: waveFloatD 6.6s ease-in-out infinite;
  animation-delay: 0.84s;
}

@keyframes waveFloatA {
  0%, 100% { transform: translateY(1px) rotate(-0.8deg); }
  50%      { transform: translateY(-18px) rotate(1.8deg); }
}

@keyframes waveFloatB {
  0%, 100% { transform: translateY(-1px) rotate(0.1deg); }
  50%      { transform: translateY(-14px) rotate(1.4deg); }
}

@keyframes waveFloatC {
  0%, 100% { transform: translateY(2px) rotate(0.7deg); }
  50%      { transform: translateY(-20px) rotate(-1.6deg); }
}

@keyframes waveFloatD {
  0%, 100% { transform: translateY(2px) rotate(-0.5deg); }
  50%      { transform: translateY(-13px) rotate(1.2deg); }
}

@media (prefers-reduced-motion: reduce) {
  #box1 .ambient-float,
  #box2 .ambient-float,
  #box3 .ambient-float,
  #box4 .ambient-float {
    animation: none;
  }
}

/* --- Responsive --- */
/* --- Desktop & Large Screens --- */

@media (min-width: 1200px) {
  .box-grid {
    gap: var(--space-64);
  }
  .clickable-box {
    aspect-ratio: 2/3;
  }
}

/* --- Tablet --- */

@media (max-width: 1000px) {
  header { padding: 0 var(--space-16); }

  .site-title { font-size: 24px; }
  .top-nav a { font-size: 20px; }
  .top-dot { font-size: 20px; }

  .eye { width: 120px; height: 78px; }
  .iris { width: 30px; height: 30px; }
  .iris::after { width: 12px; height: 12px; }

  .box-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-20);
    padding: clamp(8px, 2vh, var(--space-16)) var(--space-20);
  }

  .site-footer {
    padding: var(--space-8) var(--space-20);
    flex-direction: column;
    gap: var(--space-8);
    text-align: center;
  }

  .eye-section {
  padding: clamp(20px, 3vh, var(--space-32)) 0 clamp(16px, 2.5vh, var(--space-32));
  }

  .top-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: 100%;
  height: var(--top-nav-h);
  justify-content: center;
  transform: none;
  z-index: 999;
  padding: 4px 0;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(45, 37, 26, 0.8) 0%,
    rgba(45, 37, 26, 0.0) 100%
  );
}


/* --- Mobile --- */

@media (max-width: 600px) {

  :root {
    --top-nav-h: 36px;
    /* fallback values if missing elsewhere */
    --footer-h: 60px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
  }
  
  html,
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    margin: 0;
    padding: 0;
  }

  header {
    background: linear-gradient(
      180deg,
      rgba(45, 37, 26, 0.95) 0%,
      rgba(45, 37, 26, 0) 100%
    );

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    padding: 0 var(--space-16);
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
  }

.top-nav {
  justify-content: center;
  padding: 0; 
  margin: 0;               
  gap: 8px;                 
}

.top-nav a {
  font-size: 18px;  
  letter-spacing: 1px;  
  padding: 6px 6px;    
  white-space: nowrap;  
  display: inline-block;   
}

  .site-title {
    font-size: 24px;
  }

  .lang-btn {
    display: inline-flex;
    align-items: center;
  }

  .separator {
    font-size: 15px;
  }

  .back-link {
    font-size: 20px;
    padding: 2px 8px;
    min-width: 36px;
    text-align: center;
  }

  main {
    min-height: calc(100vh - var(--footer-h));

    /* keep the same top gap as the other pages */
    padding-top: var(--header-h);
    overflow: visible;
    box-sizing: border-box;
  }

  .eye-section {
    padding: clamp(120px, 12vh, 80px) 0 clamp(30px, 4vh, 50px) 0;
  }

  .clickable-box {
    min-height: 50vh; /* was clamp(120px, 18vh, 180px) – now at least half the viewport */
  }

  .box-grid {
    display: grid;
    grid-template-columns: 1fr;

    gap: var(--space-32);
    padding: var(--space-24) var(--space-16);

    box-sizing: border-box;
  }

  .box-grid {
    gap: var(--space-32);
    padding: var(--space-24) var(--space-16);
  } 

  .footer-nav {
    gap: var(--space-12);
  }

  .footer-nav a {
    font-size: 18px;
  }
}


}