:root {
  --bg-color: #000000;
  --text-color: #00ff66;
  --prompt-color: #ffffff;
  --font: "Fira Code", "Source Code Pro", "SFMono-Regular", Menlo, Monaco,
    "Ubuntu Mono", Consolas, monospace;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font);
  letter-spacing: 0.3px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  align-items: start;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: 1fr 1fr;
  }
}

.terminal,
.panel {
  border: 1px solid var(--text-color);
  box-shadow: 0 0 24px color-mix(in srgb, var(--text-color) 25%, transparent),
    inset 0 0 12px color-mix(in srgb, var(--text-color) 20%, transparent);
  background: color-mix(in srgb, var(--bg-color) 90%, transparent);
  padding: 1rem 1.2rem;
  border-radius: 10px;
}

.terminal {
  height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
}

.terminal-title {
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.output {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 0.75rem 0.25rem 0.5rem;
  font-size: 0.98rem;
}

#output::-webkit-scrollbar,
.panel-scroll::-webkit-scrollbar {
  width: 8px;
}

#output::-webkit-scrollbar-track,
.panel-scroll::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0);
}

#output::-webkit-scrollbar-thumb,
.panel-scroll::-webkit-scrollbar-thumb {
  background-color: var(--text-color);
  border-radius: 5px;
}

#output::-webkit-scrollbar-thumb:hover,
.panel-scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--prompt-color);
}

.line {
  margin: 0.12rem 0;
  white-space: pre-wrap;
}

.input-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  border-top: 1px solid color-mix(in srgb, var(--text-color) 40%, transparent);
  padding-top: 0.75rem;
}

.prompt {
  color: var(--prompt-color);
  font-weight: 600;
}

.prompt-inline {
  color: var(--prompt-color);
  font-weight: 600;
}

#cmdInput {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--prompt-color);
  font-family: var(--font);
  font-size: 1rem;
  caret-color: var(--prompt-color);
  outline: none;
}

#cmdInput::selection {
  background: color-mix(in srgb, var(--prompt-color) 25%, transparent);
}

.panel {
  height: calc(100vh - 4rem);
  overflow: hidden;
  position: relative;
}

.panel-scroll {
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 0.75rem;
}

.hidden {
  display: none;
}

.panel-header,
.panel-footer {
  font-weight: 600;
  letter-spacing: 1px;
}

.panel-body {
  margin: 0.75rem 0 0.5rem;
  line-height: 1.6;
}

.ascii-line {
  opacity: 0.7;
  letter-spacing: 1px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.pill {
  border: 1px solid var(--text-color);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 720px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.project-card,
.contact-link,
.timeline-item {
  border: 1px dashed color-mix(in srgb, var(--text-color) 65%, transparent);
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-color) 75%, transparent);
  transition: transform 160ms ease, color 160ms ease, text-shadow 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease;
}

.project-card:hover,
.contact-link:hover,
.timeline-item:hover,
a:hover {
  transform: scale(1.03);
  color: var(--text-color);
  text-shadow: 0 0 10px color-mix(in srgb, var(--text-color) 60%, transparent);
  border-color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 0 12px var(--text-color);
  cursor: pointer;
}

.project-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.project-card a {
  color: inherit;
  border: 1px dashed var(--text-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  padding: 10px;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.contact-link a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

a {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-color) 65%, transparent);
  outline-offset: 3px;
}

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

.ghost-caret {
  display: inline-block;
  width: 10px;
  height: 1.1em;
  background: var(--text-color);
  animation: pulse 1s steps(2, start) infinite;
}

.train {
  display: inline-block;
  white-space: pre;
  font-family: var(--font);
  color: var(--text-color);
  line-height: 1.1;
}

.cam-container {
  margin: 0.75rem 0;
  padding: 0.6rem;
  border: 1px dashed color-mix(in srgb, var(--text-color) 50%, transparent);
  background: color-mix(in srgb, var(--bg-color) 85%, transparent);
  border-radius: 8px;
}

.cam-note {
  font-family: var(--font);
  color: color-mix(in srgb, var(--text-color) 70%, transparent);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.cam-ascii {
  margin: 0;
  font-family: var(--font);
  white-space: pre;
  line-height: 0.8;
  font-size: 9px;
  overflow: hidden;
  color: var(--text-color);
}

.snake-wrap {
  margin: 0.75rem 0;
  padding: 0.6rem;
  border: 1px dashed color-mix(in srgb, var(--text-color) 50%, transparent);
  background: color-mix(in srgb, var(--bg-color) 85%, transparent);
}

.snake-note {
  font-family: var(--font);
  margin-bottom: 0.35rem;
}

.snake-grid {
  margin: 0;
  font-family: var(--font);
  white-space: pre;
  line-height: 1.1;
}

.maze-output {
  font-family: var(--font);
  white-space: pre;
  margin: 0.5rem 0;
  line-height: 0.65;
  font-size: small;
}

.maze-note {
  font-family: var(--font);
  margin: 0.35rem 0;
}

.overview {
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.overview-card {
  border: 1px solid var(--text-color);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  background: color-mix(in srgb, var(--bg-color) 90%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--text-color) 20%, transparent);
}

.overview-card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.overview-card-body {
  line-height: 1.6;
}

.overview-exit-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 999;
  border: 1px solid var(--text-color);
  background: color-mix(in srgb, var(--bg-color) 80%, transparent);
  color: var(--text-color);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font);
  cursor: pointer;
}

.overview-exit-btn:hover {
  box-shadow: 0 0 10px color-mix(in srgb, var(--text-color) 60%, transparent);
}
