/* ==========================================================================
   SHADOWEDVACA.COM — COMMAND CENTER
   Split-screen dark dashboard.
   Reference: reference/mockup-v3-reference.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg-deep:     #0a0c10;
  --bg-main:     #0d1117;
  --bg-terminal: #030806;

  --cyan:         #00d4ff;
  --amber:        #f0a030;
  --green-bright: #33ff33;
  --green-dim:    #1a9e1a;
  --green-faint:  #0d4f0d;

  --text-primary:   #c8cdd3;
  --text-secondary: #6b7280;

  --status-live: #2ecc71;
  --divider:     #1e2533;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;  /* Viewport scroll lock lives here, NOT on html/body */
}

.content-split {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. Ticker Bar
   -------------------------------------------------------------------------- */
.ticker-bar {
  height: 36px;
  background: linear-gradient(90deg, #111620 0%, #1a1520 50%, #111620 100%);
  border-bottom: 1px solid var(--divider);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: ticker-scroll 30s linear infinite;
  width: max-content;
}

.ticker-item {
  white-space: nowrap;
  padding: 0 3rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--amber);
  font-family: 'Share Tech Mono', monospace;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.dot-live { background: var(--status-live); box-shadow: 0 0 6px var(--status-live); }
.dot-soon { background: var(--amber);       box-shadow: 0 0 6px var(--amber); }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   5. Left: Main Stage (flex: 2, ≈ 2/3 of viewport)
   -------------------------------------------------------------------------- */
.main-stage {
  flex: 2;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.main-stage-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  padding-bottom: 10rem; /* space for sticky note */
  scrollbar-width: thin;
  scrollbar-color: #1e2533 transparent;
}

.main-stage-scroll::-webkit-scrollbar { width: 4px; }
.main-stage-scroll::-webkit-scrollbar-track { background: transparent; }
.main-stage-scroll::-webkit-scrollbar-thumb { background: #1e2533; border-radius: 2px; }

/* --------------------------------------------------------------------------
   6. Stage Views (individual project detail panels)
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stage-view { display: none; }
.stage-view.active { display: block; animation: fadeIn 0.3s ease; }

.featured-label {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.featured-title {
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.featured-tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 300;
}

/* --------------------------------------------------------------------------
   7. Meta tag row
   -------------------------------------------------------------------------- */
.featured-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.meta-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--divider);
  border-radius: 3px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.meta-tag.status-live     { border-color: var(--status-live); color: var(--status-live); }
.meta-tag.status-soon     { border-color: var(--amber);       color: var(--amber); }
.meta-tag.status-concept  { border-color: var(--cyan);        color: var(--cyan); opacity: 0.6; }
.meta-tag.status-archived { border-color: var(--green-faint); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   8. Media: video embed and screenshot placeholder
   -------------------------------------------------------------------------- */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--divider);
  margin-bottom: 1.25rem;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.screenshot-placeholder {
  background: var(--bg-main);
  border: 1px dashed var(--divider);
  border-radius: 6px;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.placeholder-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.3;
}

/* --------------------------------------------------------------------------
   9. Project logo image
   -------------------------------------------------------------------------- */
.project-logo-wrapper {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
}

.project-logo {
  max-height: 180px;
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

/* --------------------------------------------------------------------------
   10. Action buttons
   -------------------------------------------------------------------------- */
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.action-btn:hover { text-decoration: none; }

.action-btn.primary {
  background: var(--cyan);
  color: #000;
  border: 1px solid var(--cyan);
  font-weight: 600;
}

.action-btn.primary:hover {
  background: transparent;
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.action-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
}

.action-btn.secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   10. Description & feature list
   -------------------------------------------------------------------------- */
.featured-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 660px;
}

.featured-description p { margin-bottom: 0.75rem; }
.featured-description p:last-child { margin-bottom: 0; }

.feature-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 0.55rem 0 0.55rem 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-list li:last-child { border-bottom: none; }

.feature-list li::before {
  content: '\25b9'; /* ▹ */
  position: absolute;
  left: 0;
  color: var(--cyan);
}

/* --------------------------------------------------------------------------
   11. Sticky Note (contact card, positioned over bottom of main stage)
   -------------------------------------------------------------------------- */
.sticky-note {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;                               /* overridden by sticky.js */
  transform: translateX(-50%) rotate(-1.8deg); /* overridden by sticky.js */
  z-index: 10;
  width: 180px;
  height: 180px;
  padding: 1rem 1rem 0.8rem;
  background: linear-gradient(145deg, #f7e67a 0%, #f0d94e 55%, #e8cc3a 100%);
  border-radius: 2px;
  box-shadow:
    3px 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 -2px 6px rgba(0, 0, 0, 0.06);
  font-family: 'Caveat', cursive;
  color: #3a3520;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

/* Tape strip across top */
.sticky-note::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 12px;
  background: rgba(200, 200, 180, 0.45);
  border-radius: 1px;
}

.sticky-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2a2510;
  margin-bottom: 0.15rem;
}

.sticky-company {
  font-size: 1.05rem;
  color: #5a5030;
  margin-bottom: 0.35rem;
}

.sticky-detail {
  font-size: 0.95rem;
  color: #5a5030;
}

.sticky-booking {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.sticky-booking a {
  color: #3a6b8c;
  text-decoration: underline;
  text-decoration-color: rgba(58, 107, 140, 0.4);
}

.sticky-booking a:hover {
  color: #2a5070;
  text-decoration-color: #2a5070;
}

.sticky-tagline {
  font-size: 0.8rem;
  color: #7a7050;
  margin-top: 0.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.35rem;
}

.sticky-note a       { color: #3a6b8c; text-decoration: none; }
.sticky-note a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   12. Split Divider
   -------------------------------------------------------------------------- */
.split-divider {
  width: 1px;
  background: var(--divider);
  position: relative;
  flex-shrink: 0;
}

/* Cyan gradient glow on divider */
.split-divider::after {
  content: '';
  position: absolute;
  top: 20%; bottom: 20%;
  left: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--cyan), transparent);
  opacity: 0.3;
}

/* --------------------------------------------------------------------------
   13. Right: Terminal Sidebar (flex: 1, ≈ 1/3 of viewport)
   -------------------------------------------------------------------------- */
.terminal-sidebar {
  flex: 1;
  background: var(--bg-terminal);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

/* CRT scanline overlay */
.terminal-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Terminal inner glow */
.terminal-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px rgba(51, 255, 51, 0.03);
  pointer-events: none;
  z-index: 1;
}

.terminal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--green-bright);
  position: relative;
  z-index: 3;
  scrollbar-width: thin;
  scrollbar-color: var(--green-faint) transparent;
}

.terminal-content::-webkit-scrollbar { width: 4px; }
.terminal-content::-webkit-scrollbar-track { background: transparent; }
.terminal-content::-webkit-scrollbar-thumb { background: var(--green-faint); border-radius: 2px; }

.terminal-header {
  color: var(--green-dim);
  border-bottom: 1px solid var(--green-faint);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.terminal-prompt { color: var(--green-dim); margin-right: 0.5rem; }

.terminal-section { margin-bottom: 1.25rem; }

.terminal-section-label {
  color: var(--green-dim);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed var(--green-faint);
  padding-bottom: 0.25rem;
}

.terminal-project {
  padding: 0.45rem 0 0.45rem 0.35rem;
  border-bottom: 1px solid rgba(51, 255, 51, 0.06);
  cursor: pointer;
  transition: background 0.15s, border-left-color 0.15s;
  border-left: 2px solid transparent;
}

.terminal-project:last-child { border-bottom: none; }

.terminal-project:hover {
  background: rgba(51, 255, 51, 0.04);
  border-left-color: var(--green-bright);
}

.terminal-project.selected {
  background: rgba(51, 255, 51, 0.07);
  border-left-color: var(--green-bright);
}

.project-name {
  color: var(--green-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.status-char { font-size: 0.85rem; }

.status-char.live     { color: var(--green-bright); }
.status-char.progress { color: var(--amber); }
.status-char.concept  { color: var(--cyan); opacity: 0.5; }
.status-char.archived { color: var(--green-faint); }

.project-desc {
  color: var(--green-dim);
  font-size: 0.85rem;
  padding-left: 1.25rem;
  margin-top: 0.15rem;
}

/* Contact links (LinkedIn, Reddit, GitHub, etc.) */
.terminal-contact {
  padding: 0.45rem 0 0.45rem 0.35rem;
  border-bottom: 1px solid rgba(51, 255, 51, 0.06);
  border-left: 2px solid transparent;
  transition: background 0.15s, border-left-color 0.15s;
}

.terminal-contact:last-child { border-bottom: none; }

.terminal-contact:hover {
  background: rgba(51, 255, 51, 0.04);
  border-left-color: var(--green-bright);
}

.terminal-contact a {
  color: var(--green-bright);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.terminal-contact a:hover {
  text-decoration: none;
  color: var(--green-bright);
  opacity: 0.8;
}

/* Blinking cursor in the terminal prompt line */
.terminal-cursor {
  display: inline-block;
  width: 9px;
  height: 15px;
  background: var(--green-bright);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

/* --------------------------------------------------------------------------
   14. Bottom Status Bar
   -------------------------------------------------------------------------- */
.bottom-bar {
  height: 30px;
  background: #111620;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   15. Responsive — Tablet / Mobile (≤ 900px): stacked layout
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Kill the viewport-lock layout. Everything becomes plain block flow.
     html/body no longer have overflow:hidden (moved to .layout on desktop)
     so we just need to undo .layout's lock. */
  html, body { height: auto; }

  .layout          { display: block; height: auto; overflow: visible; }
  .content-split   { display: block; overflow: visible; }
  .main-stage      { display: block; overflow: visible; position: relative; }
  .main-stage-scroll { overflow: visible; padding: 1rem; padding-bottom: 2rem; }

  .split-divider { display: block; width: 100%; height: 1px; }

  .split-divider::after {
    top: 0; bottom: 0;
    left: 20%; right: 20%;
    width: auto; height: 1px;
    background: linear-gradient(to right, transparent, var(--cyan), transparent);
  }

  /* Terminal keeps its own internal flex + scroll — just cap its height */
  .terminal-sidebar { max-height: 60vh; }

  .featured-title { font-size: 2rem; }
  .sticky-note { display: none; }
}

/* --------------------------------------------------------------------------
   16. Responsive — Small mobile (≤ 500px): tighter sizing
   -------------------------------------------------------------------------- */
@media (max-width: 500px) {
  .main-stage-scroll { padding: 0.75rem; padding-bottom: 1.5rem; }
  .featured-title { font-size: 1.6rem; }
  .meta-tag { font-size: 0.85rem; padding: 0.25rem 0.6rem; }
  .action-btn { font-size: 0.9rem; padding: 0.45rem 0.85rem; }
}
