/* ============================================
   COMPONENT STYLES — Minimalist Grayscale
   No borders, no gradients, no color accents
   ============================================ */

/* === GLOBAL === */
html, body {
  overflow: hidden;
}

body {
  font-family: var(--font-mono);
  font-size: var(--ts-base);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ─────────────────────────────────────────────
   THEME TOGGLE — small circle, top-right
   ───────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-lg);
  z-index: 100;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--text-muted);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.4s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--text-primary);
  transform: scale(1.3);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text-secondary);
  outline-offset: 4px;
}

/* === ZONE BASE === */
.zone {
  padding: var(--sp-lg);
  background: transparent;
}

/* ─────────────────────────────────────────────
   GREEN → NAME ZONE (no color, just typography)
   ───────────────────────────────────────────── */
.name-title {
  font-family: var(--font-display);
  font-size: var(--ts-display);
  line-height: 0.85;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
  font-weight: 400;
}

/* ─────────────────────────────────────────────
   YELLOW → INFO PANEL
   ───────────────────────────────────────────── */
.info-label {
  display: block;
  font-size: var(--ts-xs);
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--sp-2xs);
}

.info-clock {
  font-family: var(--font-display);
  font-size: var(--ts-clock);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--sp-xs);
  font-weight: 400;
}

.info-clock-separator {
  opacity: 0.5;
}

.info-description {
  font-size: var(--ts-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-md);
  font-weight: 300;
}

.info-meta {
  display: flex;
  gap: var(--sp-md);
  font-size: var(--ts-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
  font-weight: 300;
}

.info-location {
  font-size: var(--ts-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.8;
  font-weight: 400;
}

.info-role {
  font-size: calc(var(--ts-xs) * 1.25);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.8;
  font-weight: 800;
}

/* ─────────────────────────────────────────────
   RED → NAVIGATION BUTTONS
   ───────────────────────────────────────────── */
.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}

.nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--sp-xs) var(--sp-sm);
  font-size: var(--ts-sm);
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--ease-base);
}

.nav-btn:hover,
.nav-btn:focus-visible {
  color: var(--text-primary);
  outline: none;
}

.nav-btn.active {
  color: var(--text-primary);
}

/* ─────────────────────────────────────────────
   BLUE → SOCIAL LINKS
   ───────────────────────────────────────────── */
.social-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.social-link {
  display: block;
  padding: var(--sp-2xs) var(--sp-sm);
  font-size: var(--ts-sm);
  font-weight: 400;
  color: var(--text-muted);
  text-align: right;
  transition: color var(--ease-base);
  letter-spacing: 0.04em;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--text-primary);
  outline: none;
}

/* ─────────────────────────────────────────────
   PURPLE → MAIN 3D CONTENT
   ───────────────────────────────────────────── */
.zone--main {
  cursor: grab;
}

.zone--main:active {
  cursor: grabbing;
}

/* ─────────────────────────────────────────────
   ITEM BUTTONS — centered 2-column grid
   ───────────────────────────────────────────── */
.item-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xs) var(--sp-xl);
  max-width: 700px;
  width: 90%;
  z-index: 10;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* Grouped layout override */
.item-buttons--grouped {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* IE/Edge */
}
.item-buttons--grouped::-webkit-scrollbar {
  display: none;                    /* Chrome/Safari */
}

.item-group-title {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding-bottom: var(--sp-xs);
  margin-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--c-border);
  opacity: 0.7;
  font-weight: 400;
}

.item-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xs) var(--sp-xl);
}

.item-btn {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 400;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-xs) var(--sp-sm);
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: left;
  line-height: 1.5;
  transition: color var(--ease-base);
  opacity: 0;
  animation: item-fade-up 0.35s ease forwards;
}

.item-btn:hover,
.item-btn:focus-visible {
  color: var(--text-primary);
  outline: none;
}

/* ─ Tag badges (item grid + project page) ─ */
.item-btn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.item-tag {
  font-size: 0.56rem;
  font-family: var(--font-mono);
  color: var(--c-bg);
  background-color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: none;
  border-radius: 2px;
  opacity: 0.75;
  line-height: 1.4;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: var(--sp-xs);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--c-bg);
  background-color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: none;
  border-radius: 2px;
  opacity: 0.75;
}

@keyframes item-fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────
   PROJECT PAGE — full item view overlay
   ───────────────────────────────────────────── */
.project-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-lg) var(--sp-2xl) var(--sp-lg);
  z-index: 10;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* ── Header: Title + Summary ── */
.project-header {
  text-align: center;
  max-width: 600px;
}

.project-title {
  font-family: var(--font-mono);
  font-size: var(--ts-lg);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-xs);
  line-height: 1.3;
}

.project-summary {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ── Nodes: 3-column interactive row ── */
.project-nodes {
  display: flex;
  gap: var(--sp-xl);
  justify-content: center;
  align-items: flex-start;
  max-width: 750px;
  width: 100%;
  margin-top: auto;
  padding-top: 12%;
}

.project-node {
  flex: 1;
  text-align: center;
  padding: var(--sp-sm) var(--sp-xs);
  cursor: pointer;
  transition: color var(--ease-base);
  opacity: 0;
  animation: item-fade-up 0.4s ease forwards;
}

.project-node:hover {
  color: var(--text-primary);
}

.project-node-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2xs);
  opacity: 0.5;
}

.project-node-title {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--ts-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2xs);
  transition: color var(--ease-base);
}

.project-node.active .project-node-title {
  color: var(--text-primary);
}

.project-node-desc {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.project-node-quickinfo {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  padding-top: var(--sp-xs);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
  margin-top: 0;
}

.project-node.active .project-node-quickinfo {
  max-height: 80px;
  opacity: 1;
  margin-top: var(--sp-xs);
}

/* ── Description: below nodes ── */
.project-description {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 300;
  color: var(--text-secondary);
  text-align: center;
  max-width: 550px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  margin-top: var(--sp-lg);
}

/* ── Actions: Repo + Back ── */
.project-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
  margin-top: auto;
}

.project-repo {
  font-family: var(--font-mono);
  font-size: var(--ts-sm);
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--ease-base);
}

.project-repo:hover {
  color: var(--text-secondary);
}

.project-back {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 400;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.06em;
  padding: var(--sp-2xs) var(--sp-sm);
  transition: color var(--ease-base);
}

.project-back:hover {
  color: var(--text-primary);
}