/* HackerSEC home.css: homepage only. Loaded after site.css, so layer order is already set. */
@layer templates {

  /* ----- hero: the one memorable element, a terminal prompt over a faded dot grid ----- */
  .hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 10vw, 7rem); }
  .hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgb(231 236 245 / 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 20% 35%, #000, transparent);
    mask-image: radial-gradient(ellipse 70% 80% at 20% 35%, #000, transparent);
  }
  .hero__inner { position: relative; }
  .hero__inner > * + * { margin-top: var(--space-2); }

  .hero__status {
    display: inline-flex; align-items: center; gap: 0.625rem;
    padding: 0.25rem 0.875rem; font-size: var(--fs-sm); color: var(--text-muted);
    border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  }
  .hero__status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }

  .hero h1 {
    font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02;
    margin-top: var(--space-3);
  }
  /* Decorative prompt; the empty alt text keeps it out of the accessibility tree. */
  .hero h1::before {
    content: "$ whoami" / ""; display: block; margin-bottom: var(--space-1);
    font-family: var(--font-mono); font-size: var(--fs-base); font-weight: 500;
    letter-spacing: 0; color: var(--accent);
  }

  .hero__role { font-size: var(--fs-lg); color: var(--text); }
  .hero__lede { max-width: 52ch; color: var(--text-muted); font-size: 1.0625rem; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: var(--space-1); }

  .hero__facts {
    display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3);
    list-style: none; padding-top: var(--space-2);
    font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-muted);
  }
  .hero__facts li { padding-left: 0.875rem; border-left: 2px solid var(--border-strong); }

  /* ----- sections ----- */
  .section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
  .section__title { font-size: var(--fs-h2); font-weight: 600; margin-bottom: var(--space-3); }
  .section__more { margin-top: var(--space-3); }

  /* ----- topic index: a ruled directory, not a grid of cards ----- */
  .topic-list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 0 var(--space-4); list-style: none;
  }
  .topic-card { position: relative; padding-block: var(--space-2); border-top: 1px solid var(--border); }
  .topic-card__title { font-size: var(--fs-lg); font-weight: 600; }
  .topic-card p { margin-top: 0.25rem; color: var(--text-muted); font-size: 0.9375rem; }

  /* Whole row is clickable via the title link's overlay; the ring moves to the row. */
  .topic-card a, .entry__title a { color: var(--text); text-decoration: none; }
  .topic-card a::after, .entry__title a::after { content: ""; position: absolute; inset: 0; }
  .topic-card a:focus-visible, .entry__title a:focus-visible { outline: none; }
  .topic-card:has(a:focus-visible), .entry:has(a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
  @media (hover: hover) {
    .topic-card:hover a, .entry:hover .entry__title a { color: var(--accent); }
  }

  /* ----- article entries ----- */
  .entry-list { list-style: none; border-bottom: 1px solid var(--border); }
  .entry { position: relative; padding-block: var(--space-3); border-top: 1px solid var(--border); }
  .entry__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
  .entry__title { font-size: 1.375rem; font-weight: 600; }
  .entry__summary { max-width: 60ch; margin-top: 0.375rem; color: var(--text-muted); }
}
