:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0d1420;
  --panel-2: #111a29;
  --ink: #d8f3ff;
  --muted: #8ca3b8;
  --line: #243246;
  --green: #5eead4;
  --blue: #7dd3fc;
  --amber: #fbbf24;
  --red: #fb7185;
  --shadow: 0 26px 90px rgb(0 0 0 / 45%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family:
    "Cascadia Code", "Fira Code", Consolas, "SFMono-Regular", ui-monospace,
    monospace;
  background:
    linear-gradient(rgb(94 234 212 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 211 252 / 4%) 1px, transparent 1px),
    radial-gradient(circle at 15% 10%, rgb(94 234 212 / 18%), transparent 28rem),
    radial-gradient(circle at 85% 80%, rgb(125 211 252 / 13%), transparent 26rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--ink);
}

@supports (min-height: 100svh) {
  body {
    min-height: 100svh;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgb(255 255 255 / 3%) 50%, transparent 50%),
    linear-gradient(90deg, rgb(255 0 0 / 2%), rgb(0 255 255 / 2%));
  background-size: 100% 4px, 6px 100%;
  mix-blend-mode: screen;
  opacity: 0.38;
}

.shell {
  position: relative;
  width: min(100%, 980px);
}

.terminal {
  overflow: hidden;
  border: 1px solid rgb(125 211 252 / 22%);
  border-radius: 8px;
  background: linear-gradient(180deg, rgb(17 26 41 / 94%), rgb(7 11 18 / 96%));
  box-shadow: var(--shadow), inset 0 0 0 1px rgb(255 255 255 / 4%);
}

.terminal-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgb(13 20 32 / 96%);
}

.dot {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
}

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

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

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

.terminal-title {
  min-width: 0;
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-body {
  min-height: 0;
  padding: clamp(22px, 5vw, 54px);
}

.line {
  min-height: 1.7em;
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.prompt {
  color: var(--green);
  margin-right: 10px;
}

.typed {
  white-space: pre-wrap;
}

.typed.is-active::after {
  content: "";
  display: inline-block;
  width: 0.65ch;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--green);
  animation: blink 900ms steps(2, start) infinite;
}

.output {
  color: var(--ink);
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(112px, 17vw, 148px);
  gap: clamp(18px, 4vw, 38px);
  align-items: start;
  margin: 6px 0 34px;
}

.identity {
  min-width: 0;
}

.profile-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 6px 0 0;
  overflow: hidden;
  border: 1px solid rgb(94 234 212 / 45%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(94 234 212 / 15%), rgb(125 211 252 / 8%)),
    var(--panel-2);
  box-shadow:
    0 0 28px rgb(94 234 212 / 12%),
    inset 0 0 0 1px rgb(255 255 255 / 5%);
}

.profile-photo::before {
  content: "BN";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(216 243 255 / 72%);
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 800;
}

.profile-photo::after {
  content: "profile.png";
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: var(--muted);
  font-size: 0.68rem;
}

.profile-photo:not(.is-empty)::before,
.profile-photo:not(.is-empty)::after {
  display: none;
}

.profile-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

@supports not (aspect-ratio: 1) {
  .profile-photo::before {
    position: static;
    content: "";
    display: block;
    padding-top: 100%;
  }

  .profile-photo.is-empty::before {
    content: "BN";
    position: absolute;
    padding-top: 0;
  }

  .profile-photo img {
    position: absolute;
    inset: 0;
  }
}

h1 {
  min-height: 0;
  margin: 0 0 8px;
  color: var(--blue);
  font-size: clamp(2.35rem, 7vw, 5.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: visible;
  text-shadow: 0 0 24px rgb(125 211 252 / 22%);
}

.role {
  min-height: 0;
  margin: 0;
  color: var(--green);
  font-size: clamp(1rem, 2.5vw, 1.55rem);
  line-height: 1.5;
}

.focus-list {
  display: grid;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  color: #c7d8e8;
  list-style: none;
  line-height: 1.65;
}

.focus-list li {
  overflow-wrap: anywhere;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgb(94 234 212 / 42%);
  border-radius: 6px;
  background: rgb(94 234 212 / 8%);
  color: var(--green);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.links a::before {
  content: "./";
  color: var(--muted);
}

.links a:hover,
.links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: rgb(125 211 252 / 13%);
  color: var(--blue);
  outline: none;
}

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

@media (max-width: 680px) {
  body {
    display: block;
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .terminal-body {
    padding: 18px;
  }

  .line {
    display: grid;
    gap: 2px;
  }

  .prompt {
    margin-right: 0;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.7rem);
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
  }

  .profile-photo {
    grid-row: 1;
    width: min(116px, 34vw);
  }

  .links a {
    flex: 1 1 120px;
  }
}

@media (max-width: 380px) {
  body {
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  .terminal-bar {
    min-height: 40px;
    gap: 7px;
    padding: 0 10px;
  }

  .dot {
    width: 10px;
  }

  .terminal-body {
    padding: 14px;
  }

  h1 {
    font-size: clamp(1.75rem, 10.5vw, 2.45rem);
  }

  .role,
  .line,
  .focus-list {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
