:root {
  --bg-color: #111;
  --glass-bg: rgba(80, 80, 80, 0.4);
  --text-color: #f0f0f0;
}

[data-theme="light"] {
  --bg-color: #fefdfb;
  --glass-bg: rgba(240, 240, 240, 0.45);
  --text-color: #222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow: hidden;
  position: relative;
}

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  filter: grayscale(100%) blur(60px);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bg-video.hidden {
  opacity: 0 !important;
}

.background-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  filter: blur(40px) brightness(1.1) saturate(1.2);
  opacity: 0;
  transform: scale(1); /* ✅ Default scale */
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease; /* ✅ Enables zoom animation */
  z-index: 1;
  pointer-events: none; /* ✅ So it doesn't interfere with mouse */
}

.flicker-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: rgba(255,255,255,0.02);
  mix-blend-mode: overlay;
  animation: flicker 0.2s infinite;
  z-index: 2;
}

@keyframes flicker {
  0%, 100% { opacity: 0.015; }
  50% { opacity: 0.03; }
}

.custom-cursor {
  position: fixed;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  backdrop-filter: blur(1px) saturate(2.2) brightness(1.6) contrast(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(2.2) brightness(1.6) contrast(1.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 0 1.5rem rgba(255, 255, 255, 0.3),
    0 0 2rem rgba(255, 255, 255, 0.1),
    0 0 0.5rem rgba(255, 255, 255, 0.05);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.custom-cursor::before {
  content: '';
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.15), transparent 70%);
  transform: rotate(45deg);
  opacity: 0.5;
  pointer-events: none;
}

.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(0.8);
}

.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(1.6);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.2),
    inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.custom-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  opacity: 0;
}

.custom-cursor.clicking::after {
  transform: translate(-50%, -50%) scale(2.5);
  opacity: 1;
}



body.hide-cursor .custom-cursor {
  display: none;
}

.click-pulse {
  position: fixed;
  width: 8rem;
  height: 8rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  filter: blur(40px);
  opacity: 1;
  animation: pulse-fade 0.7s ease-out forwards;
  pointer-events: none;
  z-index: 9998;
}

@keyframes pulse-fade {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(6);
    opacity: 0;
  }
}

.top-bar {
  position: fixed;
  top: 2.5rem;
  left: 5rem;
  display: flex;
  gap: 0.625rem;
  z-index: 1000;
  align-items: center;
}

.name-box,
.icon-button,
.about-title {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 0.375rem 1rem;
  font-size: 14px;
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  height: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.name-box:hover,
.icon-button:hover,
.about-title:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.2),
              0 0 20px 8px rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.icon-button img {
  height: 22px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.columns-container {
  height: 100vh;
  width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  padding-top: 3.75rem;
  position: relative;
  z-index: 3;
}

.columns {
  display: flex;
  align-items: flex-start;
  gap: 5rem;
  padding: 2.5rem 0 5rem 5rem;
  flex-shrink: 0;
}

.column {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  position: relative;
  z-index: 3;
  overflow: visible;
}


.info-block h2 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 2px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-block p {
  font-size: 11px;
  line-height: 1.2;
  margin: 0;
  opacity: 0.7;
}


.info-block:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.2),
              0 0 20px 8px rgba(255, 255, 255, 0.1);
  z-index: 999;
}

.info-block h2 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
  text-align: center;
  word-break: break-word;
}

.info-block p {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
  text-align: center;
}


.scrubber-wrapper {
  width: 6rem;
  height: 65vh;
  overflow: visible;
  position: absolute;
  margin-top: 15rem;
  margin-bottom: 3.75rem;
  border-radius: 1.5rem;
  background: #000;
  transition: box-shadow 0.3s ease;
  z-index: 1;
}

.scrubber-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: top 0.05s ease;
}

.column.hovered .scrubber-line {
  opacity: 0.6;
}

.scrubber {
  width: 100%;
  height: 2000px;
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  transition: transform 0.05s linear;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 1.5rem;
}

.sidebar {
  width: 33vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 7.5rem;
}

.about-title {
  margin-bottom: 20px;
  padding: 8px 20px;
  font-size: 15px;
  align-self: flex-start;
}

.sidebar p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hovered .scrubber-wrapper {
  box-shadow: none;
}
.info-stack {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: flex-start; /* ✅ keeps text left-aligned */
  margin-bottom: 0.625rem;
  margin-top: 5rem;
  margin-left: 4px;
  width: max-content;      /* ✅ ensures the stack grows with the widest info-block */
}

.info-block {
  display: inline-block;

  padding: 0.4rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;

  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;

  max-width: 8rem;         /* ✅ Controls wrapping */
  width: fit-content;      /* ✅ Let content define size up to max */
  text-align: left;

  position: relative;
  z-index: 2;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.text-strip-group {
  display: flex;
  flex-direction: column;
  min-width: 6rem;
  max-width: 6rem;
  align-items: center;
  position: relative; /* Needed for absolutely positioned children */
  overflow: visible;
  flex-shrink: 0;
}

.info-block:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 12px 4px rgba(255, 255, 255, 0.2),
    0 0 20px 8px rgba(255, 255, 255, 0.1);
}

.info-block.year {
  font-size: 12px;
  font-weight: 400;
  opacity: 1;
}

.info-block.title {
  font-weight: 500;
}

.columns {
  display: flex;
  align-items: flex-start;
  gap: 7.5rem;
  padding: 2.5rem 0 5rem 7.5rem;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .columns {
    gap:2.5rem; /* Original tighter gap */
    padding: 2rem 1rem; /* Optional: tighter side padding */
  }
}

@media (max-width: 1024px) {
  .columns {
    gap: 2.5rem !important;
    padding: 2rem 1rem !important;
  }
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.625rem;
  font-size: 12px;
}

.timeline-table th,
.timeline-table td {
  text-align: left;
  padding: 0.375rem 0.625rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-table th {
  font-weight: 600;
  opacity: 0.9;
}

.timeline-table td {
  opacity: 0.8;
}



/* Responsive Sidebar Logic */
@media (max-width: 1800px) {
  .sidebar {
    display: none !important;
  }

  .mobile-sidebar {
    display: block;
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-sidebar.hidden {
    display: none;
  }

  .about-toggle {
    display: inline-flex;
    cursor: pointer;
  }
}

@media (min-width: 1801px) {
  .mobile-sidebar,
  .about-toggle {
    display: none !important;
  }
}



/* Snap scroll + arrows */
.columns-container {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.column {
  scroll-snap-align: start;
}

/* Navigation arrows */
.scroll-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  user-select: none;
  border-radius: 0.5rem;
  backdrop-filter: blur(8px);
}

.scroll-arrow.left {
  left: 0.5rem;
}

.scroll-arrow.right {
  right: 0.5rem;
}

/* Responsive filmstrip scaling */
@media (max-width: 1200px) {
  .columns {
    gap: 3rem;
  }

  .scrubber-wrapper {
    width: 6rem;
    height: 55vh;
  }
}

@media (max-width: 768px) {
  .columns {
    gap: 1.5rem;
    padding-left: 1.5rem;
  }

  .scrubber-wrapper {
    width: 25vw;
    height: 50vh;
  }

  .column {
    min-width: 48vw;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .filmstrip {
    transform: scale(0.85);
    transform-origin: top center;
  }

  .filmstrip-column {
    width: clamp(140px, 22vw, 180px);
  }
}

@media (max-width: 768px) {
  .top-bar {
    left: 2rem; /* or try 2rem for a bit more breathing room */
    right: 1rem;
    justify-content: flex-start;
    gap: 0.5rem;
  }
}

.glass-arrow {
  position: fixed;
  width: 1.5rem;
  height: 2rem;
  top: 50%;
  bottom: auto;
  transform: none;
  z-index: 900;
  cursor: pointer;
  pointer-events: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.05),
    inset 0 0 6px rgba(255, 255, 255, 0.07);
}


.left-arrow {
  left: 1rem;
}

.right-arrow {
  right: 1rem;
}

/* Mobile-specific positioning */
body.mobile-device .glass-arrow {
  top: 7rem;
  bottom: auto;
  transform: none;
}

body.mobile-device .left-arrow {
  left: 10%;
}

body.mobile-device .right-arrow {
  right: 10%;
}


.hidden {
  display: none !important;
}

/* Further downscale for phones */
@media (max-width: 520px) {
  .columns {
    gap: 1rem;
    padding-left: 1rem;
  }

  .scrubber-wrapper {
    width: 25vw;
    height: 45vh;
  }

  .column {
    min-width: 42vw;
  }
}

@media (max-width: 1800px) {
  .sidebar {
    display: none !important;
  }

 .mobile-sidebar {
  display: block;
  position: fixed;
  top: 6.5rem;
  left: 5rem; /* aligns with your top bar buttons */
  right: 2rem;
  width: auto;
  max-width: 95vw;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem;
  z-index: 1001;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 2rem rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .mobile-sidebar {
    left: 2rem;
    right: 2rem;
  }
}
  .mobile-sidebar.hidden {
    display: none;
  }

  .about-toggle {
    display: inline-flex;
    cursor: pointer;
  }
}

@media (min-width: 2000px) {
  .columns {
    gap: 8rem;
    padding-left: 8rem;
  }

  .scrubber-wrapper {
    width: 6.5rem;
  }

  .info-block {
    font-size: 14px;
    max-width: 9.5rem;
  }

  .info-stack {
    margin-top: 5.5rem;
    margin-left: 0.85rem;
  }

  .top-bar {
    top: 3.25rem;
    left: 6rem;
  }

  .sidebar {
    padding: 9rem 7rem;
  }

  .custom-cursor {
    width: 1.15rem;
    height: 1.15rem;
  }

  .click-pulse {
    width: 9rem;
    height: 9rem;
  }

  .scrubber {
    height: 200vh;
  }
}

@media (min-width: 3000px) {
  .columns {
    gap: 10rem;
    padding-left: 10rem;
  }

  .scrubber-wrapper {
    width: 7.5rem;
  }

  .info-block {
    font-size: 15.5px;
    max-width: 10.5rem;
  }

  .info-stack {
    margin-top: 6.5rem;
    margin-left: 1rem;
  }

  .top-bar {
    top: 3.75rem;
    left: 7.5rem;
  }

  .sidebar {
    padding: 10.5rem 8.5rem;
  }

  .custom-cursor {
    width: 1.35rem;
    height: 1.35rem;
  }

  .click-pulse {
    width: 10.5rem;
    height: 10.5rem;
  }

  .scrubber {
    height: 300vh;
  }
}


body.mobile-device {
  cursor: default !important;
}

body.mobile-device .cursor,
body.mobile-device .cursor-halo {
  display: none !important;
  pointer-events: none !important;
}

.arrow-icon {
  width: 1.5rem;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.15));
}

/* Hide arrows when on mobile */
body.mobile-device .scroll-arrow {
  display: none !important;
}