:root {
  --bg: #0b0b0d;
  --c1: #ff5470;
  --c2: #ffb400;
  --c3: #2dd4bf;
  --c4: #7c5cff;
  --ink: #0b0b0d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}

/* Fixed High-Visibility Logo Container */
.logo-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 99999;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}

.logo-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Extended wider than the screen to hide blank corners from skew */
.grid {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -10vw;
  right: -10vw;
  display: flex;
  gap: 4px;
  background: var(--bg);
  transform: skewX(-10deg);
}

.section {
  position: relative;
  overflow: hidden;
  display: flex;
  flex: 1;
  background: var(--bg);
  transition: flex 0.6s cubic-bezier(.7, 0, .3, 1), opacity 0.4s ease;
}

.section:nth-child(1) {
  --section-color: var(--c1);
}

.section:nth-child(2) {
  --section-color: var(--c2);
}

.section:nth-child(3) {
  --section-color: var(--c3);
}

.section:nth-child(4) {
  --section-color: var(--c4);
}

/* Collapse inactive sections */
.grid.focused .section:not(.active) {
  flex: 0 0 0% !important;
  opacity: 0;
  pointer-events: none;
}

/* Active section spans full viewport width */
.grid.focused .section.active {
  flex: 1 0 100%;
}

/* Colored bar holding wheel animation */
.section-visual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--section-color);
  position: relative;
  cursor: pointer;
  transition: width 0.6s cubic-bezier(.7, 0, .3, 1);
  flex-shrink: 0;
}

/* Active sliver width */
.section.active .section-visual {
  width: 25vw;
  cursor: default;
}

.section:not(.active) .section-visual:hover::after {
  content: "click to open";
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  pointer-events: none;
}

/* Updated for horizontal orientation */
.wheel-track {
  display: inline-block;
  white-space: pre;
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 2.2;
  will-change: transform;
}

.section:nth-child(1) .wheel-track {
  animation: wheelUp 40s linear infinite;
  font-size: clamp(13px, 1.3vw, 20px);
}

.section:nth-child(2) .wheel-track {
  animation: wheelDown 45s linear infinite;
  font-size: clamp(13px, 1.3vw, 20px);
}

.section:nth-child(3) .wheel-track {
  animation: wheelUp 42s linear infinite;
  font-size: clamp(13px, 1.3vw, 20px);
}

.section:nth-child(4) .wheel-track {
  animation: wheelDown 48s linear infinite;
  font-size: clamp(13px, 1.3vw, 20px);
}

@keyframes wheelUp {
  0% {
    transform: translateY(0%);
  }

  100% {
    transform: translateY(-50%);
  }
}

@keyframes wheelDown {
  0% {
    transform: translateY(-50%);
  }

  100% {
    transform: translateY(0%);
  }
}

.tag {
  position: absolute;
  top: 16px;
  left: 16px;
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.55;
  font-weight: 500;
}

/* Main content reveal container */
.content-wrapper {
  flex: 1;
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

.section.active .content-wrapper {
  opacity: 1;
}

.content-inner {
  width: 80vw;
  height: 100%;
  padding: 60px 40px;
  color: #f4f4f2;
  cursor: default;
  display: flex;
  flex-direction: column;
  transform: skewX(10deg);
}

.content-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.content-title {
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--section-color, #fff);
}

.exit-btn {
  background: none;
  border: 1px solid #f4f4f2;
  color: #f4f4f2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.exit-btn:hover {
  background: #f4f4f2;
  color: var(--bg);
}

.custom-text-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* Custom Entry Link Tag Style */
.entry-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  padding: 8px 14px;
  margin-top: 12px;
  border: 1px solid var(--section-color, #fff);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-link:hover {
  background: var(--section-color, #fff);
  color: var(--bg);
  box-shadow: 0 0 14px var(--section-color, #fff);
  transform: translateX(4px);
}

.entry-link::after {
  content: "↗";
  font-size: 1.1em;
  transition: transform 0.2s ease;
}

.entry-link:hover::after {
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .wheel-track {
    animation: none !important;
  }
}