:root {
  color-scheme: dark;
  --background: #030504;
  --terminal: #070b08;
  --line: #263229;
  --text: #d6ded8;
  --muted: #7e8d82;
  --prompt: #79d795;
  --font: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

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

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(rgba(121, 215, 149, 0.018) 1px, transparent 1px),
    var(--background);
  background-size: 100% 4px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--prompt);
  outline-offset: 4px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 10;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 0.75rem;
  clip: auto;
  background: var(--prompt);
  color: var(--background);
}

.terminal {
  width: min(100%, 54rem);
  border: 1px solid var(--line);
  background: var(--terminal);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.38);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease;
}

.badge:hover,
.badge:focus-visible {
  border-color: var(--prompt);
  color: var(--prompt);
}

.top-badge {
  min-height: 1.75rem;
}

.terminal-body {
  padding: clamp(1.4rem, 5vw, 3.25rem);
}

.command {
  margin: 0 0 0.7rem;
  color: var(--muted);
}

.command > span:first-child {
  color: var(--prompt);
}

.identity h1,
.identity p,
.mascot {
  margin: 0;
}

.identity h1 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
}

.identity > p:last-child {
  color: var(--prompt);
}

.work {
  margin-top: clamp(3rem, 8vw, 5.5rem);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.75rem;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.projects {
  border-top: 1px solid var(--line);
}

.projects a {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

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

.project-description {
  color: var(--muted);
}

.external {
  color: var(--muted);
  transition: color 140ms ease, transform 140ms ease;
}

.projects a:hover .project-description,
.projects a:focus-visible .project-description,
.projects a:hover .external,
.projects a:focus-visible .external {
  color: var(--text);
}

.projects a:hover .external,
.projects a:focus-visible .external {
  transform: translate(2px, -2px);
}

.mascot img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.82;
  filter: grayscale(1) contrast(1.05);
}

.contact {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.contact p {
  margin: 0;
}

.contact > p:first-child {
  max-width: 46rem;
  color: var(--muted);
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.9rem !important;
}

.idle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.cursor {
  width: 0.62em;
  height: 1.08em;
  background: var(--prompt);
  animation: blink 1.1s steps(1, end) infinite;
}

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

  46%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 620px) {
  body {
    place-items: start center;
    padding: 0;
    background: var(--terminal);
  }

  .terminal {
    min-height: 100svh;
    border: 0;
    box-shadow: none;
  }

  .work-layout {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .projects a {
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    gap: 0.7rem;
  }

  .mascot {
    width: 5.625rem;
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .projects a {
    grid-template-columns: 1fr auto;
  }

  .project-description {
    grid-column: 1 / -1;
    padding-right: 1rem;
  }

  .external {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

  .external {
    transition: none;
  }

  .badge {
    transition: none;
  }
}
