/* ===== PROJECTS DIMENSION =====
 * Second dimension view with AI/coding video background.
 * Hidden by default, revealed after loading transition.
 */

.projects-dim {
  position: fixed;
  inset: 0;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--bg-deep);
  overflow-y: auto;
  overflow-x: hidden;
}

.projects-dim.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Video canvas (same pattern as corridor) */
#projects-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Vignette overlay */
.projects-dim__overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgb(var(--bg-deep-rgb) / 0.4) 0%,
    rgb(var(--bg-deep-rgb) / 0.75) 55%,
    rgb(var(--bg-deep-rgb) / 0.95) 100%
  );
}

/* Grid texture */
.projects-dim__grid {
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.25;
}

/* Scanlines */
.projects-dim__scanlines {
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0.3;
}

/* HUD frame */
.projects-dim__hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

/* Bracket override: see panel.css bracket system (.projects-dim__hud .dim-bracket) */

/* Text glow via .glow-text--subtle class in HTML (effects.css) */
.projects-hud__logo {
  position: absolute;
  top: 20px;
  left: var(--hud-text-offset);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-hex);
}

.projects-hud__label {
  position: absolute;
  top: 20px;
  right: var(--hud-text-offset);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(var(--accent) / 0.6);
}

.projects-hud__label .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-hex);
  box-shadow: 0 0 6px rgb(var(--accent) / 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Content layer — scrollable */
.projects-dim__content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

/* ===== SECTION HEADER ===== */
.proj-header {
  width: 100%;
  margin-bottom: 64px;
}

.proj-header__label {
  display: block;
  font-family: var(--font-headline);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgb(var(--accent) / 0.4);
  margin-bottom: 8px;
}

.proj-header__rule {
  position: relative;
  width: 100%;
  height: 1px;
  background: rgb(var(--accent) / 0.2);
}

.proj-header__rule-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 1px;
  background: var(--accent-hex);
  box-shadow: 0 0 10px var(--accent-hex);
}

/* Diamond base (background + rotate) from effects.css */
.proj-header__diamond {
  position: absolute;
  top: -3px;
  left: 200px;
  width: 7px;
  height: 7px;
}

/* ===== PROJECT CARDS ===== */
.proj-card {
  width: 100%;
}

/* Glass effect from .glass-panel class in HTML; only layout props here */
.proj-card__inner {
  position: relative;
  padding: 32px;
}

.proj-card__layout {
  display: flex;
  gap: 40px;
  align-items: center;
}

/* Reversed layout */
.proj-card--reverse .proj-card__layout {
  flex-direction: row-reverse;
}

/* ===== IMAGE COLUMN ===== */
.proj-card__image-col {
  flex: 0 0 280px;
}

.proj-card__image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-deep);
  border: 1px solid rgb(var(--accent) / 0.15);
  padding: 6px;
  overflow: hidden;
}

.proj-card__image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.1);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.proj-card:hover .proj-card__image-frame img {
  filter: brightness(0.9) contrast(1.05);
  transform: scale(1.03);
}

.proj-card__image-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 30%,
    rgb(var(--bg-deep-rgb) / 0.5) 100%
  );
}

/* ===== CONTENT COLUMN ===== */
.proj-card__content-col {
  flex: 1;
  min-width: 0;
}

.proj-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.proj-card__sys-label {
  font-family: var(--font-headline);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(var(--accent) / 0.5);
}

.proj-card__title {
  font-family: var(--font-headline);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
}

.proj-card__desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--on-surface-variant);
  line-height: 1.7;
  margin: 0 0 20px 0;
  max-width: 480px;
}

/* Status badge */
.proj-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  border: 1px solid var(--accent-30);
}

.proj-card__status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-hex);
  box-shadow: 0 0 6px var(--accent-hex);
  animation: pulse-dot 2s ease-in-out infinite;
}

.proj-card__status-text {
  font-family: var(--font-headline);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hex);
}

/* Tags */
.proj-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* Metrics grid */
.proj-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--accent-10);
  padding-top: 20px;
}

.proj-card__metric--full {
  grid-column: 1 / -1;
}

.proj-card__metric-value {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.proj-card__metric-value--accent {
  color: var(--accent-hex);
}

/* Metrics list variant */
.proj-card__metrics--list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proj-card__metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proj-card__metric-value--sm {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white);
}

.proj-card__metric-value--sm.proj-card__metric-value--accent {
  color: var(--accent-hex);
}

/* Gauge */
.proj-card__gauge {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-card__gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.proj-card__gauge-track {
  color: rgb(var(--accent) / 0.1);
}

.proj-card__gauge-fill {
  color: var(--accent-hex);
}

.proj-card__gauge-value {
  position: absolute;
  font-family: var(--font-headline);
  font-size: 8px;
  font-weight: 700;
  color: var(--accent-hex);
}

/* Chip icon */
.proj-card__chip-icon {
  color: var(--accent-hex);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Terminal spacing within card */
.proj-card .terminal {
  margin-top: 20px;
}

/* ===== VERTICAL CONNECTORS ===== */
.proj-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 80px;
  position: relative;
}

.proj-connector__line {
  width: 1px;
  height: 100%;
  background-image: linear-gradient(to bottom, var(--accent-hex) 50%, transparent 50%);
  background-size: 1px 12px;
  background-repeat: repeat-y;
}

.proj-connector__diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 8px rgb(var(--accent) / 0.5);
}

/* ===== FOOTER ===== */
.proj-footer {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.proj-footer__rule {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.proj-footer__rule-line {
  flex: 1;
  height: 1px;
  background: rgb(var(--accent) / 0.2);
}

.proj-footer__diamond {
  width: 8px;
  height: 8px;
  margin: 0 16px;
  flex-shrink: 0;
}

.proj-footer__label {
  font-family: var(--font-headline);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-hex);
}

.proj-footer__timestamp {
  font-family: var(--font-headline);
  font-size: 7px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(var(--accent) / 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .proj-card__layout,
  .proj-card--reverse .proj-card__layout {
    flex-direction: column;
  }

  .proj-card__image-col {
    flex: none;
    width: 100%;
  }

  .proj-card__inner {
    padding: 24px;
  }

  .projects-dim__content {
    padding: 80px 20px 120px;
  }
}

/* Return button */
.projects-dim__return {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
}

.projects-dim__return button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 40px;
  background: rgb(var(--bg-deep-rgb) / 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-30);
  color: var(--accent-hex);
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.projects-dim__return button:hover,
.projects-dim__return button:focus-visible {
  box-shadow:
    0 0 20px rgb(var(--accent) / 0.15),
    inset 0 0 20px rgb(var(--accent) / 0.05);
}

.projects-dim__return button:hover {
  background: rgb(var(--accent) / 0.08);
  border-color: var(--accent-60);
}

.projects-dim__return button:focus-visible {
  outline: 2px solid var(--accent-hex);
  outline-offset: 4px;
}

/* Corner accents: see .btn-bracketed in effects.css */
