/* Personal workspace and command terminal. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas:
    "intro profile";
  align-items: start;
  gap: 20px;
  padding-block: 28px 20px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(190px, .9fr);
  grid-template-areas:
    "intro profile"
    "statement profile"
    "description description"
    "actions actions"
    "topics topics"
    "bottom bottom";
  align-content: start;
  column-gap: clamp(16px, 2vw, 24px);
  min-width: 0;
  padding: clamp(24px, 2.3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 65%),
    var(--surface);
}

.hero-heading-row {
  grid-area: intro;
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.hero-heading-copy {
  min-width: 0;
}

.hero-heading-copy .hero-greeting {
  margin-bottom: 8px;
}

.hero-heading-copy h1 {
  margin-bottom: 10px;
  font-size: clamp(36px, 3.2vw, 44px);
}

.hero-heading-copy .hero-role {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
}

.hero .hero-avatar {
  width: clamp(76px, 7vw, 92px);
  height: clamp(76px, 7vw, 92px);
  border-radius: 22px;
}

.hero-profile-card {
  grid-area: profile;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(8 15 29 / 35%);
}

.hero-greeting {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 17px;
}

.hero-statement {
  grid-area: statement;
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
  font-size: clamp(26px, 2.7vw, 38px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.03em;
}

.hero-statement em {
  color: var(--accent);
  font-style: normal;
}

.hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-topics {
  grid-area: topics;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.hero-profile-meta .hero-meta-line {
  font-size: 10px;
}

.hero-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font: 12px / 1.6 var(--font-mono);
  overflow-wrap: anywhere;
}

.hero-meta-line > span:first-child {
  color: var(--accent);
}

.hero-meta-line[href]:hover {
  color: var(--accent);
}

.hero-topics span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 12px / 1.5 var(--font-mono);
}

.hero-topics span::before {
  content: "#";
  margin-right: 5px;
  color: var(--accent);
}

.hero-bottomline {
  grid-area: bottom;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 11px / 1.7 var(--font-mono);
}

.hero-bottomline a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--accent);
}

/* Terminal */
.terminal {
  grid-area: profile;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font: 11px / 1.5 var(--font-mono);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.terminal-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.terminal-dots i:nth-child(2) {
  background: var(--gold);
}

.terminal-dots i:nth-child(3) {
  background: var(--accent);
}

.terminal-mode {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .08em;
}

.terminal-body {
  min-width: 0;
  padding: 26px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.terminal-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.terminal-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: 11px / 1.5 var(--font-mono);
}

.terminal-switcher button::before {
  content: "$";
  color: var(--accent);
}

.terminal-switcher button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.terminal-switcher button:hover {
  color: var(--accent);
}

.terminal-command,
.terminal-prompt {
  font: 13px / 1.6 var(--font-mono);
}

.terminal-prompt input {
  flex: 1 1 auto;
  min-width: 0;
  width: min(100%, 430px);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
}
.terminal-prompt input::placeholder { color: var(--muted); opacity: .72; }
.terminal-shell-result { margin: 8px 0 0; color: var(--muted); white-space: pre-wrap; font: 12px / 1.7 var(--font-mono); }

.terminal-command > span {
  margin-right: 9px;
  color: var(--accent);
}

.terminal-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.terminal-output {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-height: min(390px, 52vh);
  padding-right: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
  scroll-behavior: auto;
}

.terminal-entry {
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.terminal-output:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.terminal-output-name,
.terminal-output-role {
  margin: 0 0 4px;
  color: var(--text);
  font: 600 13px / 1.6 var(--font-mono);
}

.terminal-output-role {
  color: var(--accent);
}

.terminal-about p {
  margin: 4px 0 0;
  color: var(--muted);
  font: 12px / 1.75 var(--font-mono);
}

.terminal-about p:last-child {
  margin-bottom: 0;
}

.terminal-entry.is-typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 3px;
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.hero-description {
  grid-area: description;
  max-width: none;
  width: 100%;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.terminal-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 11px / 1.6 var(--font-mono);
}

.terminal-prompt {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--accent);
  white-space: normal;
}

.cursor {
  width: 7px;
  height: 14px;
  background: var(--accent);
  animation: blink 1.2s steps(1) infinite;
}

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

.terminal-tool-list {
  margin-top: 22px;
}

.terminal-tool-list .terminal-json {
  display: block;
}

.terminal-json {
  counter-reset: json-line;
  overflow-x: auto;
  padding-block: 2px;
  color: var(--text);
  font: 12px / 1.8 var(--font-mono);
  scrollbar-width: thin;
}

.json-brace {
  padding-inline: 12px;
  color: var(--muted);
}

.json-line {
  position: relative;
  counter-increment: json-line;
  margin-block: 7px;
  padding: 8px 12px 8px 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(8 15 29 / 38%);
  transition: background-color .18s, border-color .18s;
  overflow-wrap: anywhere;
}

.json-line::before {
  content: counter(json-line, decimal-leading-zero);
  position: absolute;
  top: 8px;
  left: 8px;
  color: var(--muted);
  font-size: 10px;
  opacity: .72;
}

.json-line:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.json-key {
  color: var(--accent);
}

.json-value {
  color: var(--gold);
}

.method-list {
  display: grid;
  gap: 22px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.method-list li {
  display: flex;
  gap: 15px;
}

.method-list li > span {
  color: var(--gold);
  font: 13px / 1.7 var(--font-mono);
}

.method-list strong {
  font-size: 15px;
}

.method-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "profile";
  }

}

@media (max-width: 600px) {
  .hero-copy {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "profile"
      "statement"
      "description"
      "actions"
      "topics"
      "bottom";
  }

  .hero {
    gap: 16px;
    padding-top: 22px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-heading-copy h1 {
    font-size: clamp(36px, 9vw, 50px);
  }

  .hero-avatar {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
  }

  .hero-profile-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
    transform: none;
  }

  .hero .hero-avatar {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .hero-profile-meta .hero-meta-line {
    font-size: 10px;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .hero-profile-meta {
    flex-direction: column;
    gap: 7px;
  }

  .terminal-bar {
    padding-inline: 18px;
  }

  .terminal-mode {
    display: none;
  }

  .terminal-body {
    padding: 20px;
  }

  .terminal-output {
    max-height: min(52vh, 360px);
  }
}

@media (max-width: 380px) {
  .hero-profile-meta .hero-meta-line {
    font-size: 9px;
  }
}
