:root {
  --background: #000000;
  --foreground: #ffffff;
  --secondary: rgba(29, 29, 34, 0.72);
  --secondary-strong: rgba(39, 39, 46, 0.95);
  --muted: #a0a0b0;
  --muted-soft: #7f7f8d;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --card-glass: rgba(0, 0, 0, 0.34);
  --progress-bg: rgba(255, 255, 255, 0.08);
  --progress-fill: rgba(255, 255, 255, 0.58);
  --status-online: #34d399;
  --status-idle: #f59e0b;
  --status-dnd: #ef4444;
  --status-offline: #6b7280;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "JetBrains Mono", monospace;
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.route-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.glass-card {
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.profile-card {
  width: min(95vw, 960px);
  border-radius: 18px;
  overflow: hidden;
  animation: card-rise 320ms ease-out;
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab,
.help-button,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-tab {
  padding: 6px 10px;
  font-size: 0.74rem;
  text-transform: lowercase;
}

.nav-tab-active {
  color: var(--foreground);
}

.nav-tab-inactive:hover,
.nav-tab-inactive:focus-visible,
.help-button:hover,
.help-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  color: var(--foreground);
}

.help-button {
  padding: 6px 8px;
  font-size: 0.78rem;
}

.card-body {
  padding: 20px;
}

.tab-panel {
  display: grid;
  gap: 16px;
  animation: tab-fade 180ms ease;
}

.tab-panel[hidden] {
  display: none !important;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}

.home-grid > * {
  min-width: 0;
}

.home-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
}

@keyframes tab-fade {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.9rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy p,
.section-kicker,
.status-subline,
.track-copy p,
.project-head p,
.contact-label,
.contact-value,
.terminal-title,
.terminal-output,
.terminal-input::placeholder {
  color: var(--muted);
}

.hero-copy p {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.55;
}

.section-kicker {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
}

.info-panel,
.content-section {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.28);
  transition: border-color 180ms ease, background 180ms ease;
}

.info-panel:hover,
.content-section:hover {
  border-color: var(--border-strong);
}

.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.status-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.status-avatar,
.track-art {
  display: block;
  object-fit: cover;
}

.status-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--status-online);
}

.status-copy {
  display: grid;
  gap: 3px;
  flex: 1;
}

.status-name {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
}

.status-subline {
  font-size: 0.72rem;
}

.status-presence {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.status-presence-text,
.status-presence-subline {
  font-size: 0.72rem;
  color: var(--muted);
}

.status-dot-online {
  background: var(--status-online);
}

.status-dot-idle {
  background: var(--status-idle);
}

.status-dot-dnd {
  background: var(--status-dnd);
}

.status-dot-offline {
  background: var(--status-offline);
}

.music-section {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 18% 10%, rgba(130, 156, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.94) 0%, rgba(8, 8, 12, 0.92) 100%),
    rgba(18, 18, 22, 0.28);
}

.music-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.track-row,
.controls-row,
.control-group,
.volume-group,
.time-row,
.project-head,
.contact-link,
.contact-copy,
.terminal-input-row,
.terminal-lights {
  display: flex;
}

.track-row {
  align-items: center;
  flex: 1 1 220px;
  gap: 12px;
  min-width: 0;
}

.track-eyebrow {
  color: var(--muted-soft);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-art {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.track-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
  cursor: pointer;
}

.track-chip {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-copy h3,
.project-head h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.track-copy p,
.project-head p,
.contact-label,
.contact-value,
.volume-value,
.time-row span,
.terminal-output,
.terminal-input,
.terminal-prompt {
  font-size: 0.74rem;
}

.track-copy p,
.project-head p {
  margin: 0;
  line-height: 1.45;
}

.controls-row {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.control-group,
.volume-group {
  align-items: center;
  gap: 10px;
}

.control-group {
  flex: 0 0 auto;
}

.volume-group {
  flex: 1 1 180px;
  justify-content: flex-end;
  min-width: 0;
}

.icon-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.play-button {
  color: var(--foreground);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
}

.ios-slider {
  --slider-progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.ios-slider:focus-visible {
  outline: none;
}

.ios-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.92) var(--slider-progress),
      rgba(255, 255, 255, 0.12) var(--slider-progress),
      rgba(255, 255, 255, 0.12) 100%
    );
  transition: background 180ms ease;
}

.ios-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ios-slider:hover::-webkit-slider-thumb,
.ios-slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.44);
}

.ios-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

.ios-slider::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.ios-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.ios-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ios-slider:active::-moz-range-thumb {
  transform: scale(1.1);
}

.ios-slider-progress {
  --slider-progress: 0%;
}

.ios-slider-volume {
  flex: 0 1 88px;
  --slider-progress: 50%;
  width: 88px;
}

.progress-row {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.volume-label,
.volume-value,
.time-row span {
  color: var(--muted);
}

.time-row {
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.time-row span:last-child {
  text-align: right;
}

.project-card,
.contact-link {
  padding: 14px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  background:
    linear-gradient(90deg, rgba(4, 4, 6, 0.99) 0%, rgba(6, 6, 10, 0.96) 58%, rgba(7, 7, 10, 0.92) 100%),
    rgba(18, 18, 22, 0.28);
  isolation: isolate;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -10% -12% -10% 44%;
  background-image: url("/tienbio/assets/tien65.png");
  background-repeat: no-repeat;
  background-size: 188%;
  background-position: 82% 50%;
  opacity: 0.12;
  transform: scale(1.22);
  filter: saturate(0.7) brightness(0.2) contrast(1.05) blur(1.2px);
  z-index: -2;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.46) 0%, rgba(0, 0, 0, 0.24) 38%, rgba(0, 0, 0, 0.14) 100%),
    linear-gradient(180deg, rgba(6, 7, 10, 0.16), rgba(6, 7, 10, 0.06));
  z-index: -1;
}

.project-card-main::before {
  background-position: 78% 18%;
}

.project-card-roblox::before {
  background-position: 84% 48%;
  filter: hue-rotate(30deg) saturate(0.76) brightness(0.18) contrast(1.08) blur(1.2px);
}

.project-card-web::before {
  background-position: 82% 78%;
  filter: hue-rotate(-24deg) saturate(0.72) brightness(0.2) contrast(1.06) blur(1.2px);
}

.project-card-main::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 0.12) 100%),
    radial-gradient(circle at 88% 34%, rgba(116, 143, 255, 0.16), transparent 30%);
}

.project-card-roblox::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 0.12) 100%),
    radial-gradient(circle at 86% 54%, rgba(178, 88, 255, 0.18), transparent 34%);
}

.project-card-web::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 0.12) 100%),
    radial-gradient(circle at 88% 76%, rgba(114, 170, 255, 0.16), transparent 30%);
}

.project-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-link {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tech-row span {
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--muted);
  font-size: 0.68rem;
}

.contact-panel {
  gap: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-link {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  gap: 12px;
  min-height: 116px;
  background:
    linear-gradient(125deg, rgba(5, 5, 7, 0.99) 0%, rgba(8, 8, 12, 0.96) 60%, rgba(8, 8, 12, 0.92) 100%),
    rgba(18, 18, 22, 0.28);
  isolation: isolate;
}

.contact-link::before {
  content: "";
  position: absolute;
  inset: -6% -10% -6% 48%;
  background-image: url("/tienbio/assets/tien65.png");
  background-size: 210%;
  background-position: 84% 52%;
  background-repeat: no-repeat;
  opacity: 0.08;
  transform: scale(1.2);
  filter: saturate(0.66) brightness(0.18) contrast(1.06) blur(1.3px);
  z-index: -2;
}

.contact-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 40%, rgba(0, 0, 0, 0.1) 100%),
    radial-gradient(circle at 88% 20%, rgba(114, 152, 255, 0.12), transparent 26%);
  z-index: -1;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.contact-copy {
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.contact-value {
  color: rgba(255, 255, 255, 0.84);
}

.contact-arrow {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  line-height: 1;
}

.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}

.terminal-overlay.is-hidden {
  display: none;
}

.terminal-dialog {
  width: min(100%, 520px);
  overflow: hidden;
  border-radius: 14px;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.48);
}

.terminal-lights {
  gap: 6px;
}

.light {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.light-red {
  background: rgba(239, 68, 68, 0.85);
}

.light-yellow {
  background: rgba(245, 158, 11, 0.85);
}

.light-green {
  background: rgba(34, 197, 94, 0.85);
}

.terminal-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(0, 0, 0, 0.76);
}

.terminal-line {
  margin-bottom: 6px;
  white-space: pre-wrap;
}

.terminal-input-row {
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.terminal-prompt {
  color: rgba(255, 255, 255, 0.95);
}

.terminal-input {
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  outline: none;
}

.prank-hotspot {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 18;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: crosshair;
}

.prank-terminal {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 22;
  width: min(92vw, 560px);
  pointer-events: none;
}

.prank-terminal.is-hidden {
  display: none;
}

.prank-cmd {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 2px;
  background: #050505;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.72);
  color: #d8ffd2;
  pointer-events: auto;
  animation: prank-pop 180ms ease-out;
}

.prank-cmd-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  background: #f4f4f4;
  color: #111;
  font-size: 0.72rem;
  user-select: none;
}

.prank-cmd-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 18px;
  background: #111;
  color: #f4f4f4;
  font-size: 0.58rem;
}

.prank-cmd-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prank-cmd-close {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.prank-cmd-close:hover,
.prank-cmd-close:focus-visible {
  background: #dc2626;
  color: #fff;
}

.prank-cmd-body {
  min-height: 250px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%),
    #050505;
  font-size: 0.74rem;
  line-height: 1.55;
}

.prank-cmd-lines,
.prank-cmd-current {
  white-space: pre-wrap;
  word-break: break-word;
}

.prank-cmd-line {
  color: #d8ffd2;
}

.prank-cmd-line-muted {
  color: #92a58f;
}

.prank-cmd-current {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 1.3em;
}

.prank-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 2px;
  background: #d8ffd2;
  animation: prank-caret 820ms steps(1) infinite;
}

.prank-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(216, 255, 210, 0.5);
  color: #d8ffd2;
  background: rgba(216, 255, 210, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prank-link.is-hidden {
  display: none;
}

@keyframes prank-pop {
  from {
    opacity: 0;
    transform: translate(-8px, 12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes prank-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .route-shell {
    padding: 10px;
  }

  .profile-card {
    width: 100%;
  }

  .card-body {
    padding: 16px;
  }

  .controls-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .volume-group {
    width: 100%;
  }

  .ios-slider-volume {
    flex: 1;
    width: auto;
  }

  .project-head {
    flex-direction: column;
  }

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

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

  .status-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .status-presence {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  .prank-terminal {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }

  .prank-cmd-body {
    min-height: 220px;
    font-size: 0.68rem;
  }
}

@media (max-width: 760px) {
  .controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .volume-group {
    justify-content: flex-start;
    width: 100%;
  }

  .ios-slider-volume {
    flex: 1 1 auto;
    width: auto;
  }
}
