/* nowucca.com home page: header + section cards. Older content below keeps the Primer theme. */
:root {
  --nw-bg: #f4f6f8;
  --nw-surface: #ffffff;
  --nw-fg: #17202a;
  --nw-muted: #5a6774;
  --nw-line: #d9e0e6;
  --nw-accent: #1d5c88;
  --nw-accent-soft: #e2edf5;
  --nw-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --nw-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

body.nw { margin: 0; background: #fff; }

.nw-wrap {
  max-width: 1012px; /* matches Primer's container-lg */
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.nw-header {
  background: var(--nw-bg);
  border-bottom: 1px solid var(--nw-line);
  color: var(--nw-fg);
}
.nw-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nw-brand {
  font: 700 1.4rem/1 var(--nw-display);
  letter-spacing: -0.02em;
  color: var(--nw-fg);
  text-decoration: none;
  padding: 8px 0;
}
.nw-brand span { color: var(--nw-accent); }
.nw-brand:hover { text-decoration: none; }
.nw-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -12px; }
.nw-nav a {
  font: 500 0.95rem/1 var(--nw-display);
  color: var(--nw-muted);
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
}
.nw-nav a:hover { color: var(--nw-accent); background: var(--nw-accent-soft); text-decoration: none; }

.nw-hero { padding-top: 24px; padding-bottom: 48px; }
.nw-kicker {
  font: 500 0.8rem/1.4 var(--nw-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nw-accent);
  margin: 0 0 12px;
}
.nw-hero h1 {
  font: 700 clamp(2rem, 5.5vw, 3.2rem)/1.08 var(--nw-display);
  letter-spacing: -0.025em;
  color: var(--nw-fg);
  margin: 0 0 16px;
  max-width: 20ch;
  text-wrap: balance;
  border: 0;
}
.nw-lede { font-size: 1.15rem; line-height: 1.55; color: var(--nw-muted); max-width: 42rem; margin: 0; }

/* Cards */
.nw-cards-section { padding-top: 40px; padding-bottom: 64px; }
.nw-section-label {
  font: 600 0.85rem/1 var(--nw-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nw-muted);
  margin: 0 0 16px;
}
.nw-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}
.nw-cards li { margin: 0; }
.nw-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 190px;
  padding: 24px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: 14px;
  color: var(--nw-fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.nw-card:hover {
  text-decoration: none;
  border-color: var(--nw-accent);
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.10);
  transform: translateY(-2px);
}
.nw-card:active { transform: translateY(0); }
.nw-card:focus-visible, .nw-nav a:focus-visible, .nw-brand:focus-visible {
  outline: 3px solid var(--nw-accent);
  outline-offset: 3px;
}
.nw-card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--nw-accent-soft);
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 6px;
}
.nw-card-title { font: 700 1.3rem/1.2 var(--nw-display); letter-spacing: -0.01em; }
.nw-card-text { color: var(--nw-muted); line-height: 1.5; flex: 1; }
.nw-card-go { font: 600 0.95rem/1 var(--nw-display); color: var(--nw-accent); padding-top: 8px; }
.nw-card:hover .nw-card-go span { margin-left: 4px; }

@media (prefers-reduced-motion: reduce) {
  .nw-card { transition: none; }
  .nw-card:hover { transform: none; }
}

/* Inner pages (layout nw-page) */
.nw-hero-page { padding-bottom: 36px; }
.nw-hero-page .nw-kicker a { color: inherit; }
.nw-page { padding-top: 16px; padding-bottom: 64px; color: var(--nw-fg); line-height: 1.6; font-size: 1.05rem; }
.nw-block { max-width: 42rem; padding-top: 32px; }
.nw-block + .nw-block { border-top: 1px solid var(--nw-line); margin-top: 32px; }
.nw-block h2 { font: 700 1.6rem/1.2 var(--nw-display); letter-spacing: -0.015em; margin: 0 0 12px; border: 0; padding: 0; }
.nw-block h3 { font: 600 1.1rem/1.3 var(--nw-display); margin: 24px 0 8px; }
.nw-block p { margin: 0 0 12px; }
.nw-block ul { margin: 0 0 12px; padding-left: 1.25rem; }
.nw-block li { margin: 0 0 6px; }
.nw-block a { color: var(--nw-accent); }
.nw-block ul.nw-post-list { list-style: none; padding: 0; }
.nw-post-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--nw-line); }
.nw-post-date { font: 500 0.8rem/1.8 var(--nw-mono); color: var(--nw-muted); white-space: nowrap; }
.nw-embed iframe { display: block; width: 100%; max-width: 600px; height: auto; aspect-ratio: 600 / 397; border: 1px solid var(--nw-line); border-radius: 10px; }

/* Portfolio page: selected GitHub projects */
.nw-portfolio-all-row { margin: 0 0 20px; }
.nw-page .nw-portfolio-all { font: 600 0.95rem/1 var(--nw-display); color: var(--nw-accent); padding: 8px 0; }
.nw-projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 16px;
}
.nw-project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 24px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.nw-project::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--nw-accent), #4ba3c7);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.nw-project:hover, .nw-project:focus-within {
  border-color: var(--nw-accent);
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.10);
  transform: translateY(-2px);
}
.nw-project:hover::before, .nw-project:focus-within::before { opacity: 1; }
.nw-project-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nw-project-name { font: 700 1.35rem/1.2 var(--nw-display); letter-spacing: -0.01em; margin: 0; border: 0; padding: 0; }
.nw-project-name a { color: var(--nw-fg); text-decoration: none; }
/* the whole card is the click target */
.nw-project-name a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.nw-project-name a:focus-visible { outline: none; }
.nw-project-name a:focus-visible::after { outline: 3px solid var(--nw-accent); outline-offset: 3px; }
.nw-project-year { font: 500 0.8rem/1 var(--nw-mono); color: var(--nw-muted); }
.nw-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nw-chips li {
  margin: 0;
  font: 500 0.75rem/1 var(--nw-mono);
  color: var(--nw-accent);
  background: var(--nw-accent-soft);
  padding: 6px 9px;
  border-radius: 999px;
}
.nw-chips .nw-chip-stat { color: var(--nw-muted); background: var(--nw-bg); border: 1px solid var(--nw-line); }
.nw-project-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-content: start;
  margin: 0;
  flex: 1;
}
.nw-project-body dt {
  font: 500 0.72rem/1.9 var(--nw-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nw-muted);
  margin: 0;
  padding: 0;
  font-style: normal;
}
.nw-project-body dd { margin: 0; padding: 0; line-height: 1.5; color: var(--nw-fg); }
.nw-project-body dd:first-of-type { font-weight: 600; }
.nw-project-repo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--nw-line);
  font: 500 0.8rem/1.4 var(--nw-mono);
  color: var(--nw-muted);
}
/* sits above the card-wide link */
.nw-project-also { position: relative; z-index: 1; color: var(--nw-accent); padding: 4px 0; }
.nw-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .nw-project, .nw-project::before { transition: none; }
  .nw-project:hover, .nw-project:focus-within { transform: none; }
}
.nw-project-meta { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nw-private {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 0.72rem/1 var(--nw-mono);
  color: #7a4b00;
  background: #fdf1dc;
  border: 1px solid #f0d9ae;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
