@font-face {
  font-family: 'NeueMachina';
  src: url('../assets/fonts/NeueMachina-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: #000;
  color: #fff;
  font-family: 'NeueMachina', sans-serif;
  overflow-x: hidden;
}


/* ===============================
   TICKER
=============================== */

.ticker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: #e53935;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.ticker.hide {
  transform: translateY(-100%);
}

.track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  align-items: center;
}

.track img {
  height: 32px;
  display: block;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===============================
   PAGE CONTAINER
=============================== */

.portfolio-container {
  padding: 140px 40px 60px; /* guaranteed safe padding */
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

/* ===============================
   SCALE STAGE (ADAPTIVE CORE)
=============================== */

.scale-stage {
  width: 100%;
  max-width: 1400px;
  transform-origin: top center;
}

/* ===============================
   HEADER
=============================== */

.portfolio-header {
  margin-bottom: 60px;
}

.portfolio-title {
  font-size: 70px;
  font-weight: 400;
  margin-bottom: 20px;
}

.portfolio-subtitle {
  font-size: 30px;
  font-weight: 200;
  max-width: 1200px;
  line-height: 1.3;
}

/* ===============================
   GRID
=============================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap:0px;
  justify-items: center;
  width: 100%;
}

.portfolio-box {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #1a1a1a;
  overflow: hidden;
}

.portfolio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===============================
   FOOTER COPY
=============================== */

.footer-copy {
  margin-top: 80px;
  padding: 40px 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
}

/* ===============================
   RESPONSIVE TYPOGRAPHY
=============================== */

@media (max-width: 1024px) {
  .portfolio-title {
    font-size: 50px;
  }

  .portfolio-subtitle {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    padding: 120px 20px 40px;
  }

  .portfolio-title {
    font-size: 36px;
  }

  .portfolio-subtitle {
    font-size: 18px;
  }

  .portfolio-header {
    margin-bottom: 40px;
  }

  .footer-copy {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .portfolio-container {
    padding: 100px 15px 30px;
  }

  .portfolio-title {
    font-size: 28px;
  }

  .portfolio-subtitle {
    font-size: 14px;
  }
}

/* =====================================================
   PAGE LOADER (CENTERED + FRAME ANIMATION)
===================================================== */

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;

  opacity: 1;
  transition: opacity 0.35s ease;
}

/* Frame container */
.loader-frames {
  width: 120px;
  height: 120px;

  display: block;               /* 🔑 ensures box exists */
  flex-shrink: 0;               /* 🔑 prevents flex collapse */

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  animation: loaderFrames 1.2s steps(1) infinite;
}

/* =====================================================
   FRAME SEQUENCE
===================================================== */

@keyframes loaderFrames {
  0%   { background-image: url("../assets/loader/akbar1.png"); }
  16%  { background-image: url("../assets/loader/akbar2.png"); }
  32%  { background-image: url("../assets/loader/akbar3.png"); }
  48%  { background-image: url("../assets/loader/akbar5.png"); }
  64%  { background-image: url("../assets/loader/akbar4.png"); }
  80%  { background-image: url("../assets/loader/akbar6.png"); }
  100% { background-image: url("../assets/loader/akbar1.png"); }
}

/* =====================================================
   VISIBILITY STATES
===================================================== */

body.loading .layout,
body.loading .side-nav,
body.loading .monitor,
body.loading .ticker {
  opacity: 0;
  pointer-events: none;
}

body.loaded .layout,
body.loaded .side-nav,
body.loaded .monitor,
body.loaded .ticker {
  opacity: 1;
  transition: opacity 0.4s ease;
}

body.loaded #page-loader {
  opacity: 0;
  pointer-events: none;
}

/* =====================================================
   PAGE HIDE / SHOW STATES
===================================================== */

/* Hide content while loading */
body.loading .layout,
body.loading .side-nav,
body.loading .monitor,
body.loading .ticker {
  opacity: 0;
  pointer-events: none;
}

/* Reveal content */
body.loaded .layout,
body.loaded .side-nav,
body.loaded .monitor,
body.loaded .ticker {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Fade loader out once loaded */
body.loaded #page-loader {
  opacity: 0;
  pointer-events: none;
}