/* SkillNexus OS — ui-ux-pro-max
   Fit: Dark Mode (OLED) + IBM Plex Sans / JetBrains Mono + run green.
   The recommended FAQ/docs landing pattern does not fit this tool, so the
   graph, search, list, and notes stay. Border is #708198 because the
   recommended #475569 is about 2.1:1 on these surfaces (needs 3:1). */

:root {
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --color-nexus-bg: #070b12;
  --color-nexus-card: #1e293b;
  --color-nexus-border: #708198;
  --color-nexus-accent: #22c55e;
  --color-nexus-text: #f8fafc;
  --color-nexus-muted: #94a3b8;
  --color-nexus-highlight: #7dd3fc;
  --header-offset: 4.5rem;
  color-scheme: dark;
}

html {
  scroll-padding-top: var(--header-offset);
  scroll-padding-bottom: 2rem;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 50% -12%, rgba(34, 197, 94, 0.08), transparent 62%),
    var(--color-nexus-bg);
  color: var(--color-nexus-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-mono,
kbd {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(34, 197, 94, 0.35);
  color: #f8fafc;
}

button,
[role="button"],
a[href] {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
svg circle:focus-visible,
input:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 3px;
}

#skill-search:focus-visible {
  outline-color: #22c55e;
  border-color: #22c55e;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0;
  z-index: 80;
  transform: translateY(-120%);
  background: #22c55e;
  color: #070b12;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  padding: 0.7rem 0.9rem;
  border-radius: 0 0 10px 10px;
}

.skip-link:focus {
  transform: none;
}

.boot {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #94a3b8;
  font-size: 1rem;
}

.boot::before {
  content: "";
  width: 9rem;
  height: 0.375rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e293b, #22c55e, #1e293b);
  background-size: 200% 100%;
  animation: bootbar 1.1s ease-in-out infinite;
}

@keyframes bootbar {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* Floor for the 10–11px chrome labels. */
.text-\[10px\],
.text-\[11px\] {
  font-size: 0.75rem;
  line-height: 1.4;
}

nav.sticky {
  padding-top: env(safe-area-inset-top);
  background: rgba(7, 11, 18, 0.88);
  border-bottom-color: rgba(112, 129, 152, 0.55);
}

nav .max-w-7xl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand search views";
  align-items: center;
  column-gap: 0.75rem;
  height: auto;
  min-height: 4.25rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

nav .max-w-7xl > div:nth-child(1) { grid-area: brand; }
nav .max-w-7xl > div:nth-child(3) { grid-area: search; }
nav .max-w-7xl > div:nth-child(4) { grid-area: views; }

nav h1.font-bold {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

nav .bg-gradient-to-br {
  background-image: none;
  background-color: #22c55e;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

#skill-search {
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  border-radius: 12px;
  background: #121826;
  border-color: #708198;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  padding-right: 3rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

button[aria-label="Clear search"] {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#skill-search::placeholder {
  color: #94a3b8;
  font-style: italic;
  opacity: 1;
}

nav [aria-label="View"] {
  gap: 0.25rem;
  padding: 0.25rem;
}

nav [aria-label="View"] button,
.graph-stage > button,
[role="dialog"] button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

nav [aria-label="View"] button:active,
[aria-label="Category"] button:active,
button.group:active,
[role="dialog"] button:active,
.graph-stage > button:active {
  background-color: rgba(125, 211, 252, 0.16);
}

[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1.5px #22c55e;
}

[aria-label="Category"] {
  gap: 0.5rem;
}

[aria-label="Category"] button {
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

main.max-w-7xl {
  padding-top: 1.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
}

#skills {
  scroll-margin-top: var(--header-offset);
}

main > div:first-child h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

main > div:first-child h2 .text-xs {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

main > div:first-child p {
  font-size: 1rem;
  line-height: 1.5;
  max-width: 62ch;
  color: #c5d0dc;
}

main h3.text-sm {
  letter-spacing: 0.14em;
  margin-bottom: 0.875rem;
}

main .text-2xl {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.bg-nexus-card.rounded-lg {
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.graph-stage:not(.fixed) {
  height: 380px;
  border-radius: 16px;
  border-color: rgba(112, 129, 152, 0.8);
  background-color: #0a1018;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.09), transparent 46%),
    linear-gradient(rgba(112, 129, 152, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 129, 152, 0.22) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.graph-stage.fixed {
  height: 100dvh;
  border-radius: 0;
}

.graph-stage .absolute.inset-0 {
  background: rgba(10, 16, 24, 0.78);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
}

.border-dashed.rounded-lg {
  border-color: #708198;
  background: rgba(18, 24, 38, 0.8);
  border-radius: 16px;
}

.border-dashed.rounded-lg p:first-child {
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
}

button.group {
  transition: border-color 200ms ease, background-color 200ms ease;
  animation: row-in 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

button.group:hover {
  background: #243044;
}

button.group:nth-of-type(1) { animation-delay: 20ms; }
button.group:nth-of-type(2) { animation-delay: 45ms; }
button.group:nth-of-type(3) { animation-delay: 70ms; }
button.group:nth-of-type(4) { animation-delay: 95ms; }
button.group:nth-of-type(5) { animation-delay: 120ms; }
button.group:nth-of-type(6) { animation-delay: 145ms; }
button.group:nth-of-type(7) { animation-delay: 170ms; }
button.group:nth-of-type(8) { animation-delay: 195ms; }
button.group:nth-of-type(9) { animation-delay: 220ms; }
button.group:nth-of-type(10) { animation-delay: 245ms; }
button.group:nth-of-type(11) { animation-delay: 270ms; }
button.group:nth-of-type(12) { animation-delay: 295ms; }
button.group:nth-of-type(13) { animation-delay: 320ms; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.animate-\[fadeIn_0\.4s_ease-out\] {
  animation: fadeIn 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-\[slideIn_0\.3s_ease-out\] {
  animation: slideIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

[role="dialog"] {
  background: rgba(7, 11, 18, 0.94);
}

[role="dialog"] .leading-relaxed {
  max-width: 65ch;
}

footer {
  border-top-color: rgba(112, 129, 152, 0.55);
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
}

::-webkit-scrollbar-track { background: #070b12; }
::-webkit-scrollbar-thumb { background: #708198; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (max-width: 639px) {
  :root { --header-offset: 7.5rem; }

  nav .max-w-7xl {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand views"
      "search search";
    row-gap: 0.625rem;
    min-height: 0;
  }
}

@media (min-width: 640px) {
  .graph-stage:not(.fixed) { height: 500px; }

  main > div:first-child h2 { font-size: 2rem; }

  #skill-search { padding-right: 7.5rem; }
}

@media (min-width: 1024px) {
  nav .max-w-7xl,
  main.max-w-7xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
