@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #0d0a00;
  --amber: #ffb000;
  --amber-dim: #806000;
  --amber-bright: #ffd866;
  --amber-glow: rgba(255, 176, 0, 0.12);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--amber);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.28;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.terminal {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Window chrome */
.chrome {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--amber-dim);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }

.chrome-title {
  flex: 1;
  text-align: left;
  padding-left: 16px;
  color: var(--amber-dim);
  font-size: 13px;
}

/* Terminal body */
.body {
  flex: 1;
  padding: 24px;
}

/* Prompt line */
.prompt {
  color: var(--amber-dim);
}

.prompt .cmd {
  color: var(--amber);
}

/* Section spacing */
.section {
  margin-bottom: 32px;
}

.section:last-child {
  margin-bottom: 0;
}

/* Output block */
.output {
  padding: 8px 0 0 0;
}

.output p {
  padding-left: 20px;
}

/* Link rows */
.link-row {
  display: flex;
  align-items: baseline;
  padding: 2px 0 2px 20px;
  text-decoration: none;
  color: var(--amber);
  border-radius: 2px;
  transition: none;
}

.link-row:has(.link-label) {
  align-items: flex-start;
}

a.link-row:hover {
  background: var(--amber-glow);
  color: var(--amber-bright);
}

a.link-row:active {
  background: var(--amber);
  color: var(--bg);
}

.link-name {
  min-width: 140px;
  flex-shrink: 0;
  padding-right: 12px;
}

.link-label {
  flex: 1;
}

.link-arrow {
  color: var(--amber-dim);
  margin: 0 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.link-note {
  color: var(--amber-dim);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Coming soon rows */
.link-row--soon {
  color: var(--amber-dim);
  cursor: default;
}

.link-row--soon:hover {
  background: none;
  color: var(--amber-dim);
}

.link-row--soon .link-arrow {
  color: var(--amber-dim);
}

/* Interactive prompt */
.input-line {
  display: flex;
  align-items: baseline;
  margin-top: 32px;
  padding-left: 0;
}

.input-line .prompt {
  white-space: nowrap;
  margin-right: 8px;
}

.input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: baseline;
}

#input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  caret-color: transparent;
}

.input-mirror {
  color: var(--amber);
  white-space: pre;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* Command response */
.cmd-response {
  padding-left: 20px;
  margin-bottom: 16px;
}

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

.cmd-history-prompt {
  margin-top: 16px;
}

/* ASCII art */
.ascii-art {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  padding: 8px 0;
}

.ascii-art p {
  padding-left: 0;
}

/* Neofetch */
.neofetch p {
  white-space: pre;
  padding-left: 0;
}

.nf-art {
  color: var(--amber);
  letter-spacing: 0;
}

.nf-title {
  color: var(--amber-bright);
}

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

.nf-label {
  color: var(--amber-bright);
}

.nf-colors {
  color: var(--amber);
}

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

.nf-colors-bright {
  color: var(--amber-bright);
}

/* CRT mode */
.crt {
  animation: crt-flicker 4s infinite;
}

.crt::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 100;
}

.crt .terminal {
  text-shadow: 0 0 2px var(--amber);
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.98; }
  75% { opacity: 0.97; }
}

/* Mobile */
@media (max-width: 720px) {
  .terminal {
    max-width: 100%;
  }

  .body {
    padding: 16px;
  }

  .chrome {
    padding: 12px 16px;
  }

  .dot {
    width: 6px;
    height: 6px;
  }

  .chrome-title {
    font-size: 12px;
  }

  .link-name {
    min-width: 0;
    width: auto;
    padding-right: 16px;
  }

  .link-arrow,
  .link-note {
    display: none;
  }

  .ascii-art {
    font-size: 9px;
  }

  /* Hide input on mobile, keep decorative cursor */
  #input {
    display: none;
  }
}

/* Selection */
::selection {
  background: var(--amber);
  color: var(--bg);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--amber-dim);
  border-radius: 3px;
}
