* {
  box-sizing: border-box;
}

:root {
  --bg: #050807;
  --panel: rgba(6, 18, 12, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(120, 255, 170, 0.18);
  --line-strong: rgba(120, 255, 170, 0.34);
  --text: #f1fff4;
  --muted: #a8b9ad;
  --green: #80ff9f;
  --cyan: #89e8ff;
  --amber: #ffcf47;
  --violet: #b794ff;
  --orange: #ff9f45;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 207, 71, 0.18), transparent 23rem),
    radial-gradient(circle at 86% 54%, rgba(137, 232, 255, 0.12), transparent 27rem),
    radial-gradient(circle at 14% 88%, rgba(183, 148, 255, 0.1), transparent 28rem),
    linear-gradient(135deg, #050807, #08100d 44%, #11130f);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 255, 170, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 255, 170, 0.075) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.66), transparent 94%);
  animation: gridDrift 18s linear infinite;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(128, 255, 159, 0.035) 51%);
  background-size: 100% 6px;
  mix-blend-mode: screen;
  opacity: 0.42;
  pointer-events: none;
}

a {
  color: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 62px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: stretch;
  min-height: min(760px, calc(100vh - 80px));
}

.terminal,
.profile-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.045), 0 34px 120px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.terminal {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 22px;
  overflow: hidden;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 72%) var(--my, 26%), rgba(128, 255, 159, 0.13), transparent 18rem);
  pointer-events: none;
}

.bar {
  position: relative;
  z-index: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: #ff5f57;
}

.dot:nth-child(2) {
  background: #ffbd2e;
}

.dot:nth-child(3) {
  background: #28c840;
}

.title {
  margin-left: 10px;
  color: #98ffbb;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.code {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(20px, 3.2vw, 32px);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.78;
  font-size: clamp(12px, 1.05vw, 15px);
}

.code-line {
  min-height: 1.78em;
}

.terminal-link {
  color: var(--cyan);
  text-decoration: none;
}

.terminal-link:hover,
.terminal-link:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.prompt {
  color: var(--amber);
}

.muted {
  color: #78a386;
}

.string {
  color: var(--cyan);
}

.key {
  color: var(--green);
}

.comment {
  color: #7ca58a;
}

.cursor {
  display: inline-block;
  min-width: 10px;
  width: 10px;
  height: 1.2em;
  margin-left: 4px;
  background: var(--green);
  vertical-align: -0.2em;
  animation: blink 1s steps(2, end) infinite;
}

.terminal-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: thin;
}

.terminal-actions a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  color: #d9f7df;
  font-size: 11px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.terminal-actions a span {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
  overflow: hidden;
  white-space: nowrap;
}

.terminal-actions a.primary {
  color: #06120a;
  background: linear-gradient(135deg, #80ff9f, #ffcf47);
  border-color: transparent;
  font-weight: 800;
}

.terminal-actions a:hover,
.terminal-actions a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  box-shadow: 0 0 28px rgba(128, 255, 159, 0.12);
}

.terminal-actions a.primary:hover {
  color: #06120a;
  background: linear-gradient(135deg, #9dffb5, #ffd96e);
}

.profile {
  display: grid;
  align-items: stretch;
}

.profile-card {
  position: relative;
  width: min(100%, 650px);
  height: 100%;
  justify-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 207, 71, 0.16), transparent 15rem),
    linear-gradient(120deg, rgba(128, 255, 159, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(90deg, transparent, rgba(128, 255, 159, 0.11), transparent),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.025) 18px 19px);
  opacity: 0.7;
  pointer-events: none;
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

.identity {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
}

.avatar-shell {
  position: relative;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--amber), var(--green), var(--cyan), var(--amber));
  box-shadow: 0 0 70px rgba(128, 255, 159, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.avatar-shell::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(5, 8, 7, 0.82);
}

.avatar {
  position: relative;
  z-index: 1;
  width: 118px;
  height: 118px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(5, 8, 7, 0.88);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.role {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 0.96;
  letter-spacing: 0;
}

.bio-copy {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
}

.lead {
  margin: 0;
  color: #c7d8cf;
  line-height: 1.72;
  font-size: 16px;
}

.lead + .lead {
  margin-top: 12px;
}

.inline-link {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 207, 71, 0.52);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.inline-link:hover {
  color: #fff;
  border-color: transparent;
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.meta-tile {
  min-height: 84px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.052);
}

.meta-tile i {
  color: var(--amber);
  margin-bottom: 10px;
}

.meta-tile b {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
}

.meta-tile span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

@keyframes gridDrift {
  to {
    background-position: 34px 34px;
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .profile-card {
    width: 100%;
    justify-self: stretch;
  }

  .terminal,
  .profile-card {
    backdrop-filter: none;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 14px;
  }

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

  .avatar-shell {
    width: 112px;
    height: 112px;
  }

  .avatar {
    width: 102px;
    height: 102px;
    border-width: 4px;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }

  body::before {
    animation: none;
  }

  body::after {
    opacity: 0.22;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
