* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #090c0d;
  --bg-soft: #101416;
  --surface: #111719;
  --surface-strong: #171e20;
  --surface-accent: rgba(255, 107, 53, 0.08);
  --border: rgba(228, 238, 234, 0.14);
  --border-strong: rgba(255, 107, 53, 0.48);
  --text: #f5f1ec;
  --muted: #9aa8a4;
  --accent: #ff6b35;
  --accent-2: #7df7e1;
  --accent-ink: #1b0d08;
  --shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #090c0d 0%, #0d1112 48%, #090c0d 100%);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  overflow: auto;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
}

code {
  padding: 0.12rem 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

p,
ul,
ol,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  color: var(--muted);
}

ul {
  padding-left: 1.15rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}

.skip-link:focus {
  top: 1rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.03em;
  font-size: 0.96rem;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.18);
}

.brand span {
  color: var(--text);
}

.brand span::first-letter {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a:hover,
.nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  align-items: end;
}

.eyebrow {
  margin-bottom: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 10.5ch;
}

.hero-lede {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 1.1rem;
}

.hero-actions,
.cta-row,
.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button {
  border: 1px solid var(--border);
}

.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--accent);
}

.button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.button:active,
.text-link:active {
  transform: translateY(0) scale(0.98);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.stat {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text);
}

.stat span,
.meta-stack span,
.detail-row span,
.catalog-note,
.filters-help {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual,
.skill-hero-side,
.feature-card,
.skill-row,
.note-card,
.filters,
.empty-state {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-color: rgba(255, 107, 53, 0.26);
}

.hero-visual img,
.hero-visual video,
.skill-hero-side img,
.feature-card img,
.skill-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  display: block;
  min-height: 100%;
  background: #090c0d;
}

.hero-visual figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(245, 241, 236, 0.16);
  border-radius: 12px;
  background: rgba(9, 12, 13, 0.86);
}

.hero-visual figcaption strong {
  font-size: 0.95rem;
}

.section {
  padding: 2.75rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1.15rem;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1rem;
  overflow: hidden;
  padding: 0;
}

.feature-card img {
  min-height: 190px;
}

.feature-card > div {
  padding: 1rem 1rem 1rem 0;
  display: grid;
  gap: 0.6rem;
  align-content: center;
}

.feature-card p,
.skill-copy p {
  margin: 0;
}

.meta-stack,
.detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
}

.filters {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 1rem;
}

.filters label {
  display: block;
  margin: 1rem 0 0.45rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.filters label:first-child {
  margin-top: 0;
}

.filters input[type='search'],
.filters select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.filters input[type='search']::placeholder {
  color: rgba(239, 250, 247, 0.45);
}

.toggle-row {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.95rem !important;
  color: var(--text) !important;
}

.toggle-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.results-panel {
  display: grid;
  gap: 1rem;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-list {
  display: grid;
  gap: 1rem;
}

.skill-row {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-left: 3px solid var(--accent);
}

.skill-row.alt {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  border-left-color: var(--accent-2);
}

.skill-row.alt .skill-media {
  order: 2;
}

.skill-row.alt .skill-copy {
  order: 1;
}

.skill-media {
  min-height: 220px;
  border-right: 1px solid var(--border);
  background: transparent;
}

.skill-media img {
  object-fit: contain;
  padding: 1.3rem;
}

.skill-copy {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  align-content: center;
}

.skill-copy h3 a {
  display: inline-flex;
}

.skill-copy .skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.split-story {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.story-copy {
  display: grid;
  gap: 1rem;
}

.note-card,
.empty-state,
.skill-hero-side,
.skill-hero-copy {
  padding: 1.2rem;
}

.note-card.prose,
.prose {
  max-width: 78ch;
}

.note-card .prose,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote {
  margin-bottom: 1rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  color: var(--muted);
}

.prose a {
  color: var(--accent);
}

.skill-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
  padding: 2.5rem 0 0;
}

.skill-hero-copy h1 {
  max-width: 12ch;
}

.skill-hero-side {
  overflow: hidden;
}

.skill-hero-side img {
  min-height: 320px;
  margin: -1.2rem -1.2rem 1rem;
  width: calc(100% + 2.4rem);
}

.skill-prose {
  padding-top: 1rem;
}

.footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
}

.footer p {
  max-width: 42ch;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 0.65rem;
  padding: 1.5rem;
}

@media (max-width: 960px) {
  .hero,
  .skill-hero,
  .catalog-layout,
  .split-story,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual,
  .skill-hero-side {
    min-height: 360px;
  }

  .feature-card,
  .skill-row,
  .skill-row.alt {
    grid-template-columns: 1fr;
  }

  .skill-row.alt .skill-media,
  .skill-row.alt .skill-copy {
    order: unset;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-head,
  .results-bar,
  .footer {
    flex-direction: column;
    align-items: start;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .skill-hero-copy h1 {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
