:root {
  --bg: #000;
  --text: #d77798;
  --muted: #b7a986;
  --dim: #552b3a;
  --accent: #ff80aa;
  --font: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 128, 170, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 4px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}

button:hover,
a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 128, 170, 0.65);
}

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

::selection {
  color: var(--bg);
  background: var(--accent);
}

.terminal {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 4vw, 48px);
}

header,
footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dim);
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 128, 170, 0.9);
}

.output {
  flex: 1;
  width: min(760px, 100%);
  padding: clamp(48px, 10vh, 110px) 0;
}

.entry + .entry {
  margin-top: 24px;
}

p,
h1,
h2 {
  margin: 0;
}

.command {
  color: var(--muted);
}

.command span,
.prompt span {
  color: var(--accent);
}

.response {
  margin: 8px 0 0 18px;
}

.identity h1 {
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  text-shadow: 0 0 12px rgba(255, 128, 170, 0.25);
}

.identity p,
.subtle {
  color: var(--muted);
}

.about-copy {
  max-width: 680px;
}

.about-copy section {
  padding: 0;
}

.about-copy section + section {
  margin-top: 22px;
}

.about-copy h2 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
}

.about-copy p {
  position: relative;
  padding-left: 18px;
  line-height: 1.65;
}

.about-copy p::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--text);
}

.about-copy p + p {
  margin-top: 6px;
}

.work-list {
  max-width: 760px;
}

.work-list article + article {
  margin-top: 36px;
}

.work-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--dim);
}

.work-heading h2 {
  font-size: inherit;
  font-weight: 500;
}

.work-heading time,
.work-stack {
  color: var(--muted);
}

.work-list p {
  margin-top: 8px;
}

.work-list a {
  display: inline-block;
  margin-top: 10px;
}

.commands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.commands button::after {
  content: "/";
  color: var(--dim);
}

.rows {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 3px 16px;
}

.entries-browser {
  width: min(760px, calc(100vw - 48px));
}

.entries-list {
  border-top: 1px solid var(--dim);
}

.entry-row {
  width: 100%;
  display: grid;
  grid-template-columns: 110px 1fr 24px;
  gap: 16px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--dim);
  text-align: left;
  transition: color 120ms ease, background 120ms ease;
}

.entry-row time,
.entry-row-arrow {
  color: var(--muted);
}

.entry-row.selected,
.entry-row:focus-visible {
  outline: none;
  color: var(--bg);
  background: var(--text);
  text-shadow: none;
}

.entry-row.selected time,
.entry-row.selected .entry-row-arrow,
.entry-row:focus-visible time,
.entry-row:focus-visible .entry-row-arrow {
  color: var(--bg);
}

.entries-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.prompt {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--dim);
}

.prompt input {
  min-width: 0;
  flex: 1;
  padding: 0;
  outline: none;
  border: 0;
  caret-color: var(--accent);
  color: var(--text);
  background: transparent;
}

footer {
  padding-top: 12px;
  border-top: 1px solid var(--dim);
}

footer button {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.response button {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.error {
  color: var(--accent);
}

.entry-reader {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  overflow-y: auto;
  padding: clamp(18px, 4vw, 48px);
  color: var(--text);
  background:
    linear-gradient(rgba(255, 128, 170, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 4px;
}

.entry-reader.open {
  display: block;
}

.reader-open {
  overflow: hidden;
}

.reader-header {
  position: sticky;
  z-index: 1;
  top: 0;
  align-items: center;
  padding-bottom: 16px;
  background: var(--bg);
}

.reader-header button {
  padding: 7px 12px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.reader-header button:hover,
.reader-header button:focus-visible {
  outline: none;
  color: var(--bg);
  background: var(--text);
  text-shadow: none;
}

.reader-content {
  width: min(720px, 100%);
  margin: clamp(44px, 9vh, 100px) auto 15vh;
}

.reader-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 10px;
}

.reader-content > h1 {
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.reader-summary {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
}

.reader-body {
  margin-top: clamp(48px, 8vh, 80px);
  font-size: 15px;
  line-height: 1.9;
}

.reader-body p + p,
.reader-body figure + p,
.reader-body p + figure {
  margin-top: 24px;
}

.reader-body h2 {
  margin: 48px 0 14px;
  font-size: inherit;
  font-weight: 500;
}

.reader-body h2::before {
  content: "# ";
}

.reader-body figure {
  margin: 40px 0;
}

.reader-body img {
  display: block;
  width: 100%;
  border: 1px solid var(--dim);
  filter: saturate(0.75);
}

.reader-body figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 600px) {
  .terminal {
    padding: 16px;
  }

  .rows {
    grid-template-columns: 76px 1fr;
  }

  .work-heading {
    display: block;
  }

  .entry-row {
    grid-template-columns: 90px 1fr 16px;
    gap: 8px;
    padding: 12px 6px;
  }

  .reader-meta {
    display: block;
  }

  .reader-meta span {
    display: block;
    margin-top: 4px;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .entry:last-child {
    animation: appear 180ms ease-out;
  }

  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(3px);
    }
  }
}
