:root {
  --bg: #0b0d10;
  --bg-soft: #10141a;
  --text: #e6e8eb;
  --text-soft: #c9cfd8;
  --muted: #8b93a1;
  --line: #1e242d;
  --accent: #7c9cff;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 0 8px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  border: 0;
}

.brand-dot {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Typography */

main {
  padding-top: 40px;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin: 0 0 20px;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 10px;
}

p {
  margin: 0 0 18px;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 56ch;
}

.muted {
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 156, 255, 0.35);
}

a:hover {
  border-bottom-color: var(--accent);
}

a:focus-visible,
.brand:focus-visible,
.site-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: rgba(124, 156, 255, 0.3);
}

section {
  margin-top: 44px;
}

/* Lists */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* Cards */

.cards {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card-head h2 {
  margin: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  flex: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.tag-wip {
  color: var(--accent);
  border-color: rgba(124, 156, 255, 0.4);
}

/* Notes */

.note {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.note time {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.note h2 {
  margin-top: 8px;
}

.note p:last-child {
  margin-bottom: 0;
}

/* Contacts */

.contact-list {
  list-style: none;
  margin: 28px 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  flex: none;
  width: 110px;
  color: var(--muted);
}

/* 404 */

.error-code {
  margin: 0 0 4px;
  font-size: clamp(3.5rem, 14vw, 6rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #1b2129;
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Mobile */

@media (max-width: 520px) {
  .wrap {
    padding: 0 18px 40px;
  }

  .site-header {
    padding-top: 20px;
  }

  main {
    padding-top: 28px;
  }

  .contact-list li {
    flex-direction: column;
    gap: 2px;
  }

  .contact-label {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
