/* ==========================================
   AMENTIA TERMINAL - CORE CRT STYLESHEET
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  background-color: #050505;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  justify-content: center; /* Horizontally centers terminal */
  align-items: center;     /* Vertically centers terminal */
  padding: 20px;
  overflow-x: hidden;
  position: relative;
  /* Deep CRT Corner Vignette */
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.95);
}

/* --- AMBIENT DUST CANVAS --- */
#dust-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 1; /* Sits behind terminal box */
  opacity: 0.65;
}

/* --- ANIMATED CRT SCANLINE OVERLAY --- */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important; /* Prevents blocking mouse clicks */
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.18) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 4px, 6px 100%;
  opacity: 0.55;
  animation: scanline-scroll 12s linear infinite, crt-flicker 0.6s infinite;
}

.crt-overlay::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 100%
  );
  background-size: 100% 30%;
  background-repeat: no-repeat;
  animation: scanline-beam 6s linear infinite;
}

@keyframes scanline-scroll {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 100%, 0 0; }
}

@keyframes scanline-beam {
  0% { background-position: 0 -30vh; }
  100% { background-position: 0 130vh; }
}

@keyframes crt-flicker {
  0% { opacity: 0.5; }
  50% { opacity: 0.58; }
  100% { opacity: 0.52; }
}

/* --- MAIN CONTAINER FRAME --- */
.menu, .subpage-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto; /* Forces block centering */
  background-color: #0a0a0a;
  border: 2px solid #ffffff;
  padding: 28px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4),
              inset 0 0 15px rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 10;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- HEADERS --- */
h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.menu-header, .subpage-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status-tag {
  font-size: 0.75rem;
  color: #888888;
  letter-spacing: 2px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

/* --- NAVIGATION LINKS --- */
.menu-list {
  list-style: none;
}

.menu-item {
  display: block;
  color: #aaaaaa;
  text-decoration: none;
  font-size: 1.05rem;
  padding: 10px 14px;
  margin: 6px 0;
  letter-spacing: 2px;
  transition: all 0.15s ease-in-out;
  border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.selected {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  padding-left: 20px;
}

/* --- TERMINAL BLINKING CURSOR --- */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background-color: #55ff55;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px #55ff55;
  animation: blink 0.8s infinite steps(2, start);
}

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

/* --- HIDDEN VAULT TRIGGER --- */
.hidden-vault-container {
  margin-top: 15px;
  text-align: right;
}

.glitch-symbol {
  display: inline-block;
  font-size: 0.85rem;
  color: #ff3333 !important;
  text-shadow: 0 0 6px rgba(255, 51, 51, 0.8);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.glitch-symbol:hover {
  opacity: 1;
  transform: scale(1.1);
  background: transparent !important;
  border-left-color: transparent !important;
  padding-left: 0 !important;
}

/* --- FOOTERS --- */
.menu-footer, .subpage-footer {
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 12px;
  font-size: 0.75rem;
  color: #666666;
  letter-spacing: 1.5px;
}

/* --- VERTICAL CRT SHUTTER TRANSITIONS --- */
.page-wipe-out {
  animation: shutter-close 0.5s forwards cubic-bezier(0.7, 0, 0.3, 1);
  pointer-events: none;
}

.page-wipe-in {
  animation: shutter-open 0.5s forwards cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes shutter-close {
  0% { clip-path: inset(0% 0 0% 0); opacity: 1; }
  100% { clip-path: inset(50% 0 50% 0); opacity: 0.1; }
}

@keyframes shutter-open {
  0% { clip-path: inset(50% 0 50% 0); opacity: 0.1; }
  100% { clip-path: inset(0% 0 0% 0); opacity: 1; }
}

.hidden {
  display: none !important;
}

/* --- EXPERIENCE PAGE --- */

.experience-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.experience-entry:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.experience-entry h2 {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 1px;
  font-weight: normal;
}

.experience-entry p {
  margin: 0;
  color: #888888;
  font-size: 0.85rem;
}

.experience-entry > span {
  color: #666666;
  font-size: 0.7rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

.section-title {
  color: #ffffff;
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.skills {
  color: #888888;
  font-size: 0.8rem;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .experience-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}