:root {
  --bg: #0c0d0b;
  --panel: #151713;
  --panel-strong: #1f231c;
  --line: #34382e;
  --text: #f4f0e8;
  --muted: #a8ab9c;
  --soft: #d6d1c4;
  --green: #8fd16a;
  --yellow: #f1c75b;
  --red: #ef6b5d;
  --blue: #80b8ff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), var(--bg);
  background-size: 44px 44px;
  color: var(--text);
}

body {
  min-width: 320px;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(410px, 1.45fr) minmax(250px, 0.8fr);
  gap: 14px;
  height: 100dvh;
  padding: 14px;
}

.profile-panel,
.terminal-panel,
.guide-panel {
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(21, 23, 19, 0.92);
  box-shadow: var(--shadow);
}

.profile-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 18px);
  padding: clamp(12px, 1.6vw, 18px);
  overflow: hidden;
}

.avatar-frame {
  position: relative;
  width: clamp(138px, 14vw, 190px);
  height: clamp(138px, 14vw, 190px);
  flex: 0 0 auto;
  align-self: center;
  border: 1px solid #4a503f;
  background: var(--panel-strong);
  clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
  overflow: hidden;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(244, 240, 232, 0.24);
  pointer-events: none;
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(1.05);
}

.identity {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.eyebrow,
.location,
.status-grid span,
.data-card span,
.terminal-topbar,
.entry-command {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(2rem, 3.15vw, 3.35rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.location {
  margin-top: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1vh, 10px);
}

.status-grid div,
.data-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: clamp(9px, 1.1vw, 12px);
}

.status-grid span,
.data-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.status-grid strong,
.data-card strong {
  display: block;
  font-size: clamp(0.82rem, 1.05vw, 0.98rem);
  line-height: 1.25;
}

.contact-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: auto;
}

.contact-strip a,
.command-line button,
.ghost-button,
.wide-command,
.chip {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.contact-strip a {
  min-height: clamp(34px, 5vh, 42px);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: clamp(0.78rem, 1vw, 1rem);
}

.contact-strip a:hover,
.command-line button:hover,
.ghost-button:hover,
.wide-command:hover,
.chip:hover {
  border-color: var(--green);
  background: #27301f;
}

.terminal-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 4px
    ),
    #080a07;
}

.terminal-topbar {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 999px;
}

.red {
  background: var(--red);
}

.amber {
  background: var(--yellow);
}

.green {
  background: var(--green);
}

.ghost-button {
  min-width: 72px;
  min-height: 32px;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px 18px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  font-family: var(--mono);
  font-size: 0.94rem;
}

.entry {
  padding-left: 0;
}

.entry-command {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--green);
}

.entry-output {
  color: #d8ddcc;
  line-height: 1.5;
  padding-left: 2ch;
}

.entry-output strong {
  color: #fff9d9;
  font-weight: 700;
}

.entry-output ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.entry-output li + li {
  margin-top: 4px;
}

.command-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #070907;
  font-family: var(--mono);
}

.command-line label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.prompt {
  color: var(--green);
  font-family: var(--mono);
  white-space: nowrap;
}

.command-line input {
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  color: #f5f7ed;
  padding: 0;
  outline: none;
  caret-color: var(--green);
  font-family: var(--mono);
}

.command-line input:focus {
  border-color: transparent;
}

.command-line button {
  height: 30px;
  padding: 0 10px;
  border-color: rgba(143, 209, 106, 0.35);
  background: transparent;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 800;
}

.cursor {
  width: 8px;
  height: 17px;
  border: 1px solid var(--green);
  animation: blink 1s steps(2, start) infinite;
}

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

.guide-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.panel-heading h2 {
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.chips {
  display: grid;
  gap: 8px;
}

.chip {
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
  font-family: var(--mono);
  color: var(--soft);
}

.data-card {
  line-height: 1.4;
}

.data-card p {
  margin-top: 8px;
  color: var(--muted);
}

.compact {
  margin-top: auto;
}

.wide-command {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  text-align: left;
  padding: 0 12px;
  font-family: var(--mono);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(230px, 0.85fr) minmax(0, 1.35fr);
  }

  .profile-panel {
    gap: 12px;
  }

  .avatar-frame {
    width: clamp(118px, 20vw, 152px);
    height: clamp(118px, 20vw, 152px);
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(1.85rem, 3.7vw, 2.55rem);
  }

  .status-grid strong,
  .data-card strong {
    font-size: 0.9rem;
  }

  .guide-panel {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 721px) {
  .profile-panel {
    gap: 9px;
    padding: 12px;
  }

  .avatar-frame {
    width: clamp(112px, 13vh, 136px);
    height: clamp(112px, 13vh, 136px);
  }

  .identity {
    padding-bottom: 10px;
  }

  .eyebrow {
    margin-bottom: 6px;
  }

  h1 {
    font-size: clamp(1.75rem, 2.7vw, 2.65rem);
    line-height: 0.98;
  }

  .location {
    margin-top: 8px;
  }

  .status-grid div,
  .data-card {
    padding: 8px;
  }

  .status-grid span,
  .data-card span {
    margin-bottom: 5px;
    font-size: 0.68rem;
  }

  .contact-strip {
    gap: 6px;
  }

  .contact-strip a {
    min-height: 31px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow: hidden;
  }

  .shell {
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 0.42fr) minmax(0, 0.58fr);
    gap: 10px;
    padding: 10px;
  }

  .profile-panel {
    min-height: 0;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px;
    overflow: hidden;
  }

  .terminal-panel {
    min-height: 0;
  }

  .avatar-frame {
    width: 82px;
    height: 82px;
    grid-row: 1 / 3;
    align-self: start;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.55rem, 6.8vw, 2.25rem);
    line-height: 1;
  }

  .identity {
    padding-bottom: 7px;
  }

  .status-grid {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-self: start;
  }

  .status-grid div {
    padding: 6px 7px;
  }

  .status-grid strong {
    font-size: 0.72rem;
  }

  .status-grid span {
    margin-bottom: 3px;
    font-size: 0.62rem;
  }

  .contact-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 0;
    gap: 6px;
  }

  .contact-strip a {
    min-height: 32px;
    font-size: 0.72rem;
  }

  .terminal-topbar {
    min-height: 40px;
  }

  .screen {
    padding: 12px;
  }

  .command-line {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .command-line button {
    display: none;
  }

  .prompt {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .shell {
    grid-template-rows: minmax(220px, 0.38fr) minmax(0, 0.62fr);
  }

  .profile-panel {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 7px 9px;
  }

  .avatar-frame {
    width: 66px;
    height: 66px;
  }

  h1 {
    font-size: clamp(1.35rem, 7.4vw, 1.8rem);
  }

  .location,
  .eyebrow {
    font-size: 0.68rem;
  }

  .location {
    margin-top: 5px;
  }

  .status-grid {
    display: grid;
  }

  .contact-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-strip a {
    min-height: 29px;
  }
}
