/* Nik Kit 0.2 — small, code-native foundations for Nik Danchenko's portfolio.
   Theme aliases inherit the established palette; this is not a framework reset. */
:root {
  --nd-font: var(--main-font);
  --nd-ink: var(--heading);
  --nd-copy: var(--portfolio-copy);
  --nd-link: var(--portfolio-link);
  --nd-rule: var(--border);
  --nd-space-1: 8px;
  --nd-space-2: 16px;
  --nd-space-3: 24px;
  --nd-space-4: 32px;
  --nd-space-6: 48px;
  --nd-space-8: 64px;
  --nd-radius-media: 12px;
  /* Project presentation: one contour across homepage, hero and browser demos.
     The browser shell adds its rim to the viewport radius for concentric edges. */
  --nd-radius-preview-canvas: 24px;
  --nd-radius-preview-viewport: 8px;
  /* Browser mockup addresses on phones: shared by homepage and case studies. */
  --nd-browser-address-mobile: clamp(5px, 1.3vw, 7px);
  --nd-reading-width: 40rem;
  --nd-section-gap: clamp(56px, 7vw, 88px);
}

.nd-kit {
  font-family: var(--nd-font);
}

.nd-prose {
  color: var(--nd-copy);
  font-size: var(--type-body);
  line-height: var(--type-body-leading);
  max-width: var(--nd-reading-width);
  min-width: 0;
  overflow-wrap: break-word;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.nd-prose p {
  margin: 0 0 var(--nd-space-3);
}

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

.nd-section {
  border-top: 1px solid var(--nd-rule);
  display: grid;
  gap: var(--nd-space-4) var(--nd-space-8);
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  margin-top: var(--nd-section-gap);
  padding-top: var(--nd-space-4);
}

.nd-section > h3 {
  color: var(--nd-ink);
  font-size: var(--type-heading);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: var(--type-heading-leading);
  margin: 0;
  text-transform: none;
}

.nd-resource-list {
  display: grid;
  gap: var(--nd-space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.nd-resource-list > div {
  min-width: 0;
}

.nd-resource-list dt {
  color: var(--nd-copy);
  font-size: var(--type-body);
  line-height: var(--type-body-leading);
  margin-bottom: var(--nd-space-1);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.nd-resource-list dd {
  margin: 0;
}

.nd-resource-list a {
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--type-body-leading);
  letter-spacing: normal;
  text-transform: none;
}

.nd-kit a:focus-visible {
  outline: 2px solid var(--nd-link);
  outline-offset: 5px;
}

@media screen and (max-width: 900px) {
  .nd-section {
    gap: var(--nd-space-3);
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 359px) {
  .nd-resource-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
