/* ============================================
   MONOCHROME AMBER CRT TERMINAL — JeffDraws
   ============================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --amber: #ffb000;
  --amber-bright: #ffd080;
  --amber-dim: #805800;
  --amber-glow: rgba(255, 176, 0, 0.6);
  --amber-glow-strong: rgba(255, 176, 0, 0.9);
  --amber-faint: rgba(255, 176, 0, 0.08);
  --screen-bg: #1a1000;
  --bezel: #2a2a2a;
  --bezel-light: #3a3a3a;
  --bezel-dark: #1a1a1a;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Fira Code', monospace;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

::selection {
  background: var(--amber);
  color: #000;
}

/* --- Monitor Shell --- */
.monitor {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.monitor-bezel {
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  background: linear-gradient(
    180deg,
    #3d3d3a 0%,
    #35352f 8%,
    #2e2e28 50%,
    #282822 92%,
    #222220 100%
  );
  border-radius: 24px;
  padding: 30px 32px 16px;
  display: flex;
  flex-direction: column;
  box-shadow:
    /* Outer edge highlight */
    0 -1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.4),
    /* Plastic rim layers */
    0 0 0 1px #1a1a18,
    0 0 0 3px #2a2a26,
    0 0 0 4px #151513,
    /* Drop shadow */
    0 12px 50px rgba(0, 0, 0, 0.9),
    0 4px 15px rgba(0, 0, 0, 0.6),
    /* Subtle ambient light from screen */
    0 -5px 40px rgba(255, 176, 0, 0.03);
  position: relative;
}

/* Plastic texture overlay */
.monitor-bezel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(0, 0, 0, 0.02) 1px,
      rgba(0, 0, 0, 0.02) 2px
    );
  pointer-events: none;
  z-index: 0;
}

/* Top bezel highlight edge */
.monitor-bezel::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 80%,
    transparent
  );
  border-radius: 24px;
  z-index: 1;
}

.bezel-label {
  color: #555;
  font-family: 'Fira Code', monospace;
  font-size: 0.6rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 10px;
  position: relative;
  z-index: 1;
}

.bezel-model {
  color: #444;
  font-size: 0.5rem;
}

/* --- Bezel Bottom --- */
.bezel-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px 4px;
  position: relative;
  z-index: 1;
}

.bezel-bottom-left {
  flex: 1;
}

.bezel-badge {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 0.55rem;
  letter-spacing: 3px;
  color: #666;
  background: linear-gradient(180deg, #444 0%, #333 100%);
  padding: 3px 10px;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.3);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.bezel-bottom-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.bezel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-knob {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a4a44 0%, #2a2a26 60%, #3a3a34 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.3);
  border: 1px solid #1a1a18;
  position: relative;
}

/* Knob indicator line */
.control-knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 4px;
  background: #555;
  border-radius: 1px;
}

.control-button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a34 0%, #252522 100%);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.3);
  border: 1px solid #1a1a18;
  display: flex;
  align-items: center;
  justify-content: center;
}

.power-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow:
    0 0 4px var(--amber-glow-strong),
    0 0 10px var(--amber-glow),
    0 0 25px rgba(255, 176, 0, 0.3),
    0 0 50px rgba(255, 176, 0, 0.1);
  animation: led-pulse 3s ease-in-out infinite;
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Ventilation slots */
.bezel-vents {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
  position: relative;
  z-index: 1;
}

.bezel-vents span {
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 1px;
  background: linear-gradient(180deg, #1a1a18 0%, #222220 100%);
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

/* --- Screen --- */
.screen-wrapper {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #000;
  /* Inset groove around screen */
  border: 2px solid #0a0a08;
  box-shadow:
    /* Deep inset to make screen recessed */
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(255, 176, 0, 0.07),
    /* Inner bevel */
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4),
    /* Screen glow onto bezel */
    0 0 30px rgba(255, 176, 0, 0.06),
    0 0 60px rgba(255, 176, 0, 0.03),
    /* Groove shadow */
    0 0 0 1px #1a1a16,
    0 0 0 3px rgba(0, 0, 0, 0.3);
}

.screen {
  width: 100%;
  height: 100%;
  background: var(--screen-bg);
  position: relative;
  overflow: hidden;
}

/* --- CRT Effects --- */

/* Scanlines */
.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
}

/* Vignette */
.crt-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

/* Subtle flicker */
.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
  animation: flicker 0.15s infinite;
  opacity: 0;
}

@keyframes flicker {
  0% { opacity: 0; }
  5% { opacity: 0.015; background: rgba(255, 176, 0, 0.02); }
  10% { opacity: 0; }
  92% { opacity: 0; }
  93% { opacity: 0.01; background: rgba(255, 176, 0, 0.01); }
  100% { opacity: 0; }
}

/* Phosphor glow on screen */
.screen::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 14px;
  z-index: 0;
  box-shadow: inset 0 0 120px rgba(255, 176, 0, 0.06);
  pointer-events: none;
}

/* Ambient screen glow cast onto bezel */
.screen::after {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  right: -40px;
  bottom: -40px;
  z-index: -1;
  border-radius: 30px;
  background: radial-gradient(ellipse at center, rgba(255, 176, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Terminal Content --- */
.terminal {
  position: relative;
  z-index: 5;
  padding: 2rem 2.5rem;
  height: 100%;
  overflow-y: auto;
  color: var(--amber);
  font-size: 0.9rem;
  line-height: 1.7;
  scrollbar-width: none;
}

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

/* --- Text Styles --- */
.prompt {
  color: var(--amber-bright);
  text-shadow:
    0 0 8px var(--amber-glow),
    0 0 20px rgba(255, 176, 0, 0.3);
}

.prompt-line {
  margin-bottom: 0.3rem;
  text-shadow:
    0 0 6px rgba(255, 176, 0, 0.3),
    0 0 15px rgba(255, 176, 0, 0.15);
}

.output {
  color: var(--amber);
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  text-shadow:
    0 0 5px rgba(255, 176, 0, 0.25),
    0 0 12px rgba(255, 176, 0, 0.1);
}

.bright {
  color: var(--amber-bright);
  text-shadow:
    0 0 8px var(--amber-glow),
    0 0 20px rgba(255, 176, 0, 0.4);
}

.dim {
  color: var(--amber-dim);
}

a {
  color: var(--amber-bright);
  text-decoration: none;
  text-shadow:
    0 0 8px var(--amber-glow),
    0 0 20px rgba(255, 176, 0, 0.3);
  transition: text-shadow 0.2s;
}

a:hover {
  text-shadow:
    0 0 10px var(--amber-glow-strong),
    0 0 25px var(--amber-glow),
    0 0 50px rgba(255, 176, 0, 0.3);
}

/* --- Boot Sequence --- */
.boot-sequence p {
  color: var(--amber-dim);
  text-shadow: 0 0 4px rgba(255, 176, 0, 0.15);
}

.boot-bar {
  color: var(--amber);
  letter-spacing: 1px;
}

.boot-sequence.done {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

/* --- ASCII Title --- */
.ascii-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--amber-bright);
  text-shadow:
    0 0 10px var(--amber-glow),
    0 0 30px rgba(255, 176, 0, 0.4),
    0 0 60px rgba(255, 176, 0, 0.15);
  margin: 0;
}

.title-output {
  padding-left: 0;
}

.subtitle-output {
  padding-left: 1rem;
  font-size: 1rem;
  margin-bottom: 0;
}

/* --- Cursor --- */
.cursor {
  color: var(--amber-bright);
  animation: blink 0.8s step-end infinite;
  text-shadow:
    0 0 8px var(--amber-glow-strong),
    0 0 20px var(--amber-glow),
    0 0 40px rgba(255, 176, 0, 0.2);
}

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

/* --- Pre blocks (tools + projects) --- */
pre.output {
  font-family: 'Fira Code', monospace;
  margin: 0;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

/* --- Tools listing --- */
.tools-list span {
  color: var(--amber);
}

/* --- Project Listing --- */
.project-listing {
  font-size: 0.82rem;
}

.dir-marker {
  color: var(--amber-dim);
}

.project-name {
  color: var(--amber-bright);
  font-weight: 600;
  text-shadow:
    0 0 8px var(--amber-glow),
    0 0 20px rgba(255, 176, 0, 0.3);
}

.project-cards {
  display: none;
}

/* --- Hidden state --- */
.hidden {
  display: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .monitor {
    height: 100dvh;
    padding: 0.4rem;
  }

  .monitor-bezel {
    height: 100%;
    padding: 14px 12px 10px;
    border-radius: 16px;
  }

  .bezel-badge {
    font-size: 0.45rem;
  }

  .control-knob {
    width: 11px;
    height: 11px;
  }

  .control-button {
    width: 16px;
    height: 16px;
  }

  .terminal {
    padding: 1rem 0.85rem;
    font-size: 0.84rem;
    line-height: 1.6;
  }

  .ascii-title {
    display: none;
  }

  .title-output::before {
    content: "JEFFDRAWS";
    display: block;
    color: var(--amber-bright);
    font-weight: 700;
    font-size: 2.1rem;
    letter-spacing: 1px;
    text-shadow:
      0 0 10px var(--amber-glow),
      0 0 30px rgba(255, 176, 0, 0.4),
      0 0 60px rgba(255, 176, 0, 0.15);
  }

  .output {
    padding-left: 0.55rem;
  }

  .project-listing {
    display: none;
  }

  .project-cards {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    padding-left: 0.55rem;
  }

  .project-card {
    border: 1px solid rgba(255, 176, 0, 0.28);
    background: rgba(255, 176, 0, 0.04);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    box-shadow: inset 0 0 14px rgba(255, 176, 0, 0.05);
  }

  .project-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
  }

  .project-card p {
    margin: 0;
    color: var(--amber);
    text-shadow:
      0 0 5px rgba(255, 176, 0, 0.25),
      0 0 12px rgba(255, 176, 0, 0.1);
  }

  .project-card p + p {
    margin-top: 0.35rem;
  }

  .bezel-label {
    font-size: 0.55rem;
  }
}

@media (max-width: 480px) {
  .monitor {
    padding: 0.25rem;
  }

  .monitor-bezel {
    padding: 10px 9px 8px;
  }

  .terminal {
    padding: 0.85rem 0.7rem;
    font-size: 0.8rem;
  }

  .title-output::before {
    font-size: 1.85rem;
  }
}
