:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: rgba(255,255,255,.72);
  --surface-solid: #ffffff;
  --border: rgba(15,23,42,.10);
  --text: #0f172a;
  --text-muted: #475569;
  /* Brand palette follows profile.az.mn/public/assets/tokens.css. */
  --gradient-primary: linear-gradient(120deg, #db2777 0%, #9333ea 50%, #db2777 100%);
  --primary: #a21caf;
  --brand-dot: #2563eb;
  --primary-contrast: #ffffff;
  --warning: #b45309;
  --focus: var(--primary);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --motion-fast: 120ms;
  --motion-base: 200ms;
  --motion-slow: 320ms;
  --ease: cubic-bezier(.2,0,.2,1);
  --font-body: 16px;
  --font-small: 14px;
  --font-h2: 20px;
  --font-h1: 24px;
  --font-display: 32px;
  --accent-wash: color-mix(in srgb, var(--primary) 8%, transparent);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: rgba(22,27,34,.72);
  --surface-solid: #161b22;
  --border: rgba(255,255,255,.12);
  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --gradient-primary: linear-gradient(120deg, #f472b6 0%, #a78bfa 50%, #f472b6 100%);
  --primary: #e879f9;
  --brand-dot: #4c8dff;
  --primary-contrast: #0d1117;
  --warning: #d29922;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: rgba(22,27,34,.72);
    --surface-solid: #161b22;
    --border: rgba(255,255,255,.12);
    --text: #e6edf3;
    --text-muted: #9aa7b4;
    --gradient-primary: linear-gradient(120deg, #f472b6 0%, #a78bfa 50%, #f472b6 100%);
    --primary: #e879f9;
    --brand-dot: #4c8dff;
    --primary-contrast: #0d1117;
    --warning: #d29922;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 0% 15%, var(--accent-wash), transparent 55%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
.shell { max-width: 1328px; margin-inline: auto; padding: 0 48px; }
.masthead { display: flex; align-items: center; gap: 24px; min-height: 104px; border-bottom: 1px solid var(--border); }
.brand { font-size: 40px; font-weight: 750; letter-spacing: -.08em; line-height: 1; min-width: 44px; padding-block: 8px; }
.brand, .hero-wordmark { color: var(--text); }
.brand-accent { color: var(--primary); }
.brand-dot { color: var(--brand-dot); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .brand-accent {
    background-image: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.masthead-note { color: var(--text-muted); font-size: var(--font-small); }
.theme-button { margin-left: auto; display: flex; align-items: center; gap: 8px; }
button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface-solid); color: var(--text); transition: border-color var(--motion-fast) var(--ease); }
button:hover { border-color: var(--primary); }
.theme-button { background: transparent; font-size: var(--font-small); }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 64px; padding: 64px 0; min-height: 460px; }
.hero-wordmark { font-size: clamp(96px, 16vw, 224px); letter-spacing: -.085em; line-height: 1; font-weight: 750; padding-bottom: 24px; white-space: nowrap; }
.hero-copy { border-left: 1px solid var(--border); padding-left: 48px; }
.eyebrow { font-size: var(--font-small); color: var(--primary); font-weight: 600; margin-bottom: 16px; }
h1 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.25; letter-spacing: -.035em; white-space: pre-line; font-weight: 600; }
.intro { margin-top: 24px; max-width: 400px; color: var(--text-muted); }
.explore { display: inline-flex; align-items: center; gap: 32px; min-height: 44px; margin-top: 24px; font-weight: 600; }
.explore span:last-child { color: var(--primary); font-size: 24px; }
.explore:hover { color: var(--primary); }
.directory { border-top: 1px solid var(--border); padding-top: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { font-size: var(--font-h1); line-height: 1.35; font-weight: 600; letter-spacing: -.025em; }
.registry-note { color: var(--text-muted); max-width: 340px; font-size: var(--font-small); line-height: 1.55; }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 32px; }
.search-field { width: min(100%, 440px); }
label { display: block; font-size: var(--font-small); margin-bottom: 8px; color: var(--text-muted); }
.search-box { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-solid); padding: 0 16px; }
.search-box svg { color: var(--text-muted); }
input { width: 100%; min-width: 0; min-height: 48px; border: 0; background: transparent; color: var(--text); border-radius: var(--radius-sm); }
input::placeholder { color: var(--text-muted); }
.count { padding-bottom: 12px; color: var(--text-muted); font-size: var(--font-small); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feedback { color: var(--text-muted); font-size: var(--font-small); padding: 16px 0; min-height: 56px; }
.feedback.warning { color: var(--warning); }
.reference { font-family: ui-monospace, monospace; overflow-wrap: anywhere; margin-top: 8px; }
.actions { display: flex; gap: 8px; }
.actions:has(button:not([hidden])) { margin-bottom: 16px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; padding: 24px; min-height: 256px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); transition: border-color var(--motion-base) var(--ease), transform var(--motion-base) var(--ease); }
@supports (backdrop-filter: blur(16px)) {
  .project-card { background: var(--surface); backdrop-filter: blur(16px) saturate(140%); }
}
a.project-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.planned-label { align-self: flex-start; margin-top: 12px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-muted); font-size: var(--font-small); }
.card-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; font-size: var(--font-small); }
.category { color: var(--primary); }
.card-number { color: var(--text-muted); font-family: ui-monospace, monospace; }
.project-card h3 { font-size: var(--font-h2); line-height: 1.4; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.description { margin-top: 12px; color: var(--text-muted); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 24px; }
.host { font-size: var(--font-small); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.card-arrow { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-full); background: var(--primary); background-image: var(--gradient-primary); color: var(--primary-contrast); font-size: 20px; }
.closing { display: flex; align-items: center; gap: 24px; padding: 48px 0; margin-top: 48px; border-top: 1px solid var(--border); }
.closing-mark { font-size: 48px; color: var(--primary); }
.closing h2 { font-size: var(--font-h2); }
.closing p { margin-top: 8px; max-width: 680px; color: var(--text-muted); }
footer { border-top: 1px solid var(--border); display: flex; align-items: center; gap: 24px; padding: 24px 0 32px; color: var(--text-muted); font-size: var(--font-small); }
.footer-brand { color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: -.06em; }
footer a { min-height: 44px; display: inline-flex; align-items: center; }
footer a:last-child { margin-left: auto; }
footer a:hover { color: var(--primary); }
.skeleton { pointer-events: none; gap: 24px; }
.skeleton-line { height: 24px; width: 100%; background: var(--border); border-radius: var(--radius-sm); animation: breathe 1.6s ease-in-out infinite alternate; }
.skeleton-line.short { width: 40%; }
@keyframes breathe { to { opacity: .35; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 12px 24px; background: var(--surface-solid); color: var(--primary); border-radius: var(--radius-sm); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
@media (min-width: 1000px) {
  .project-card:first-child { border-top-color: var(--primary); }
}
@media (max-width: 1000px) {
  .shell { padding-inline: 32px; }
  .hero { gap: 32px; }
  .hero-copy { padding-left: 32px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { padding-inline: 24px; }
  .masthead { min-height: 80px; gap: 16px; }
  .masthead-note { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
  .hero-wordmark { font-size: clamp(96px, 27vw, 168px); padding: 0; }
  .hero-copy { padding-left: 0; border: 0; }
  h1 { font-size: 36px; }
  .section-heading { display: block; }
  .registry-note { margin-top: 16px; }
  .directory { padding-top: 32px; }
  .toolbar { flex-wrap: wrap; gap: 12px; }
  .search-field { width: 100%; }
  .count { padding: 0; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-card { min-height: 256px; }
  .closing { align-items: start; gap: 16px; padding-block: 32px; margin-top: 32px; }
  footer { flex-wrap: wrap; gap: 8px 24px; }
  footer p { flex: 1; }
  footer a:last-child { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  a.project-card:hover { transform: none; }
}
