/* Shared colors and the terminal's default content height. */
:root {
  --bg-deep: #03060d;
  --line: rgba(146, 158, 199, 0.16);
  --text: #d7d2cc;
  --text-strong: #f0ece5;
  --accent: #b58eff;
  --accent-bright: #d2b7ff;
  --mono:
    ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas,
    'Liberation Mono', Menlo, monospace;
  --primary-terminal-height: 480px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100dvh;
  margin: 0;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 86% 18%,
      rgba(78, 56, 132, 0.12),
      transparent 32rem
    ),
    radial-gradient(
      circle at 12% 56%,
      rgba(34, 44, 87, 0.13),
      transparent 30rem
    ),
    linear-gradient(180deg, #040711 0%, #060914 45%, #04070e 100%);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('../assets/rain-seamless.svg') repeat;
  background-position: 0 0;
  background-size: 768px 768px;
  opacity: 0.3;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.62));
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.94),
    rgba(0, 0, 0, 0.62)
  );
  animation: rain-fall 2.05s linear infinite;
  pointer-events: none;
  will-change: background-position;
}

@keyframes rain-fall {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 768px;
  }
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

::selection {
  background: rgba(181, 142, 255, 0.28);
  color: #fff;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 1px solid rgba(181, 142, 255, 0.72);
  outline-offset: 3px;
}

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

/* Top panel ------------------------------------------------------------ */
.top-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: 52px;
  border-bottom: 1px solid rgba(150, 158, 191, 0.12);
  background: linear-gradient(
    180deg,
    rgba(3, 6, 13, 0.88),
    rgba(4, 7, 14, 0.68)
  );
  box-shadow: 0 1px rgba(255, 255, 255, 0.015) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-panel__utility {
  position: absolute;
  top: 50%;
  left: clamp(16px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: 22px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.home-button,
.help-button,
.top-nav__link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.home-button {
  padding: 4px 1px;
  color: var(--accent-bright);
  font-size: 1.05rem;
}

.panel-identity {
  color: #e5e0d8;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.top-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 24px;
  transform: translate(-50%, -50%);
}

.top-nav__link {
  position: relative;
  padding: 10px 3px 11px 15px;
  color: #a8a4a2;
  font-size: 0.92rem;
  transition: color 120ms ease;
}

.top-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.top-nav__link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 8px rgba(181, 142, 255, 0.35);
  transition: width 140ms ease;
}

.top-nav__link:hover,
.top-nav__link:focus-visible,
.top-nav__link.is-active {
  color: var(--text-strong);
}

.top-nav__link.is-active::before {
  content: '> ';
}
.top-nav__link.is-active::after {
  width: 42px;
}

.help-button {
  position: absolute;
  top: 50%;
  right: clamp(16px, 3vw, 34px);
  padding: 6px 0;
  transform: translateY(-50%);
  color: #b0abb2;
  font-size: 0.91rem;
}

.help-button span {
  color: var(--accent);
}

.home-button:hover,
.home-button:focus-visible,
.help-button:hover,
.help-button:focus-visible {
  color: var(--accent-bright);
}

/* Desktop workspace ---------------------------------------------------- */
.site-main {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1180px, calc(100% - 72px));
  min-height: calc(100dvh - 52px);
  margin: 0 auto;
  padding: 118px 0 20px;
  flex: 1;
  flex-direction: column;
  gap: 18px;
}

/* The slot keeps the dock and footer still when a resized window overlaps them. */
.terminal-slot {
  position: relative;
  z-index: 2;
  min-width: 0;
  flex: 0 0 auto;
  overflow: visible;
}

.site-main.is-terminal-closed .terminal-slot {
  display: none;
}

/* Main terminal -------------------------------------------------------- */
.terminal-window {
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(149, 160, 196, 0.2);
  border-radius: 17px;
  background: rgba(4, 8, 17, 0.46);
  box-shadow:
    0 26px 72px rgba(0, 0, 0, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.22),
    0 0 34px rgba(93, 67, 145, 0.055),
    0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.terminal-window[hidden],
.pane[hidden],
.preview-card[hidden] {
  display: none !important;
}

.terminal-tabs {
  position: relative;
  height: 51px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 20, 0.52);
}

.terminal-tab-list {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  padding-right: 58px;
  overflow: hidden;
}

.terminal-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 17px;
  border-right: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: linear-gradient(
    180deg,
    rgba(16, 18, 29, 0.76),
    rgba(10, 13, 22, 0.68)
  );
  color: #e9e5df;
  box-shadow: 0 1px rgba(255, 255, 255, 0.025) inset;
  font-size: 0.91rem;
}

.terminal-tab-list .terminal-tab {
  position: relative;
  min-width: 120px;
  max-width: 230px;
  flex: 1 1 230px;
  cursor: grab;
  transition:
    background-color 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}

.terminal-tab-list .terminal-tab:active {
  cursor: grabbing;
}
.terminal-tab-list .terminal-tab.is-tab-dragging {
  opacity: 0.22;
}

.terminal-tab-list .terminal-tab:not(.is-active) {
  background: rgba(8, 11, 20, 0.48);
  color: #9a969a;
  box-shadow: none;
}

.terminal-tab-list .terminal-tab:not(.is-active) .terminal-tab__icon {
  stroke: #8670ab;
  opacity: 0.7;
}

.terminal-tab__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terminal-tab__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-tab__close {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #737681;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.terminal-tab__close:hover,
.terminal-tab__close:focus-visible {
  background: rgba(181, 142, 255, 0.055);
  color: #c4b1e7;
}

.terminal-tab[role='tab']:focus-visible {
  outline: 1px solid rgba(181, 142, 255, 0.58);
  outline-offset: -3px;
}

.terminal-tabs__dots {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-54%);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 3px;
}

.terminal-stage,
.pane {
  height: var(--primary-terminal-height);
  min-height: var(--primary-terminal-height);
}

.terminal-stage {
  position: relative;
}
.pane {
  animation: pane-in 150ms ease both;
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.terminal-stage.is-cleared .pane {
  display: none !important;
}

.terminal-stage.is-cleared::after {
  content: '';
  display: block;
  min-height: 490px;
}

.pane--whoami,
.pane--projects,
.pane--stack,
.pane--lately {
  height: 100%;
}

.pane-inner {
  height: 100%;
  min-height: 100%;
  padding: 38px 46px;
}

/* Whoami --------------------------------------------------------------- */
.pane--whoami {
  display: grid;
  grid-template-columns: minmax(0, 50%) 1px minmax(0, 50%);
}

.whoami-copy {
  display: flex;
  min-width: 0;
  padding: 36px 40px 28px 42px;
  flex-direction: column;
  background: linear-gradient(
    90deg,
    rgba(3, 7, 15, 0.82),
    rgba(3, 7, 15, 0.66)
  );
}

.whoami-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.whoami-id strong {
  color: var(--text-strong);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.whoami-id span {
  color: #8f8992;
  font-size: 0.86rem;
}

.identity-rule {
  width: min(320px, 82%);
  height: 1px;
  margin: 13px 0 20px;
  background: linear-gradient(
    90deg,
    rgba(181, 142, 255, 0.32),
    rgba(139, 151, 191, 0.16) 70%,
    transparent
  );
}

.whoami-prose {
  max-width: 490px;
  color: #c8c2bd;
  font-size: 0.93rem;
  line-height: 1.72;
}

.whoami-prose p {
  margin: 0 0 18px;
}
.whoami-prose p:last-child {
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: 22px;
  margin-top: auto;
  padding-top: 27px;
}

.social-links a {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #aaa6a1;
  text-decoration: none;
  transition:
    color 120ms ease,
    transform 120ms ease;
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-1px);
  color: var(--accent-bright);
}

.social-links a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -31px;
  left: 0;
  z-index: 4;
  width: max-content;
  max-width: 280px;
  padding: 3px 7px;
  border: 1px solid rgba(181, 142, 255, 0.12);
  border-radius: 5px;
  background: rgba(5, 8, 16, 0.92);
  color: #8f8997;
  font-size: 0.69rem;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity 100ms ease,
    transform 100ms ease;
}

.social-links a:hover::after,
.social-links a:focus-visible::after {
  opacity: 1;
  transform: none;
}

.whoami-divider {
  position: relative;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    transparent 3%,
    rgba(181, 142, 255, 0.48) 17%,
    rgba(151, 165, 203, 0.34) 50%,
    rgba(181, 142, 255, 0.48) 83%,
    transparent 97%
  );
}

.whoami-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(181, 142, 255, 0.1),
    0 0 13px rgba(181, 142, 255, 0.55);
}

.whoami-visual {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #050810;
}

.whoami-visual::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 28px;
  background: linear-gradient(90deg, rgba(5, 8, 16, 0.46), transparent);
  pointer-events: none;
}

.whoami-visual picture,
.whoami-visual img {
  display: block;
  width: 100%;
  height: 100%;
}

.whoami-visual img {
  object-fit: cover;
  object-position: center 44%;
}

/* Project browser ------------------------------------------------------ */
.projects-pane {
  display: flex;
  padding-top: 34px;
  flex-direction: column;
}

.projects-pane .ls-list {
  align-content: start;
}

.path-heading {
  margin: 0 0 26px;
  color: #aaa4aa;
  font-size: 0.91rem;
}

.ls-list {
  display: grid;
}

.ls-row {
  display: grid;
  grid-template-columns: 24px minmax(160px, 210px) minmax(0, 1fr) minmax(
      0,
      auto
    );
  align-items: baseline;
  gap: 8px;
  min-height: 45px;
  padding: 10px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c6c1bd;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 110ms ease,
    color 110ms ease;
}

.ls-row:hover,
.ls-row:focus-visible {
  background: rgba(181, 142, 255, 0.045);
  color: var(--text-strong);
}

.ls-type {
  color: #8f8a91;
}
.ls-type--link,
.mini-projects .ls-type--link {
  color: var(--accent-bright);
}
.ls-type--dir,
.mini-projects .ls-type--dir {
  color: #d6c276;
}
.ls-type--file,
.mini-projects .ls-type--file {
  color: #8fbfe8;
}

/* Let long filenames wrap inside their track instead of crossing into the description. */
.ls-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #e5dfd8;
}

.ls-description {
  min-width: 0;
  color: #918d8d;
}

.ls-destination {
  color: #686b77;
  font-size: 0.78rem;
  opacity: 0;
  transform: translateX(-3px);
  transition:
    opacity 110ms ease,
    transform 110ms ease;
}

.ls-row:hover .ls-destination,
.ls-row:focus-visible .ls-destination {
  opacity: 1;
  transform: none;
}

.ls-legend {
  display: flex;
  margin: auto 8px 0;
  padding-top: 22px;
  flex: 0 0 auto;
  gap: 30px;
  color: #686b76;
  font-size: 0.75rem;
}

.directory-pane {
  max-width: 900px;
}

.directory-message {
  max-width: 650px;
  margin: 0;
  color: #aaa5a0;
  font: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
}

.back-command {
  margin-top: 30px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: #86709f;
  cursor: pointer;
}

.back-command:hover,
.back-command:focus-visible {
  color: var(--accent-bright);
}

/* Fastfetch ------------------------------------------------------------ */
.fastfetch-pane {
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) minmax(380px, 1fr);
  align-items: center;
  gap: 44px;
  max-width: 880px;
  margin: 0 auto;
}

.fastfetch-art {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9f80d9;
  text-shadow: 0 0 12px rgba(181, 142, 255, 0.15);
}

.fastfetch-art img {
  display: block;
  width: min(100%, 290px);
  height: auto;
  max-height: 320px;
  object-fit: contain;
  opacity: 1;
}

.fastfetch-title {
  color: var(--accent-bright);
}

.fastfetch-rule {
  width: 210px;
  height: 1px;
  margin: 5px 0 14px;
  background: linear-gradient(90deg, rgba(181, 142, 255, 0.55), transparent);
}

.fastfetch-data dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
}

.fastfetch-data dt {
  color: #a98ae1;
}
.fastfetch-data dd {
  margin: 0;
  color: #cac5c1;
}
.fastfetch-data .stack-break {
  grid-column: 1 / -1;
  height: 7px;
}

/* Text editors --------------------------------------------------------- */
.pane--lately,
.pane--text-file {
  padding: 0;
}

.nano-editor {
  display: flex;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
  border: 0;
  background: transparent;
}

.nano-titlebar,
.nano-status {
  flex: 0 0 auto;
}

.nano-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 7px 10px;
  background: #a995d0;
  color: #171922;
  font-size: 0.82rem;
}

.nano-titlebar strong {
  text-align: center;
  font-weight: 700;
}

.nano-titlebar span:last-child {
  color: rgba(23, 25, 34, 0.58);
  text-align: right;
}

.nano-body {
  min-height: 0;
  padding: 28px 32px;
  flex: 1 1 auto;
  color: #c9c4c0;
  font-size: 0.91rem;
  line-height: 1.72;
}

.nano-body h3 {
  margin: 0 0 8px;
  color: var(--accent-bright);
  font-size: 0.91rem;
  font-weight: 500;
}

.nano-body p {
  margin: 0 0 24px;
}

.nano-status {
  padding: 6px 10px;
  color: #aaa3ac;
  font-size: 0.78rem;
  text-align: center;
}

.nano-body--file {
  overflow: auto;
}

.nano-plain-text {
  margin: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
}

.inline-code {
  padding: 0.08em 0.32em;
  border: 1px solid rgba(181, 142, 255, 0.14);
  border-radius: 4px;
  background: rgba(181, 142, 255, 0.08);
  color: #d4baff;
  font: inherit;
}

.text-editor.is-vim .nano-titlebar {
  display: none;
}

/* Vim owns the body overflow so its status bar never scrolls away. */
.text-editor.is-vim .nano-body {
  position: relative;
  padding: 22px 26px 8px;
  overflow: auto;
  background: rgba(3, 6, 13, 0.34);
}

.text-editor.is-vim .nano-body::after {
  content: '~\A~\A~\A~\A~\A~\A~\A~\A~\A~\A~\A~';
  display: block;
  margin-top: 2px;
  color: rgba(181, 142, 255, 0.48);
  line-height: 1.72;
  white-space: pre;
  user-select: none;
  pointer-events: none;
}

.text-editor.is-vim .nano-body h3 {
  color: #c4a5f2;
}
.text-editor.is-vim .nano-body p {
  margin-bottom: 20px;
}

.text-editor.is-vim .nano-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 28px;
  padding: 5px 10px;
  border-top: 1px solid rgba(181, 142, 255, 0.16);
  background: rgba(153, 132, 190, 0.18);
  color: #d1cad6;
  font-size: 0.78rem;
  text-align: left;
}

.vim-status__path {
  min-width: 0;
  overflow: hidden;
  color: #d8c7f2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vim-status__details {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  color: #b6b0b9;
  white-space: nowrap;
}

.vim-status__modified {
  color: #807b84;
}

/* Prompt --------------------------------------------------------------- */
.terminal-prompt {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 47px;
  padding: 0 20px;
  border-top: 1px solid rgba(147, 161, 203, 0.1);
  background: transparent;
  color: #d7d2ce;
}

.prompt-prefix {
  flex: 0 0 auto;
  color: var(--accent-bright);
  white-space: nowrap;
}

/* app.js sizes this in ch units so the block cursor follows the command. */
.terminal-prompt input {
  width: 1ch;
  min-width: 0;
  max-width: calc(100% - 220px);
  height: 38px;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ece8e1;
  caret-color: transparent;
}

.terminal-prompt input:focus-visible {
  outline: 0;
}

.prompt-cursor {
  width: 8px;
  height: 15px;
  margin-left: 0;
  background: var(--accent);
  opacity: 0.82;
  animation: cursor-blink 1.05s steps(1) infinite;
}

.terminal-prompt:focus-within .prompt-cursor {
  opacity: 1;
}

@keyframes cursor-blink {
  50% {
    opacity: 0.12;
  }
}

/* Minimized terminals -------------------------------------------------- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 224px;
  align-items: stretch;
  gap: 16px;
  min-height: 224px;
  margin-top: auto;
}

.preview-card {
  display: flex;
  min-width: 0;
  min-height: 224px;
  height: 224px;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(149, 160, 196, 0.18);
  border-radius: 12px;
  background: rgba(5, 8, 16, 0.48);
  color: #bbb6b3;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.27),
    0 5px 15px rgba(0, 0, 0, 0.16),
    0 0 22px rgba(93, 67, 145, 0.04);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    border-color 120ms ease,
    transform 120ms ease,
    background 120ms ease;
}

.preview-card:hover,
.preview-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(181, 142, 255, 0.3);
  background: rgba(7, 10, 19, 0.7);
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.3),
    0 6px 17px rgba(0, 0, 0, 0.18),
    0 0 26px rgba(113, 80, 171, 0.065);
}

.preview-card > header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 37px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(149, 160, 196, 0.1);
  color: #e0dcd5;
  font-size: 0.78rem;
}

.preview-card > header strong {
  min-width: 0;
  font-weight: 500;
}

.preview-card > header span:last-child {
  justify-self: end;
  color: #a884e9;
  letter-spacing: 2px;
}

.preview-card__body {
  min-height: 0;
  padding: 14px 15px;
  flex: 1;
  font-size: 0.68rem;
  line-height: 1.55;
}

.preview-card > footer {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  overflow: hidden;
  border-top: 1px solid rgba(149, 160, 196, 0.09);
  color: #777482;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-whoami {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #918c8f;
}

.mini-whoami strong {
  color: #d8d2cc;
  font-weight: 500;
}

.mini-whoami > span {
  color: #8c8491;
}

.mini-whoami p {
  margin: 9px 0 0;
  color: #858187;
}

.mini-projects {
  display: grid;
  gap: 8px;
}

.mini-projects div {
  display: grid;
  grid-template-columns: 14px 76px 1fr;
  gap: 8px;
  min-width: 0;
}

.mini-projects b {
  color: #8f8a91;
  font-weight: 400;
}

.mini-projects strong {
  color: #d6d0c9;
  font-weight: 400;
}

.mini-projects span {
  overflow: hidden;
  color: #858187;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-fastfetch {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  overflow: hidden;
}

.mini-fastfetch dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  min-width: 0;
  margin: 0;
}

.mini-fastfetch dt {
  color: #9b7ed0;
}

.mini-fastfetch dd {
  margin: 0;
  overflow: hidden;
  color: #8f8b8d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-lately {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  overflow: hidden;
  color: #918c8f;
}

.mini-lately .mini-comment {
  margin: 0;
  color: #9f84c9;
  line-height: 1.35;
}

.mini-lately p {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Status panel --------------------------------------------------------- */
.status-panel {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 48px;
  margin-top: 0;
  padding: 0 clamp(20px, 3vw, 38px);
  padding-right: clamp(12px, 1.5vw, 20px);
  flex: 0 0 auto;
  border-top: 1px solid rgba(149, 160, 196, 0.13);
  background: linear-gradient(
    180deg,
    rgba(5, 8, 15, 0.6),
    rgba(3, 6, 12, 0.82)
  );
  color: #b89de0;
  font-size: 0.86rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.status-panel__state {
  color: #77747a;
  letter-spacing: 0.04em;
}

.moxie-button {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0;
  min-height: 48px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b89de0;
  cursor: pointer;
}

.moxie-button img {
  width: 74px;
  height: 42px;
  object-fit: contain;
  object-position: center;
}

.moxie-button:hover,
.moxie-button:focus-visible {
  color: var(--accent-bright);
}

/* Help dialog ---------------------------------------------------------- */
.help-dialog {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(181, 142, 255, 0.26);
  border-radius: 12px;
  background: rgba(5, 8, 16, 0.96);
  color: #c8c3c0;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
}

.help-dialog::backdrop {
  background: rgba(1, 3, 7, 0.64);
  backdrop-filter: blur(3px);
}

.help-dialog form > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.help-dialog form > header strong {
  color: var(--accent-bright);
}

.help-dialog form > header button {
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: #85818b;
  cursor: pointer;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 24px 28px 18px;
}

.help-grid h2 {
  margin: 0 0 12px;
  color: #a587d4;
  font-size: 0.8rem;
  font-weight: 500;
}

.help-grid dl {
  margin: 0;
}

.help-grid dl div {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 10px;
  padding: 4px 0;
}

.help-grid dt {
  color: #d8d2cc;
}
.help-grid dd {
  margin: 0;
  color: #7f7c81;
}

.help-window {
  grid-column: 1 / -1;
  padding-top: 4px;
  border-top: 1px solid rgba(149, 160, 196, 0.1);
}

.help-window dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.help-note {
  margin: 0 28px 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #74717a;
  font-size: 0.75rem;
}

.noscript-note {
  position: fixed;
  bottom: 58px;
  left: 50%;
  z-index: 70;
  padding: 8px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(181, 142, 255, 0.18);
  background: #090b12;
  color: #b6afb3;
  font-size: 0.75rem;
}

/* Window dragging and resize handle ----------------------------------- */
.draggable-terminal {
  --drag-x: 0px;
  --drag-y: 0px;
  position: relative;
  transform: translate3d(var(--drag-x), var(--drag-y), 0);
  will-change: transform;
}

.terminal-drag-handle {
  cursor: grab;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.terminal-drag-handle:hover {
  background-color: rgba(181, 142, 255, 0.018);
}
.terminal-drag-handle.is-grabbing {
  cursor: grabbing;
}

.terminal-drag-active,
.terminal-drag-active body,
.tab-drag-active,
.tab-drag-active body {
  user-select: none;
  -webkit-user-select: none;
}

.draggable-terminal.is-window-focused {
  isolation: isolate;
}

/* Keep hover feedback without replacing the translation used for dragging. */
.draggable-terminal.preview-card:hover,
.draggable-terminal.preview-card:focus-visible,
.draggable-terminal.preview-card.is-dragging {
  transform: translate3d(var(--drag-x), var(--drag-y), 0);
}

.terminal-window.is-dragging,
.terminal-window.is-resizing {
  border-color: rgba(181, 142, 255, 0.28);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.48),
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 0 40px rgba(119, 83, 184, 0.08),
    0 1px rgba(255, 255, 255, 0.025) inset;
}

.terminal-window.is-dragging .terminal-tabs,
.preview-card.is-dragging > header {
  background-color: rgba(181, 142, 255, 0.028);
}

.preview-card.is-dragging {
  border-color: rgba(181, 142, 255, 0.3);
  background: rgba(5, 8, 16, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none !important;
}

.preview-card.is-dragging > header {
  transition: none !important;
}

.terminal-resize-handle {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 8;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(181, 142, 255, 0.48);
  cursor: nwse-resize;
  touch-action: none;
}

.terminal-resize-handle svg {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
}

.terminal-resize-handle:hover,
.terminal-resize-handle:focus-visible,
.terminal-resize-handle.is-grabbing {
  background: rgba(181, 142, 255, 0.045);
  color: var(--accent-bright);
}

/* Resize-aware terminal contents -------------------------------------- */
/* drag.js sets these from the window's width and content height, not the viewport.
   Tight windows also have the compact class, so keep compact rules first. */
.terminal-window.is-resize-compact .terminal-tabs {
  height: 46px;
}

.terminal-window.is-resize-compact .terminal-tab-list .terminal-tab {
  min-width: 105px;
  padding-inline: 11px;
  font-size: 0.84rem;
}

.terminal-window.is-resize-compact .terminal-tabs__dots {
  right: 15px;
  font-size: 0.9rem;
}

.terminal-window.is-resize-compact .whoami-copy {
  padding: 28px 30px 22px;
}
.terminal-window.is-resize-compact .whoami-id strong {
  font-size: 0.98rem;
}
.terminal-window.is-resize-compact .whoami-id span {
  font-size: 0.78rem;
}
.terminal-window.is-resize-compact .identity-rule {
  margin: 10px 0 14px;
}

.terminal-window.is-resize-compact .whoami-prose {
  font-size: 0.84rem;
  line-height: 1.58;
}

.terminal-window.is-resize-compact .whoami-prose p {
  margin-bottom: 13px;
}

.terminal-window.is-resize-compact .social-links {
  gap: 18px;
  padding-top: 18px;
}

.terminal-window.is-resize-compact .social-links a,
.terminal-window.is-resize-compact .social-links svg {
  width: 18px;
  height: 18px;
}

.terminal-window.is-resize-compact .pane-inner {
  padding: 30px 34px;
}
.terminal-window.is-resize-compact .projects-pane {
  padding-top: 26px;
}

.terminal-window.is-resize-compact .path-heading {
  margin-bottom: 18px;
  font-size: 0.84rem;
}

.terminal-window.is-resize-compact .ls-row {
  grid-template-columns: 20px minmax(150px, 200px) minmax(0, 1fr) minmax(
      0,
      auto
    );
  min-height: 39px;
  padding: 7px 6px;
  font-size: 0.84rem;
}

.terminal-window.is-resize-compact .ls-destination,
.terminal-window.is-resize-compact .ls-legend {
  font-size: 0.7rem;
}

.terminal-window.is-resize-compact .ls-legend {
  gap: 22px;
}

.terminal-window.is-resize-compact .fastfetch-pane {
  grid-template-columns: minmax(160px, 0.62fr) minmax(300px, 1fr);
  gap: 34px;
  max-width: 780px;
}

.terminal-window.is-resize-compact .fastfetch-art img {
  width: min(100%, 200px);
  max-height: 245px;
}

.terminal-window.is-resize-compact .fastfetch-data {
  font-size: 0.84rem;
}
.terminal-window.is-resize-compact .fastfetch-data dl {
  gap: 5px 14px;
}

.terminal-window.is-resize-compact .fastfetch-rule {
  width: 185px;
  margin-bottom: 11px;
}

.terminal-window.is-resize-compact .nano-titlebar {
  padding: 6px 9px;
  font-size: 0.76rem;
}

.terminal-window.is-resize-compact .nano-body {
  padding: 23px 26px;
  font-size: 0.84rem;
  line-height: 1.58;
}

.terminal-window.is-resize-compact .nano-body h3 {
  margin-bottom: 6px;
  font-size: 0.84rem;
}

.terminal-window.is-resize-compact .nano-body p {
  margin-bottom: 18px;
}

.terminal-window.is-resize-compact .nano-status {
  padding: 5px 9px;
  font-size: 0.72rem;
}

.terminal-window.is-resize-compact .terminal-prompt {
  min-height: 42px;
  padding-inline: 14px;
  font-size: 0.82rem;
}

.terminal-window.is-resize-compact .terminal-prompt input {
  height: 32px;
}

.terminal-window.is-resize-compact .prompt-cursor {
  width: 7px;
  height: 13px;
}

.terminal-window.is-resize-tight .terminal-tabs {
  height: 42px;
}

.terminal-window.is-resize-tight .terminal-tab-list .terminal-tab {
  min-width: 88px;
  gap: 6px;
  padding-inline: 9px;
  font-size: 0.78rem;
}

.terminal-window.is-resize-tight .terminal-tab__icon {
  width: 14px;
  height: 14px;
}

.terminal-window.is-resize-tight .terminal-tab__close {
  width: 21px;
  height: 21px;
  font-size: 0.9rem;
}

.terminal-window.is-resize-tight .whoami-copy {
  padding: 20px 22px 16px;
  overflow: auto;
  scrollbar-width: thin;
}

.terminal-window.is-resize-tight .whoami-id strong {
  font-size: 0.9rem;
}
.terminal-window.is-resize-tight .whoami-id span {
  font-size: 0.72rem;
}

.terminal-window.is-resize-tight .identity-rule {
  width: min(250px, 82%);
  margin: 8px 0 10px;
}

.terminal-window.is-resize-tight .whoami-prose {
  font-size: 0.76rem;
  line-height: 1.48;
}

.terminal-window.is-resize-tight .whoami-prose p {
  margin-bottom: 10px;
}

.terminal-window.is-resize-tight .social-links {
  gap: 14px;
  margin-top: 10px;
  padding-top: 0;
}

.terminal-window.is-resize-tight .social-links a,
.terminal-window.is-resize-tight .social-links svg {
  width: 17px;
  height: 17px;
}

.terminal-window.is-resize-tight .whoami-visual img {
  object-position: center 42%;
}

.terminal-window.is-resize-tight .pane-inner {
  padding: 22px 24px;
  overflow: auto;
  scrollbar-width: thin;
}

.terminal-window.is-resize-tight .projects-pane {
  padding-top: 18px;
}

.terminal-window.is-resize-tight .path-heading {
  margin-bottom: 12px;
  font-size: 0.76rem;
}

.terminal-window.is-resize-tight .ls-row {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  min-height: 34px;
  padding: 5px 4px;
  font-size: 0.76rem;
}

.terminal-window.is-resize-tight .ls-destination {
  display: none;
}

.terminal-window.is-resize-tight .ls-description {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-window.is-resize-tight .ls-legend {
  gap: 16px;
  margin-inline: 4px;
  font-size: 0.65rem;
}

.terminal-window.is-resize-tight .fastfetch-pane {
  grid-template-columns: minmax(120px, 0.5fr) minmax(230px, 1fr);
  gap: 22px;
  max-width: 650px;
}

.terminal-window.is-resize-tight .fastfetch-art img {
  width: min(100%, 155px);
  max-height: 195px;
}

.terminal-window.is-resize-tight .fastfetch-data {
  font-size: 0.75rem;
}
.terminal-window.is-resize-tight .fastfetch-data dl {
  gap: 4px 11px;
}

.terminal-window.is-resize-tight .fastfetch-rule {
  width: 155px;
  margin: 4px 0 9px;
}

.terminal-window.is-resize-tight .nano-titlebar {
  padding: 5px 8px;
  font-size: 0.7rem;
}

.terminal-window.is-resize-tight .nano-body {
  padding: 17px 20px;
  overflow: auto;
  font-size: 0.76rem;
  line-height: 1.48;
  scrollbar-width: thin;
}

.terminal-window.is-resize-tight .nano-body h3 {
  margin-bottom: 5px;
  font-size: 0.76rem;
}

.terminal-window.is-resize-tight .nano-body p {
  margin-bottom: 13px;
}

.terminal-window.is-resize-tight .nano-status {
  padding: 4px 8px;
  font-size: 0.68rem;
}

.terminal-window.is-resize-tight .back-command {
  margin-top: 18px;
}

.terminal-window.is-resize-tight .terminal-prompt {
  min-height: 38px;
  padding-inline: 11px;
  font-size: 0.74rem;
}

.terminal-window.is-resize-tight .terminal-prompt input {
  height: 29px;
  max-width: calc(100% - 180px);
}

.terminal-window.is-resize-tight .prompt-cursor {
  width: 6px;
  height: 12px;
}

/* Window manager and detachable tabs ---------------------------------- */
.terminal-tabs.is-tab-drop-target {
  background: rgba(24, 18, 38, 0.76);
  box-shadow: inset 0 -2px rgba(181, 142, 255, 0.62);
}

.terminal-tabs.is-tab-drop-target::after {
  content: '+ tab';
  position: absolute;
  top: 50%;
  right: 55px;
  z-index: 5;
  padding: 3px 7px;
  transform: translateY(-50%);
  border: 1px solid rgba(181, 142, 255, 0.26);
  border-radius: 5px;
  background: rgba(8, 10, 18, 0.78);
  color: #bca4e7;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.terminal-tab-drag-ghost {
  position: fixed;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
  max-width: 230px;
  padding: 0 15px;
  overflow: hidden;
  transform: translateZ(0);
  border: 1px solid rgba(181, 142, 255, 0.34);
  border-radius: 7px 7px 2px 2px;
  background: rgba(12, 14, 25, 0.96);
  color: #d2ccd0;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.48),
    0 0 26px rgba(119, 83, 184, 0.08);
  pointer-events: none;
  will-change: left, top;
}

.terminal-tab-drag-ghost .terminal-tab__icon {
  flex: 0 0 auto;
}

.terminal-tab-drag-ghost .terminal-tab__label {
  font-weight: 600;
}

.terminal-tab-drag-ghost.is-detaching {
  border-color: rgba(181, 142, 255, 0.62);
  background: rgba(19, 16, 31, 0.97);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.52),
    0 0 32px rgba(142, 100, 214, 0.13);
}

.terminal-tab-list.is-tab-reorder-target::after {
  content: '';
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: var(--tab-insert-x, 8px);
  z-index: 20;
  width: 2px;
  border-radius: 999px;
  background: rgba(190, 153, 255, 0.88);
  box-shadow: 0 0 10px rgba(181, 142, 255, 0.44);
  pointer-events: none;
}

.terminal-window[data-window-mode='maximized'],
.terminal-window[data-window-mode^='snapped-'] {
  transition:
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.terminal-window[data-window-mode='maximized'] {
  border-color: rgba(181, 142, 255, 0.25);
}

/* Responsive layout --------------------------------------------------- */
@media (max-width: 1120px) {
  :root {
    --primary-terminal-height: 470px;
  }

  .panel-identity {
    display: none;
  }
  .top-nav {
    gap: 17px;
  }

  .site-main {
    width: min(960px, calc(100% - 42px));
    padding-top: 96px;
  }

  .whoami-copy {
    padding: 32px 30px 26px;
  }
}

/* Dragging and window controls are intentionally desktop-pointer features. */
@media (max-width: 840px), (pointer: coarse) {
  .draggable-terminal {
    transform: none !important;
    will-change: auto;
  }

  .terminal-drag-handle {
    cursor: default;
  }
  .terminal-resize-handle {
    display: none;
  }

  .terminal-tab-list {
    padding-right: 48px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .terminal-tab-list::-webkit-scrollbar {
    display: none;
  }

  .terminal-tab-list .terminal-tab {
    min-width: 158px;
    flex: 0 0 158px;
    cursor: default;
  }

  .terminal-tabs.is-tab-drop-target::after,
  .terminal-tab-drag-ghost,
  .terminal-tab-list.is-tab-reorder-target::after {
    display: none;
  }

  .terminal-slot {
    height: auto !important;
  }
  .help-window dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  :root {
    --primary-terminal-height: auto;
  }

  body {
    font-size: 14px;
  }

  .top-panel {
    height: 48px;
  }
  .top-panel__utility {
    left: 16px;
  }

  .help-button {
    right: 16px;
    font-size: 0;
  }

  .help-button span {
    font-size: 1rem;
  }
  .top-nav {
    gap: 11px;
  }

  .top-nav__link {
    padding-left: 12px;
    font-size: 0.82rem;
  }

  .site-main {
    width: calc(100% - 24px);
    min-height: calc(100dvh - 48px);
    padding-top: 72px;
  }

  .terminal-tabs {
    height: 46px;
  }

  .terminal-stage,
  .pane,
  .pane-inner,
  .nano-editor {
    height: auto;
    min-height: 0;
  }

  .pane--whoami {
    grid-template-columns: 1fr;
    grid-template-rows: 245px auto;
  }

  .whoami-divider {
    display: none;
  }

  .whoami-visual {
    grid-row: 1;
  }

  .whoami-visual::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 35px;
    background: linear-gradient(transparent, rgba(3, 7, 15, 0.8));
  }

  .whoami-visual img {
    object-position: center 38%;
  }

  .whoami-copy {
    grid-row: 2;
    min-height: 390px;
    padding: 28px 28px 24px;
  }

  .whoami-prose {
    max-width: none;
  }

  .social-links {
    margin-top: 25px;
    padding-top: 0;
  }

  .pane-inner {
    padding: 30px 25px;
  }

  .ls-row {
    grid-template-columns: 20px minmax(160px, 200px) minmax(0, 1fr);
  }

  .ls-destination {
    display: none;
  }

  .nano-titlebar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    min-height: 0;
    margin-top: 18px;
  }

  .preview-card {
    height: auto;
  }

  .status-panel {
    grid-template-columns: 1fr auto;
  }
  .status-panel__state {
    display: none;
  }
  .moxie-button {
    margin-right: -4px;
  }
}

@media (max-width: 700px) {
  .vim-status__modified {
    display: none;
  }
  .text-editor.is-vim .nano-body {
    padding-inline: 18px;
  }
}

@media (max-width: 590px) {
  .top-panel__utility {
    left: 12px;
  }
  .home-button {
    font-size: 0.98rem;
  }

  .top-nav {
    gap: 5px;
  }

  .top-nav__link {
    padding: 9px 3px 10px 10px;
    font-size: 0.72rem;
  }

  .top-nav__link.is-active::after {
    width: 30px;
  }
  .help-button {
    right: 11px;
  }

  .site-main {
    width: calc(100% - 16px);
  }
  .terminal-window {
    border-radius: 12px;
  }

  .terminal-tab {
    padding: 0 12px;
  }

  .terminal-tabs__dots {
    right: 12px;
  }
  .pane--whoami {
    grid-template-rows: 218px auto;
  }

  .whoami-copy {
    min-height: 420px;
    padding: 24px 20px 22px;
  }

  .whoami-prose {
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .identity-rule {
    margin-bottom: 17px;
  }
  .social-links a::after {
    display: none;
  }

  .terminal-prompt {
    gap: 6px;
    padding: 0 11px;
    font-size: 0.72rem;
  }

  .prompt-prefix {
    font-size: 0;
  }

  .prompt-prefix::after {
    content: '~$';
    font-size: 0.78rem;
  }

  .terminal-prompt input {
    max-width: calc(100% - 45px);
  }

  .ls-row {
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 54px;
    padding: 8px 3px;
    font-size: 0.79rem;
  }

  .ls-description {
    grid-column: 2;
  }

  .ls-legend {
    flex-direction: column;
    gap: 4px;
  }

  .fastfetch-pane {
    display: block;
    padding-top: 28px;
  }

  .fastfetch-art {
    display: none;
  }

  .fastfetch-data dl {
    grid-template-columns: 88px 1fr;
    gap: 8px;
  }

  .nano-titlebar {
    grid-template-columns: auto 1fr;
  }

  .nano-titlebar strong {
    text-align: right;
  }
  .nano-titlebar span:last-child {
    display: none;
  }

  .nano-body {
    padding: 24px 17px;
    font-size: 0.82rem;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    min-height: 54px;
    padding: 0 14px;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .help-grid dl div {
    grid-template-columns: 145px 1fr;
  }
  .help-note {
    margin: 0 20px 20px;
  }

  .terminal-window.is-resize-compact .ls-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .terminal-window.is-resize-compact .ls-description {
    grid-column: 2;
  }
}

@media (min-width: 841px) and (pointer: fine) {
  /* The dock occupies the second row and stays centered above the footer. */
  .site-main {
    display: grid;
    grid-template-rows: auto minmax(224px, 1fr);
    row-gap: 0;
    padding-bottom: 0;
  }

  .terminal-slot {
    grid-row: 1;
  }

  .preview-grid {
    grid-row: 2;
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Snapped windows leave normal flow; drag.js supplies their geometry. */
  .terminal-window[data-window-mode='maximized'],
  .terminal-window[data-window-mode^='snapped-'] {
    position: fixed;
    margin: 0;
  }
}

@media (min-width: 841px) and (max-width: 1120px) {
  .site-main.is-terminal-closed .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 841px) and (max-width: 1120px) and (pointer: fine) {
  .site-main {
    padding-top: 108px;
  }
}

@media (min-width: 1121px) {
  .status-panel {
    padding-left: 30px;
  }

  .site-main.is-terminal-closed .preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1121px) and (pointer: fine) {
  .site-main {
    padding-top: 134px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .prompt-cursor,
  .pane,
  body::after {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }

  .terminal-drag-handle {
    transition: none;
  }
}
