/* ============================================================
   VIDEOTEX DISPLAY SYSTEM
   Authentic Minitel: blocky bitmap font, cyan phosphor glow,
   40-column grid, Videotex 8-color palette
   ============================================================ */

:root {
  /* Authentic Minitel phosphor colors (cyan-dominant CRT) */
  --vtx-black:   #020a0a;
  --vtx-red:     #ff3030;
  --vtx-green:   #30ff30;
  --vtx-yellow:  #ffff30;
  --vtx-blue:    #3030ff;
  --vtx-magenta: #ff30ff;
  --vtx-cyan:    #30ffff;
  --vtx-white:   #e8ffff;

  /* Phosphor glow intensity */
  --glow-strength: 3px;
}

/* Authentic Minitel bitmap font */
@font-face {
  font-family: 'Minitel';
  src: url('../assets/fonts/Minitel.woff2') format('woff2'),
       url('../assets/fonts/Minitel.ttf') format('truetype');
  font-display: block;
  font-weight: 400;
  font-style: normal;
}

/* VT323 fallback */
@font-face {
  font-family: 'VT323';
  src: url('../assets/fonts/VT323.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* ============================================================
   MAIN DISPLAY
   ============================================================ */

.videotex-display {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 2.5% 3.5%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;

  font-family: 'Minitel', 'VT323', 'Courier New', monospace;
  font-size: clamp(12px, 1.8vw, 17px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--vtx-cyan);
  background: var(--vtx-black);

  /* Crisp pixel rendering for bitmap font */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  text-rendering: optimizeSpeed;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.videotex-display::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   PHOSPHOR GLOW (overrides crt-effects.css text-shadow)
   Authentic CRT phosphor bleed
   ============================================================ */

.videotex-display,
.videotex-display * {
  text-shadow:
    0 0 var(--glow-strength) currentColor,
    0 0 1px currentColor;
}

/* ============================================================
   STATUS BAR
   ============================================================ */

.vtx-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 0 2px 0;
  margin-bottom: 2px;
  color: var(--vtx-white);
  border-bottom: 1px solid rgba(48, 255, 255, 0.25);
  font-size: 0.85em;
  white-space: nowrap;
}

.vtx-status-bar .service-name {
  color: var(--vtx-white);
}

.vtx-status-bar .page-indicator {
  color: var(--vtx-cyan);
}

.vtx-status-bar .connection {
  color: var(--vtx-green);
}

.vtx-status-bar .connection::before {
  content: '\25CF ';
  font-size: 0.7em;
  vertical-align: middle;
}

/* ============================================================
   COLOR CLASSES
   ============================================================ */

.fg-black   { color: var(--vtx-black); }
.fg-red     { color: var(--vtx-red); }
.fg-green   { color: var(--vtx-green); }
.fg-yellow  { color: var(--vtx-yellow); }
.fg-blue    { color: var(--vtx-blue); }
.fg-magenta { color: var(--vtx-magenta); }
.fg-cyan    { color: var(--vtx-cyan); }
.fg-white   { color: var(--vtx-white); }

.bg-black   { background-color: var(--vtx-black); }
.bg-red     { background-color: var(--vtx-red); color: var(--vtx-black); }
.bg-green   { background-color: var(--vtx-green); color: var(--vtx-black); }
.bg-yellow  { background-color: var(--vtx-yellow); color: var(--vtx-black); }
.bg-blue    { background-color: var(--vtx-blue); color: var(--vtx-white); }
.bg-magenta { background-color: var(--vtx-magenta); color: var(--vtx-black); }
.bg-cyan    { background-color: var(--vtx-cyan); color: var(--vtx-black); }
.bg-white   { background-color: var(--vtx-white); color: var(--vtx-black); }

/* ============================================================
   TEXT EFFECTS
   ============================================================ */

.blink {
  animation: vtx-blink 1s step-start infinite;
}

@keyframes vtx-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.double-height {
  display: block;
  font-size: 1.5em;
  line-height: 1.1;
}

.inverse {
  background: var(--vtx-cyan);
  color: var(--vtx-black);
  padding: 0 2px;
}

.vtx-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vtx-dim {
  opacity: 0.45;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.vtx-rule {
  display: block;
  color: var(--vtx-cyan);
  opacity: 0.3;
  margin: 1px 0;
  user-select: none;
}

.vtx-rule-bright {
  display: block;
  color: var(--vtx-cyan);
  opacity: 0.6;
  margin: 1px 0;
  user-select: none;
}

.vtx-spacer {
  display: block;
  height: 0.25em;
}

/* ============================================================
   MENU ITEMS
   ============================================================ */

.vtx-menu-item {
  display: block;
  color: var(--vtx-cyan);
  text-decoration: none;
  padding: 2px 4px;
  margin: 1px 0;
  cursor: pointer;
  transition: none;
}

.vtx-menu-item:hover,
.vtx-menu-item:focus {
  background: var(--vtx-cyan);
  color: var(--vtx-black);
  outline: none;
  text-shadow: none;
}

.vtx-menu-item .num {
  color: var(--vtx-yellow);
}

.vtx-menu-item:hover .num,
.vtx-menu-item:focus .num {
  color: var(--vtx-black);
  text-shadow: none;
}

/* ============================================================
   HEADINGS
   ============================================================ */

.vtx-heading {
  display: block;
  color: var(--vtx-white);
  font-size: 1.8em;
  line-height: 1.1;
  margin: 2px 0;
}

.vtx-subheading {
  display: block;
  color: var(--vtx-yellow);
  margin: 2px 0;
}

/* ============================================================
   BANNER (ASCII art text)
   ============================================================ */

.vtx-banner {
  display: block;
  line-height: 1.0;
  margin: 4px 0;
  font-size: 0.9em;
}

/* ============================================================
   PROJECT ENTRIES
   ============================================================ */

.vtx-project {
  margin: 3px 0;
  padding: 2px 0 3px 0;
  border-bottom: 1px solid rgba(48, 255, 255, 0.12);
}

.vtx-project-title {
  display: block;
  color: var(--vtx-white);
}

.vtx-project-desc {
  display: block;
  color: var(--vtx-cyan);
}

.vtx-project-tech {
  display: block;
  color: var(--vtx-yellow);
  font-size: 0.9em;
}

/* ============================================================
   EXPERIENCE ENTRIES
   ============================================================ */

.vtx-experience {
  margin: 3px 0 2px 0;
}

.vtx-company {
  display: block;
  color: var(--vtx-white);
  font-size: 1.15em;
  line-height: 1.1;
}

.vtx-role {
  display: block;
  color: var(--vtx-yellow);
}

.vtx-dates {
  display: block;
  color: var(--vtx-cyan);
  font-size: 0.85em;
  opacity: 0.7;
}

/* ============================================================
   AWARDS
   ============================================================ */

.vtx-award {
  margin: 3px 0;
  padding: 2px 0 2px 8px;
  border-left: 2px solid var(--vtx-magenta);
}

.vtx-award-name {
  display: block;
  color: var(--vtx-white);
}

.vtx-award-year {
  display: block;
  color: var(--vtx-yellow);
  font-size: 0.85em;
}

/* ============================================================
   CONTACT
   ============================================================ */

.vtx-contact-item {
  margin: 4px 0;
}

.vtx-contact-label {
  display: block;
  color: var(--vtx-yellow);
}

.vtx-contact-value {
  display: block;
  color: var(--vtx-cyan);
  text-decoration: none;
}

.vtx-contact-value:hover {
  background: var(--vtx-cyan);
  color: var(--vtx-black);
  text-shadow: none;
}

/* ============================================================
   PROMPT & CURSOR
   ============================================================ */

.vtx-prompt {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px solid rgba(48, 255, 255, 0.2);
  color: var(--vtx-cyan);
}

.vtx-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: var(--vtx-cyan);
  box-shadow: 0 0 6px var(--vtx-cyan);
  animation: cursor-blink 1s step-start infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ============================================================
   BACK LINK
   ============================================================ */

.vtx-back-link {
  display: inline-block;
  margin-top: 3px;
  color: var(--vtx-cyan);
  cursor: pointer;
  text-decoration: none;
  padding: 2px 4px;
}

.vtx-back-link:hover {
  background: var(--vtx-cyan);
  color: var(--vtx-black);
  text-shadow: none;
}

/* ============================================================
   INFO BOXES (inverse video blocks, like real Minitel)
   ============================================================ */

.vtx-box {
  display: inline-block;
  background: var(--vtx-cyan);
  color: var(--vtx-black);
  padding: 2px 6px;
  text-shadow: none;
}

.vtx-box-magenta {
  background: var(--vtx-magenta);
}

.vtx-box-yellow {
  background: var(--vtx-yellow);
}

.vtx-box-white {
  background: var(--vtx-white);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; opacity: 1; }
  .vtx-cursor { animation: none; opacity: 1; }
}
