/* Visual refinement layer: map-first, recruiter-friendly RPG dashboard. */
:root {
  --focus: #a7ffd2;
  --panel-lift: #0b1b2a;
  --panel-soft: #0b1a29;
  --red: #ff7373;
}

body {
  background-image:
    radial-gradient(circle at 8% 14%, rgba(62, 149, 187, .13) 0 1px, transparent 1.6px),
    radial-gradient(circle at 88% 25%, rgba(102, 240, 172, .1) 0 1px, transparent 1.5px),
    radial-gradient(ellipse at 50% -15%, #12324a 0, transparent 42%),
    linear-gradient(180deg, #050b14 0%, #06101b 62%, #050a12 100%);
  background-size: 90px 90px, 130px 130px, auto, auto;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  min-height: 66px;
  border-bottom-color: #22445d;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .22);
}

.brand-mark {
  text-shadow: 0 0 18px rgba(102, 240, 172, .4);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.terminal-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #285b57;
  border-radius: 8px;
  background: #0a211f;
  color: var(--green);
  font: 600 11px var(--mono);
  transition: border-color .18s, background .18s, transform .18s;
}

.terminal-top-btn:hover {
  transform: translateY(-1px);
  border-color: var(--green);
  background: #10342d;
}

.hero-grid {
  grid-template-columns: minmax(235px, .82fr) minmax(460px, 2.55fr) minmax(235px, .82fr);
  gap: 14px;
  padding-top: 18px;
  min-height: 660px;
}

.panel {
  border-color: #23415a;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(9, 21, 35, .98), rgba(5, 15, 26, .98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .018);
  transition: border-color .2s, box-shadow .2s;
}

.panel:hover {
  border-color: #2c5270;
}

.profile {
  overflow: hidden;
}

.avatar-scene {
  min-height: 205px;
  background:
    radial-gradient(circle at 72% 22%, rgba(186, 232, 255, .12), transparent 23%),
    linear-gradient(180deg, #10233d 0%, #183b56 58%, #0d2833 100%);
}

.avatar-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 28%, rgba(183, 237, 255, .045) 50%, transparent 67%);
}

.profile-copy {
  padding: 19px 18px 18px;
  gap: 10px;
}

.profile h1 {
  font-size: clamp(22px, 1.6vw, 28px);
  line-height: 1.15;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: .17em;
}

.role {
  line-height: 1.5;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(102, 240, 172, .24);
  border-radius: 999px;
  background: rgba(34, 197, 135, .07);
  color: #a9f4cf;
  font: 500 10px var(--mono);
}

.availability-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(102, 240, 172, .7);
}

.intro {
  line-height: 1.7;
}

.xp-track,
.progress-track {
  background: #091521;
  border-color: #31536c;
}

.xp-track span,
.progress-track span {
  background: linear-gradient(90deg, #35b87f, #83ffc0);
}

.tag-list span {
  border-color: #28465d;
  background: #0b1c2c;
  transition: border-color .18s, color .18s, background .18s;
}

.tag-list span:hover {
  border-color: #43816f;
  color: #f2fff8;
  background: #102a2a;
}

.button {
  border-radius: 7px;
  min-height: 40px;
}

.primary {
  border-color: #337fb0;
  background: linear-gradient(180deg, #0d3554, #0a2540);
}

.primary:hover {
  background: linear-gradient(180deg, #124365, #0b2e4c);
  box-shadow: 0 0 22px rgba(76, 174, 228, .12);
}

.map-panel {
  padding: 15px;
  background: linear-gradient(145deg, #091624, #07121f);
}

.map-heading {
  margin-bottom: 12px;
}

.map-heading h2 {
  font-size: clamp(16px, 1.2vw, 19px);
}

.map-world {
  min-height: 515px;
  border-color: #294e67;
  border-radius: 8px;
  background: #071b2c;
  box-shadow: inset 0 0 35px rgba(1, 7, 14, .25);
  isolation: isolate;
}

.map-world::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(4, 12, 21, .02), transparent 60%, rgba(2, 9, 15, .2));
  z-index: 1;
}

.world-svg {
  filter: saturate(1.06) contrast(1.03);
}

.map-pin {
  z-index: 2;
  border-color: #436982;
  border-radius: 7px;
  background: rgba(5, 15, 26, .94);
  padding: 9px 11px;
  backdrop-filter: blur(5px);
}

.map-pin strong {
  font-size: 11px;
}

.map-pin small {
  margin-top: 2px;
  font-size: 9px;
}

.map-pin .pin-icon {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.map-pin.visited {
  border-color: rgba(102, 240, 172, .65);
}

.map-tip {
  z-index: 2;
  border-color: #31566c;
  color: #c1d4e4;
}

.quest-panel {
  padding: 16px;
  background: linear-gradient(155deg, #091522, #06101a);
}

.panel-title {
  padding-bottom: 14px;
}

.quest-list {
  gap: 12px;
}

.quest-list button {
  font-size: 10px;
  line-height: 1.45;
}

.quest-list button:hover {
  text-shadow: 0 0 12px rgba(102, 240, 172, .23);
}

.incident-launch {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 17px;
  padding: 10px;
  text-align: left;
  border: 1px solid #633c42;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(75, 28, 37, .3), rgba(14, 22, 33, .95));
  color: #ffe3dc;
  transition: transform .18s, border-color .18s, background .18s;
}

.incident-launch:hover {
  transform: translateY(-1px);
  border-color: #e97777;
  background: linear-gradient(135deg, rgba(100, 36, 43, .42), rgba(14, 22, 33, .98));
}

.incident-launch > span:first-child {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 115, 115, .12);
  color: var(--red);
  font-size: 17px;
}

.incident-launch strong,
.incident-launch small {
  display: block;
}

.incident-launch strong {
  font: 600 10px var(--mono);
}

.incident-launch small {
  color: #b89da3;
  font-size: 9px;
  line-height: 1.4;
  margin-top: 3px;
}

.incident-launch b {
  color: #ff9a9a;
  font-size: 17px;
}

.content-grid {
  gap: 14px;
  padding-bottom: 14px;
}

.content-panel {
  padding: 17px;
}

.section-heading {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(35, 65, 90, .78);
}

.section-heading h2 {
  font-size: 16px;
}

.project-card {
  min-height: 100px;
  padding: 12px;
  border-color: #1c3b52;
  background: linear-gradient(135deg, #0a1a29, #081522);
}

.project-card:hover {
  border-color: #4a7894;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .16);
}

.project-icon {
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.project-info h3 {
  font-size: 12px;
}

.project-info p {
  line-height: 1.6;
}

.card-arrow {
  width: 28px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 5px;
}

.card-arrow:hover {
  background: rgba(102, 240, 172, .08);
}

.skill-count {
  color: #8096ab;
  font: 9px var(--mono);
  white-space: nowrap;
}

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
}

.filter-chip {
  border: 1px solid #29445a;
  border-radius: 999px;
  padding: 5px 8px;
  background: #081725;
  color: #9db2c7;
  font: 500 9px var(--mono);
  transition: border-color .15s, background .15s, color .15s;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: #367b66;
  background: #0b2b28;
  color: #9df4c8;
}

.skill-group[hidden] {
  display: none !important;
}

.skill-group {
  padding: 12px 0 9px;
}

.skill-group h3 {
  font-size: 10px;
}

.skill-items span {
  gap: 5px;
  color: #c6d8e8;
  transition: transform .16s, color .16s;
}

.skill-items span:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.skill-items b {
  text-shadow: 0 0 16px rgba(102, 217, 238, .13);
}

.timeline {
  gap: 17px;
}

.timeline-heading h3 {
  line-height: 1.5;
}

.timeline p {
  line-height: 1.65;
}

.ai-banner {
  border-color: #45396d;
  background: radial-gradient(ellipse at 5% 50%, rgba(92, 67, 153, .19), transparent 50%), linear-gradient(135deg, #0b1426, #081321);
}

.ai-orb {
  box-shadow: 0 0 28px rgba(168, 121, 255, .16), inset 0 0 18px rgba(194, 160, 255, .08);
}

.contact-panel {
  background: linear-gradient(135deg, #091928, #071320);
}

.contact-panel h2 {
  font-size: clamp(19px, 1.6vw, 24px);
}

.footer {
  border-top: 1px solid rgba(32, 59, 85, .4);
}

.project-dialog,
.terminal-dialog,
.raid-dialog {
  max-height: min(84vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.terminal-dialog {
  max-width: 620px;
}

.terminal-quick-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 13px 0;
}

.quick-cmd {
  border: 1px solid #25435b;
  border-radius: 5px;
  background: #0a1c2d;
  color: var(--cyan);
  padding: 6px 9px;
  font: 10px var(--mono);
}

.quick-cmd:hover {
  border-color: #4382a3;
  background: #102a3e;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
  color: var(--green);
  font: 600 12px var(--mono);
}

.terminal-input-row input {
  min-width: 0;
  margin: 0;
  flex: 1;
}

#terminalOutput {
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #1a3449;
  border-radius: 7px;
  background: #040b12;
  line-height: 1.7;
}

#terminalOutput:empty {
  display: none;
}

.terminal-command-line {
  margin-top: 8px;
  color: var(--green);
  overflow-wrap: anywhere;
}

#terminalOutput pre {
  margin: 2px 0 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b9cfe2;
  font: 11px/1.7 var(--mono);
}

.raid-dialog {
  width: min(620px, calc(100% - 28px));
  background: linear-gradient(145deg, #101722, #07111d);
  color: var(--text);
  border: 1px solid #81434b;
  border-radius: 13px;
  padding: 25px;
  box-shadow: 0 30px 90px #000d;
}

.raid-dialog::backdrop {
  background: rgba(1, 5, 10, .83);
  backdrop-filter: blur(6px);
}

.raid-dialog h2 {
  margin: 5px 40px 8px 0;
  font-size: 23px;
  letter-spacing: -.04em;
}

.danger-text {
  color: #ff8585;
}

.raid-intro {
  margin: 0 0 18px;
  color: #a9bacb;
  font-size: 12px;
  line-height: 1.7;
}

.boss-hp-wrap {
  margin: 18px 0 14px;
}

.boss-hp-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #b8c7d6;
  font: 10px var(--mono);
}

.boss-hp-heading strong {
  color: #ff9999;
}

.boss-health-track {
  height: 10px;
  border: 1px solid #663f49;
  border-radius: 999px;
  overflow: hidden;
  background: #250f17;
}

.boss-health-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #a9354e, #ff8585);
  box-shadow: 0 0 14px rgba(255, 115, 115, .2);
  transition: width .3s ease;
}

.combat-log {
  padding: 12px 13px;
  border: 1px solid #243d52;
  border-radius: 8px;
  background: #050d16;
  color: #bfd0e0;
  min-height: 82px;
  font: 11px/1.75 var(--mono);
}

.combat-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.combat-action {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 3px 10px;
  padding: 11px 12px;
  border: 1px solid #2b475c;
  border-radius: 8px;
  background: #0a1928;
  text-align: left;
  transition: border-color .15s, background .15s;
}

.combat-action:hover {
  border-color: #55819e;
  background: #0d2234;
}

.combat-action > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #4b647b;
  border-radius: 6px;
  color: #ffadad;
  font: 10px var(--mono);
}

.combat-action strong {
  font: 600 11px var(--mono);
  color: #e6f0fa;
}

.combat-action small {
  color: #96a9bc;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 1400px) {
  .hero-grid {
    grid-template-columns: minmax(225px, .8fr) minmax(420px, 2.2fr) minmax(225px, .8fr);
  }
  .map-pin { padding: 8px 9px; }
  .map-pin strong { font-size: 10px; }
}

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .topbar-actions { margin-left: auto; }
  .terminal-top-btn span { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .map-world { min-height: 520px; }
  .skill-filters { margin-bottom: 13px; }
  .raid-dialog { padding: 20px; }
}

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

/* DEV-OS RPG terminal */
.terminal-dialog {
  width: min(900px, calc(100vw - 2rem));
  max-width: 900px;
  max-height: calc(100dvh - 2rem);
  padding: 1rem;
  overflow-y: auto;
  color: #d9f7e9;
  background: #07111b;
  border: 1px solid rgba(118, 240, 176, 0.32);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.terminal-dialog::backdrop {
  background: rgba(1, 5, 12, 0.78);
  backdrop-filter: blur(5px);
}

.terminal-close-form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.terminal-window.rpg-box {
  overflow: hidden;
  background: #030910;
  border: 1px solid #203c48;
  border-radius: 10px;
  font-family: "IBM Plex Mono", monospace;
}

.terminal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  color: #b8d3d7;
  background: #101e2a;
  border-bottom: 1px solid #203c48;
  font-size: 0.76rem;
}

.terminal-encrypted {
  color: #76f0b0;
}

.terminal-output {
  min-height: 150px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 1rem;
  color: #d4e8df;
  font-size: 0.85rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.term-line {
  margin-bottom: 0.4rem;
  white-space: pre-wrap;
}

.term-line strong,
.cmd-hint {
  color: #76f0b0;
}

.terminal-command-line {
  margin-top: 0.8rem;
  color: #78c8ff;
}

.terminal-response {
  padding-left: 0.25rem;
  color: #c2d4d8;
}

.terminal-quick-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid #182c38;
}

.terminal-dialog .quick-cmd {
  padding: 0.45rem 0.7rem;
  color: #76f0b0;
  background: #0c1a22;
  border: 1px solid #284b4d;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.terminal-dialog .quick-cmd:hover,
.terminal-dialog .quick-cmd:focus-visible {
  color: #03100b;
  background: #76f0b0;
}

.terminal-dialog .terminal-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem;
  background: #09141d;
  border-top: 1px solid #203c48;
}

.terminal-dialog .prompt {
  color: #76f0b0;
  font-size: 0.8rem;
}

.terminal-dialog .terminal-input-row input {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0;
  color: #e3fff1;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 0.85rem;
}

.terminal-dialog .terminal-input-row input:focus-visible {
  box-shadow: 0 1px #76f0b0;
}

@media (max-width: 560px) {
  .terminal-dialog {
    padding: 0.65rem;
  }

  .terminal-bar {
    flex-direction: column;
    font-size: 0.7rem;
  }

  .terminal-output {
    max-height: 38vh;
    padding: 0.75rem;
  }

  .terminal-dialog .terminal-input-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .terminal-dialog .terminal-input-row input {
    width: 100%;
  }
}
