body {
  font-family: "JetBrains Mono", monospace;
  background: #000 url("overlay.png") no-repeat center center fixed;
  background-size: cover;
  color: #00ff41;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

body.loaded {
  animation: brightenRoom 2s ease-out forwards;
}

/* Watermark - only visible when CRT image is present */
body::before {
  content: "Elijah Deryaw's Portfolio, 2025";
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: #fff;
  opacity: 0.5;
  font-size: 12px;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 1024px) {
  body::before {
    display: none;
  }
}

/* Room dims then brightens from CRT glow */
@keyframes brightenRoom {
  0% {
    filter: brightness(0.3);
  }
  100% {
    filter: brightness(1);
  }
}

/* Scanlines overlay - using a wrapper div instead of ::after since ::before is used for watermark */
.scanlines-overlay {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
}

body.loaded .scanlines-overlay {
  animation: scanlines 8s linear 1.5s infinite, fadeInScanlines 1s 1.5s forwards;
}

@keyframes fadeInScanlines {
  to {
    opacity: 1;
  }
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(10px);
  }
}

.content-wrapper {
  position: fixed;
  top: 17%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 600px;
  height: 55%;
  z-index: 10;
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
}

body.loaded .content-wrapper {
  animation: crtPowerOn 1.5s ease-out forwards, textFlicker 0.15s 1.5s infinite alternate;
}

@media (max-width: 1024px) {
  .content-wrapper {
    max-width: 100% !important;
  }
}

/* CRT power on effect */
@keyframes crtPowerOn {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scaleY(0.001) scaleX(1);
    filter: brightness(3);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, 0) scaleY(0.8) scaleX(1);
  }
  30% {
    transform: translate(-50%, 0) scaleY(1) scaleX(1);
    filter: brightness(1.5);
  }
  50% {
    filter: brightness(1.2);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scaleY(1) scaleX(1);
    filter: brightness(1);
  }
}

.terminal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.95);
}

.terminal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for CRT screen */
.terminal-content::-webkit-scrollbar {
  width: 8px;
}
.terminal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
.terminal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 119, 0, 0.5);
  border-radius: 4px;
}
.terminal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 119, 0, 0.8);
}

/* CRT text glow and subtle flicker */
@keyframes textFlicker {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    opacity: 0.97;
  }
  50% {
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.6), 0 0 3px rgba(0, 255, 65, 0.4);
    opacity: 0.99;
  }
  100% {
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    opacity: 0.98;
  }
}

.status-active {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #00ff41;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

.status-archived {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #666;
  margin-right: 8px;
}

/* Center status indicators in project table */
.table-row .status-active,
.table-row .status-archived {
  display: block;
  margin: 0 auto;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.border-terminal {
  border: 1px solid #ff7700;
}

.text-amber {
  color: #ff7700;
  text-shadow: 0 0 5px rgba(255, 119, 0, 0.5);
}

.hover-amber:hover {
  color: #ffa500;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(255, 165, 0, 0.8);
}

.table-row {
  border-bottom: 1px solid #1a1f3a;
  padding: 12px 0;
}

.table-row:hover {
  background: rgba(255, 119, 0, 0.05);
}

.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #ff7700, transparent);
  margin: 24px 0;
}

/* Mobile/Tablet: Remove CRT overlay, show full content */
@media (max-width: 1024px) {
  body {
    background: #000;
    overflow-y: auto;
  }

  .scanlines-overlay {
    display: none;
  }

  .content-wrapper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 800px !important;
    height: auto !important;
    min-height: 100vh;
    margin: 0 auto !important;
    padding: 0 16px !important;
    opacity: 1 !important;
    animation: none !important;
  }

  .terminal-content {
    overflow-y: visible;
    padding: 16px 0 !important;
  }

  .terminal-header {
    padding: 12px 16px !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 640px) {
  .content-wrapper {
    padding: 0 12px;
  }

  /* Make profile section stack on small screens */
  .border-terminal {
    padding: 12px !important;
  }

  /* Adjust table to be more mobile-friendly */
  .table-row {
    padding: 8px 0 !important;
  }

  /* Smaller text for tables on mobile */
  .grid.grid-cols-12 {
    gap: 8px !important;
    font-size: 10px !important;
  }

  /* Stack contact links vertically on very small screens */
  .flex.gap-6 {
    flex-direction: column;
    gap: 12px !important;
  }

  /* Adjust section spacing */
  .section-divider {
    margin: 16px 0 !important;
  }

  /* Profile image sizing */
  .w-20.h-20 {
    width: 60px !important;
    height: 60px !important;
  }

  /* Adjust spacing */
  .mb-6 {
    margin-bottom: 16px !important;
  }

  .mb-8 {
    margin-bottom: 20px !important;
  }
}
