/* Catppuccin Mocha */
:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --text: #cdd6f4;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --overlay0: #6c7086;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --blue: #89b4fa;
  --lavender: #b4befe;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --yellow: #f9e2af;
  --peach: #fab387;
  --maroon: #eba0ac;
  --red: #f38ba8;
  --pink: #f5c2e7;
  --mauve: #cba6f7;
}

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

body {
  background: var(--base);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.terminal {
  width: 100%;
  max-width: 80ch;
}

/* Staggered fade-in for all sections */
.section {
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.line {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.prompt-user  { color: var(--green); }
.prompt-at    { color: var(--text); }
.prompt-host  { color: var(--green); }
.prompt-sep   { color: var(--text); }
.prompt-path  { color: var(--blue); }
.prompt-dollar{ color: var(--pink); }
.cmd          { color: var(--text); }

.output {
  margin-top: 0.25rem;
  padding-left: 0;
}

.output p {
  margin-bottom: 0.5rem;
  max-width: 75ch;
}

.highlight {
  color: var(--mauve);
  font-weight: 700;
}

.dim {
  color: var(--overlay0);
}

/* ls table */
.ls-table {
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ls-table td {
  padding-right: 1.5rem;
  white-space: nowrap;
}

.ls-perm  { color: var(--surface2); }
.ls-links { color: var(--subtext0); }
.ls-user  { color: var(--yellow); }
.ls-group { color: var(--yellow); }
.ls-size  { color: var(--subtext0); }
.ls-date  { color: var(--subtext0); }
.ls-name  { color: var(--text); }

.ls-name a {
  color: var(--blue);
  text-decoration: none;
}

.ls-name a:hover {
  color: var(--lavender);
  text-decoration: underline;
}

/* h3 styled like bashbunni */
h3 {
  display: inline-block;
  font-size: inherit;
  padding: 0 0.5em;
  margin-bottom: 0.5rem;
  background-color: #684eff;
  color: #fafafa;
}

/* contact section */
.contact {
  list-style: none;
  padding-left: 0;
}

.contact li {
  margin-bottom: 0.3rem;
}

.contact li::before {
  content: ">";
  color: var(--peach);
  margin-right: 0.75rem;
}

.contact a {
  color: var(--blue);
  text-decoration: none;
}

.contact a:hover {
  color: var(--lavender);
  text-decoration: underline;
}

/* interests */
.interests {
  list-style: none;
  padding-left: 0;
}

.interests li {
  margin-bottom: 0.3rem;
}

.interests li::before {
  content: ">";
  color: var(--peach);
  margin-right: 0.75rem;
}

/* fastfetch */
.fastfetch {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem 2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.25rem 0;
  align-items: flex-start;
}

.ff-logo {
  color: var(--blue);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.ff-info {
  padding-top: 0;
  flex: 1;
  min-width: 0;
}

.ff-row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile: hide logo, full width info */
@media (max-width: 480px) {
  .fastfetch {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ff-logo {
    display: none;
  }

  .ff-info {
    width: 100%;
  }

  .ff-row {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
}

.ff-sep { color: var(--surface2); }
.ff-key { color: var(--teal); }
.ff-val { color: var(--text); }

/* cursor blink (final prompt line) */
.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--text);
}

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

footer {
  margin-top: 3rem;
  font-size: 0.8rem;
}

footer a {
  color: var(--blue);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  body {
    font-size: 0.85rem;
    padding: 1rem;
  }

  .ls-table td {
    padding-right: 0.75rem;
  }

  #typewriter-line {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .terminal {
    max-width: 100%;
  }
}
