:root, body.theme-yellow {
  color-scheme: dark;
  --bg-primary: #101210;
  --bg-secondary: #1a1c1a;
  --text-primary: #e19e48;
  --text-secondary: #e8dcc4;
  --accent-1: #9b8be0; 
  --accent-2: #c88691; 
  --cursor-color: #c88691;
  --border-idle: rgba(155, 139, 224, 0.4);
  --border-active: #9b8be0;
  --prompt-color: #ff0000;
  --shadow-color: rgba(155, 139, 224, 0.4);
  --shadow-cursor: rgba(200, 134, 145, 0.6);
  --shadow-cursor-inner: rgba(200, 134, 145, 0.3);
  --placeholder: rgba(225, 158, 72, 0.45);
}

body.theme-green {
  color-scheme: dark;
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --text-primary: #00ff00;
  --text-secondary: #cccccc;
  --accent-1: #fdbe2e; 
  --accent-2: #00bfff;
  --cursor-color: #ff6600;
  --border-idle: rgba(253, 190, 46, 0.3);
  --border-active: #fdbe2e;
  --prompt-color: #00ff00;
  --shadow-color: rgba(253, 190, 46, 0.4);
  --shadow-cursor: rgba(255, 102, 0, 0.6); 
  --shadow-cursor-inner: rgba(255, 102, 0, 0.3);
  --placeholder: rgba(0, 255, 0, 0.45);
}

body.theme-red {
  color-scheme: dark;
  --bg-primary: #0d0d12;
  --bg-secondary: #14141b;
  --text-primary: #ff003c; 
  --text-secondary: #e6e6e6; 
  --accent-1: #00f0ff; 
  --accent-2: #ff00ff; 
  --cursor-color: #39ff14;
  --border-idle: rgba(0, 240, 255, 0.3);
  --border-active: #00f0ff;
  --prompt-color: #fcee0a;
  --shadow-color: rgba(0, 240, 255, 0.4);
  --shadow-cursor: rgba(57, 255, 20, 0.7); 
  --shadow-cursor-inner: rgba(57, 255, 20, 0.4);
  --placeholder: rgba(255, 0, 60, 0.45);
}


body.theme-red .terminal-input,
body.theme-red .output-code,
body.theme-red .output-keyword,
body.theme-red .blinking-bullet {
  color: var(--accent-2);
}


body.theme-green .terminal-input,
body.theme-green .output-code,
body.theme-green .output-keyword,
body.theme-green .blinking-bullet {
  color: var(--accent-2); 
}

* {
  box-sizing: border-box;
  cursor: none;
}

body {
  font-family: 'Fira Code', "Courier New", Courier, "Liberation Mono", "DejaVu Sans Mono", monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  gap: 10px;
  padding: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cursor-glow {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid var(--cursor-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 15px var(--shadow-cursor), inset 0 0 10px var(--shadow-cursor-inner);
  transition: width 0.1s ease-out, height 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cursor-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--cursor-color);
  border-radius: 50%;
  opacity: 0.8;
  transition: background-color 0.3s ease;
}

.main-container {
  display: flex;
  width: 100%;
  height: 100dvh;
  gap: 10px;
}

.terminal-shell {
  flex: 1;
  height: calc(100dvh - 20px);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--border-idle);
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-idle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  cursor: pointer !important;
  transition: transform 0.1s ease, filter 0.2s ease;
}

.button:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
  color: var(--text-primary);
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  transition: color 0.3s ease;
}

.terminal-output {
  flex: 1;
  padding: clamp(12px, 3vw, 26px) clamp(12px, 4vw, 28px);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}


.terminal-output::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.terminal-output::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 2px dashed var(--border-idle);
}

.terminal-output::-webkit-scrollbar-thumb {
  background-color: var(--accent-1); 
  border: 4px solid var(--bg-primary); 
}

.terminal-output::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-primary); 
}


@media (hover: none) and (pointer: coarse) {
  .terminal-output::-webkit-scrollbar {
    display: none;
  }
  .terminal-output {
    scrollbar-width: none; 
  }
}

.terminal-output p {
  margin: 0 0 16px;
}

.terminal-output .ascii-art {
  white-space: pre !important;
  margin: 0 0 20px;
  color: var(--text-primary);
  font-size: clamp(0.45rem, 1.2vw, 0.84rem);
  line-height: 1;
  letter-spacing: 0;
  font-family: 'Fira Code', monospace;
  transition: color 0.3s ease;
}

.blinking-bullet {
  animation: blink 1.5s infinite;
  color: var(--prompt-color);
  font-weight: bold;
}

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

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  margin-top: 16px;
  margin-bottom: 0;
}

.prompt {
  color: var(--prompt-color);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: bold;
  white-space: nowrap;
  user-select: none;
  transition: color 0.3s ease;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  caret-color: var(--accent-2);
  font-family: inherit;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  padding: 0;
  transition: color 0.3s ease;
}

.terminal-input::placeholder {
  color: var(--placeholder);
}

.terminal-output a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.terminal-output a:hover {
  text-decoration: underline;
}

.output-line {
  margin-bottom: 4px; 
  white-space: pre-wrap; 
  color: var(--text-secondary);
  animation: terminalEntry 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform-origin: left center;
  transition: color 0.3s ease;
}

@keyframes terminalEntry {
  0% {
    opacity: 0;
    transform: translateY(15px) scaleY(1.1);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: blur(0);
  }
}

.output-keyword {
  color: var(--text-primary);
}

.output-code {
  color: var(--text-primary);
}

.cmd-row {
  display: flex;
  gap: 15px;
  margin-bottom: 2px;
}
.cmd-name {
  flex: 0 0 145px;
  color: var(--accent-1); 
  transition: color 0.3s ease;
}
.cmd-desc {
  flex: 1;
}
.secret-tip {
  margin-top: 10px;
  line-height: 1.4;
}

.copyright {
  position: relative;
  top: 1px;
}

@media (max-width: 640px) {
  .main-container {
    flex-direction: column;
    gap: 5px;
    padding: 5px;
  }

  .terminal-input-line {
    margin-top: 10px;
  }
  
  .terminal-input {
    font-size: 16px !important;
  }
  
  .cmd-row {
    flex-direction: column;
    gap: 0px;
    margin-bottom: 12px;
  }
  .cmd-name {
    flex: 1 1 auto;
    margin-bottom: 2px;
  }
  .cmd-desc {
    padding-left: 10px;
  }
}

.highlight-yellow {
  color: var(--accent-1); 
  transition: color 0.3s ease;
}

.cmd-desc {
  color: var(--text-secondary); 
  transition: color 0.3s ease;
}

.skills-container {
  display: flex;
  flex-wrap: wrap; 
  gap: 12px;       
  margin-top: 8px;
}

.skill-box {
  border: 1px solid var(--border-idle); 
  color: var(--text-primary);            
  background: transparent;
  padding: 6px 10px;
  display: inline-block;
  transform: translateY(0);
  box-shadow: 0 0 0 transparent;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, color 0.3s ease; 
}


.skill-box:hover {
  background: var(--accent-1); 
  color: var(--bg-primary);
  border-color: var(--border-active); 
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow-color);
}


/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  * {
    cursor: auto !important;
  }
  a, .button {
    cursor: pointer !important;
  }
  input {
    cursor: text !important;
  }
  .cursor-glow {
    display: none !important;
  }
}






body::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 9998;
  pointer-events: none;
  animation: scanlinesScroll 15s linear infinite;
}

@keyframes scanlinesScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 400px; }
}


body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: #000000;
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  animation: crtFlicker 10s infinite;
}

@keyframes crtFlicker {
  0% { opacity: 0; }
  5% { opacity: 0; }
  5.2% { opacity: 0.3; } 
  5.4% { opacity: 0; }
  5.6% { opacity: 0.15; } 
  5.8% { opacity: 0; }
  60% { opacity: 0; }
  60.2% { opacity: 0.15; }
  60.4% { opacity: 0; }
  100% { opacity: 0; }
}
