/* hackicker.com — light editorial. warm ivory, racing green, persimmon.
   hand-written css, cascade layers, no framework. */

@layer reset, tokens, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; }
  img, canvas, svg { display: block; max-width: 100%; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  ol, ul { list-style: none; padding: 0; }
}

@layer tokens {
  :root {
    --bg: #f5f2eb;            /* warm ivory */
    --surface: #fbfaf6;       /* paper white */
    --ink: #1a1815;           /* near-black, warm */
    --body: #3d3a32;
    --muted: #6b665b;
    --line: #e4e0d4;
    --line-strong: #cfc9ba;

    --accent: #175d3c;        /* racing green — links, active states */
    --hot: #e05b26;           /* persimmon — the cursor, rare highlights */
    --amber: #9a6200;         /* pending / hot states */
    --red: #b3362b;           /* confirmed vulnerabilities only */

    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --nav-h: 65px;
  }
}

@layer base {
  @font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2192;
  }
  @font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/jbmono-var.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2192, U+2588;
  }
  @font-face {
    font-family: 'Newsreader';
    src: url('/fonts/newsreader-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F;
  }
  @font-face {
    font-family: 'Newsreader';
    src: url('/fonts/newsreader-italic-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F;
  }

  html {
    color-scheme: light;
    background: #f5f2eb;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
  }

  body {
    background: var(--bg);
    color: var(--body);
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.62;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
  }

  ::selection { background: var(--hot); color: #fff; }

  a { color: inherit; }

  code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    color: var(--ink);
    background: #efece2;
    padding: 1px 5px;
    border-radius: 2px;
  }

  :focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
  }

  .skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    padding: 8px 12px;
  }
  .skip:focus-visible { left: 16px; top: 12px; }
}

@layer layout {
  main > section,
  .footer {
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: 32px;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 88px);
    padding-bottom: 112px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 80px;
    border-top: 1px solid var(--line);
  }


  body.subpage main { padding-top: calc(var(--nav-h) + 56px); }
  body.subpage .section { border-top: 0; }

  .hero-lede {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 46ch));
    gap: 24px 56px;
    margin-top: 40px;
  }

  .footer {
    padding-top: 56px;
    padding-bottom: 56px;
    border-top: 1px solid var(--line);
  }
}

@layer components {
  /* ————— type roles ————— */
  .micro {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .display {
    font-family: var(--font-sans);
    font-size: clamp(48px, 6.4vw, 88px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.02;
    color: var(--ink);
    text-wrap: balance;
  }
  .display em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 480;
    letter-spacing: -0.015em;
  }

  .section-title {
    font-family: var(--font-serif);
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 420;
    letter-spacing: -0.02em;
    line-height: 1.06;
    color: var(--ink);
    text-wrap: balance;
    margin-top: 20px;
  }

  /* ————— kicker (section label row) ————— */
  .kicker {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .kicker-num { color: var(--hot); font-variant-numeric: tabular-nums; }
  .kicker-note { margin-left: auto; letter-spacing: 0.1em; color: var(--muted); }

  .section-note {
    margin-top: 28px;
    max-width: 58ch;
    color: var(--muted);
    font-size: 15.5px;
  }
  .section-note.first { max-width: 62ch; }
  .section-note .lnk { color: var(--accent); }

  /* ————— the cursor ————— */
  .cursor {
    font-family: var(--font-mono);
    color: var(--hot);
    font-weight: 400;
    animation: blink 1.06s linear infinite;
  }

  /* ————— links: bracket hint on hover (absolute — no layout shift, no gaps) ————— */
  .lnk {
    position: relative;
    text-decoration: none;
    transition: color 100ms var(--ease);
  }
  .lnk::before,
  .lnk::after {
    position: absolute;
    top: 0;
    font-family: var(--font-mono);
    font-size: 0.85em;
    line-height: inherit;
    color: var(--hot);
    opacity: 0;
    transition: opacity 100ms var(--ease);
    pointer-events: none;
  }
  .lnk::before { content: "["; right: 100%; margin-right: 3px; }
  .lnk::after { content: "]"; left: 100%; margin-left: 3px; }
  .lnk:hover { color: var(--accent); }
  .lnk:hover::before, .lnk:hover::after,
  .lnk:focus-visible::before, .lnk:focus-visible::after { opacity: 1; }
  .lnk-strong { color: var(--accent); font-weight: 500; }
  .lnk-strong:hover { color: var(--ink); }

  /* ————— nav ————— */
  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .nav-inner {
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: 32px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .wordmark {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14.5px;
    font-weight: 450;
    color: var(--body);
  }
  .btn {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--bg);
    background: var(--ink);
    padding: 8px 16px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 120ms var(--ease);
  }
  .btn:hover { background: var(--accent); color: #fff; }
  .menu-btn {
    display: none;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 7px 12px;
    background: var(--surface);
  }
  .menu {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 49;
    background: var(--bg);
    padding: 24px 32px;
    overflow-y: auto;
  }
  .menu-list a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--ink);
    text-decoration: none;
  }
  .menu-addr {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--hot);
    min-width: 3ch;
  }
  body.menu-open { overflow: hidden; }

  /* ————— hero ————— */
  .display { margin-top: 36px; max-width: 13ch; }
  .subline {
    max-width: 46ch;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
  }
  .founder {
    margin-top: 36px;
    font-size: 14px;
    color: var(--muted);
    max-width: 60ch;
  }
  .founder a { color: var(--accent); font-weight: 500; }


  /* ————— editorial rows (findings + fixes) ————— */
  .rows {
    margin-top: 56px;
    border-top: 1px solid var(--line-strong);
  }
  .row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 200px;
    gap: 12px 48px;
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
  }
  .row-num {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    color: var(--line-strong);
    font-variant-numeric: tabular-nums;
    padding-top: 4px;
  }
  .row:hover .row-num { color: var(--hot); transition: color 120ms var(--ease); }
  .row-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--ink);
  }
  .row-desc {
    margin-top: 10px;
    max-width: 64ch;
    font-size: 15.5px;
    color: var(--body);
  }
  .row-link {
    display: inline-block;
    margin-top: 14px;
    margin-right: 24px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--line-strong);
  }
  .row-link:hover { text-decoration-color: var(--hot); }
  .row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 6px;
  }
  .row-cve {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
    font-feature-settings: "zero", "ss01";
  }
  .chip {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    border: 1px solid;
    white-space: nowrap;
  }
  .chip-red {
    color: var(--red);
    border-color: color-mix(in srgb, var(--red) 45%, transparent);
    background: color-mix(in srgb, var(--red) 6%, transparent);
  }
  .chip-amber {
    color: var(--amber);
    border-color: color-mix(in srgb, var(--amber) 45%, transparent);
    background: color-mix(in srgb, var(--amber) 7%, transparent);
  }
  .chip-green {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
  }

  /* ————— the log ————— */
  .log { margin-top: 48px; border-top: 1px solid var(--line-strong); }
  .log-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 4px 32px;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
  }
  .log-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .log-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-wrap: balance;
  }
  .log-dek {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
    max-width: 62ch;
  }
  .log-src {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
  }
  .log-src .lnk { color: var(--accent); }



  /* ————— contact ————— */


  /* ————— terrain artwork (hero figure) ————— */
  .terrain {
    margin-top: 72px;
  }
  .terrain img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f0ede4;
  }
  .terrain-cap {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
  }

  /* ————— the system (pipeline figure + steps) ————— */
  .pipe { margin-top: 48px; }
  .pipe img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f0ede4;
  }
  .steps {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
  }
  .step {
    padding: 24px 28px 4px 0;
    border-bottom: 1px solid var(--line);
  }
  .step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
  .step .micro { color: var(--ink); }
  .step p { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

  /* ————— the index (homepage record rows) ————— */
  .index-rows {
    margin-top: 56px;
    border-top: 1px solid var(--line-strong);
  }
  .index-row {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr) auto;
    gap: 16px 48px;
    align-items: baseline;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
  }
  .index-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 480;
    letter-spacing: -0.015em;
    color: var(--ink);
    transition: color 120ms var(--ease);
  }
  .index-row:hover .index-title { color: var(--accent); }
  .index-desc {
    font-size: 15.5px;
    color: var(--muted);
    max-width: 56ch;
  }
  .index-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
  }
  .index-arrow {
    display: inline-block;
    margin-left: 14px;
    color: var(--hot);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 120ms var(--ease), transform 120ms var(--ease);
  }
  .index-row:hover .index-arrow { opacity: 1; transform: none; }

  /* ————— contact ————— */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    margin-top: 56px;
  }
  .contact-path p {
    margin: 14px 0 24px;
    color: var(--body);
    font-size: 16px;
    max-width: 46ch;
  }
  .contact-path .lnk { font-family: var(--font-mono); font-size: 13.5px; }
  .contact-mail {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--muted);
  }
  .contact-mail .lnk {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--line-strong);
  }
  .contact-mail .lnk:hover { text-decoration-color: var(--hot); }

  /* ————— footer ————— */
  .foot-grid {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 20px 48px;
  }
  .foot-map {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    font-size: 14px;
    color: var(--body);
  }
  .foot-social {
    display: flex;
    gap: 22px;
    font-size: 14px;
    color: var(--body);
  }
  .foot-legal {
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
  }

  /* ————— privacy policy ————— */
  .policy-block { margin-top: 48px; max-width: 68ch; }
  .policy-block h3 { color: var(--ink); }
  .policy-block p { margin-top: 12px; color: var(--body); font-size: 16.5px; line-height: 1.7; }
  .policy-block .lnk {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--line-strong);
  }
  .policy-block .lnk:hover { text-decoration-color: var(--hot); }
  .policy .section-title { margin-bottom: 8px; }
}

@layer motion {
  @keyframes blink {
    0%, 49.9% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }

  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 450ms var(--ease), transform 450ms var(--ease);
  }
  html.js [data-reveal].in { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cursor { animation: none; opacity: 1; }
    html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .lnk, .lnk::before, .lnk::after { transition: none; }
  }

  /* ————— small screens ————— */
  @media (max-width: 960px) {
    .hero { padding-top: calc(var(--nav-h) + 64px); padding-bottom: 88px; }
    .hero-lede { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  }

  @media (max-width: 760px) {
    main > section, .footer { padding-inline: 20px; }
    .nav-inner { padding-inline: 20px; }
    .nav-links { display: none; }
    .menu-btn { display: inline-flex; align-items: baseline; gap: 2px; }

    .kicker { flex-wrap: wrap; gap: 4px 12px; }
    .kicker-note { width: 100%; margin-left: 0; }

    .row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
    .row-num { font-size: 28px; padding-top: 0; }
    .row-side { flex-direction: row; align-items: baseline; padding-top: 0; }

    .log-row { grid-template-columns: 1fr auto; }
    .log-date { grid-column: 1; grid-row: 1; }
    .log-src { grid-column: 2; grid-row: 1; text-align: right; }
    .log-main { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }

    .contact-grid { grid-template-columns: 1fr; gap: 44px; }

    .terrain { margin-top: 48px; }
    .terrain-cap { font-size: 11px; }
    .index-row { grid-template-columns: 1fr; gap: 6px; padding: 26px 0; }
    .index-title { font-size: 26px; }
    .steps { grid-template-columns: 1fr; }
    .step + .step { padding-left: 0; border-left: 0; }
    .step { padding-bottom: 24px; }
    .btn { padding: 8px 12px; }
  }
}
