/* ============================================================
   Goldberg Security Research — static site stylesheet
   No framework, no build. Tune the palette in :root.
   ============================================================ */

:root {
  /* palette */
  --bg:        #0a0c10;
  --bg-soft:   #11141b;
  --panel:     #141821;
  --panel-2:   #181d28;
  --border:    #232a38;
  --border-hi: #2f3a4d;
  --text:      #e6ebf2;
  --text-dim:  #aeb8c7;
  --muted:     #7c8799;
  --gold:      #e6b450;
  --gold-bright:#f5cd72;
  --blue:      #7ab3ff;

  /* severity */
  --crit: #ff5b6e;
  --high: #ff9457;
  --med:  #ffce5c;
  --low:  #6fe39a;

  /* type */
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* layout */
  --w: 1080px;
  --radius: 14px;
  --shadow: 0 10px 40px -12px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: #a9ccff; }

.container { width: min(var(--w), 92vw); margin: 0 auto; }
.mono { font-family: var(--mono); }
.accent { color: var(--gold); }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(10,12,16,0.72);
  backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.02rem; color: var(--text);
  letter-spacing: .2px;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(140deg, var(--gold-bright), #b8862f);
  color: #1b1304; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 1rem;
  box-shadow: 0 0 0 1px rgba(230,180,80,.25), 0 6px 18px -6px rgba(230,180,80,.5);
}
.brand .accent { color: var(--gold); }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); font-size: .92rem; padding: 7px 12px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 76px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 78% -8%, rgba(230,180,80,.10), transparent 60%),
    radial-gradient(700px 340px at 8% 120%, rgba(122,179,255,.07), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(680px 380px at 70% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border-hi); border-radius: 999px;
  padding: 5px 13px; margin-bottom: 22px; background: rgba(230,180,80,.05);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--low); box-shadow: 0 0 8px var(--low); }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08; margin: 0 0 18px;
  letter-spacing: -1px; font-weight: 800;
}
.hero p { color: var(--text-dim); font-size: 1.18rem; max-width: 60ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border-radius: 10px; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--gold); color: #1b1304; box-shadow: 0 8px 24px -10px rgba(230,180,80,.7); }
.btn-primary:hover { color: #1b1304; filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--border-hi); color: var(--text); }
.btn-ghost:hover { color: var(--text); border-color: var(--gold); background: var(--panel); }

/* ---------------- Sections ---------------- */
section { padding: 78px 0; border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 38px; }
.section-head h2 {
  font-family: var(--mono); font-size: 1.5rem; margin: 0 0 6px; font-weight: 700; letter-spacing: -.3px;
}
.section-head h2::before { content: "# "; color: var(--gold); }
.section-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }

.lead { max-width: 70ch; color: var(--text-dim); font-size: 1.06rem; }

/* ---------------- Grids / cards ---------------- */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 1.16rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .95rem; }

/* service card */
.svc-num {
  font-family: var(--mono); font-size: .8rem; color: var(--gold);
  border: 1px solid var(--border-hi); border-radius: 7px; padding: 3px 9px;
  display: inline-block; margin-bottom: 14px;
}
.card .role { color: var(--gold); font-family: var(--mono); font-size: .84rem; margin: 0 0 12px; }
.card .links { margin-top: 14px; display: flex; gap: 14px; }
.card .links a { font-size: .85rem; font-family: var(--mono); }

/* team avatar */
.avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-bright), #b8862f);
  color: #1b1304; font-family: var(--mono); font-weight: 800; font-size: 1.25rem;
  display: grid; place-items: center; margin-bottom: 16px;
  box-shadow: 0 0 0 1px rgba(230,180,80,.2);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- Stats strip ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--panel); padding: 24px; text-align: center; }
.stat .num { font-family: var(--mono); font-size: 1.9rem; font-weight: 800; color: var(--gold); }
.stat .lbl { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ---------------- Writeup list ---------------- */
.writeup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.writeup-item {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; transition: border-color .2s, transform .2s;
  display: block;
}
.writeup-item:hover { border-color: var(--gold); transform: translateX(3px); }
.writeup-item .title { font-size: 1.18rem; color: var(--text); font-weight: 650; display: block; }
.writeup-item:hover .title { color: var(--gold-bright); }
.writeup-meta { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.writeup-item .excerpt { color: var(--text-dim); margin: 12px 0 0; font-size: .95rem; }

/* ---------------- Badges ---------------- */
.badge {
  font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border-hi); text-transform: uppercase; letter-spacing: .6px; white-space: nowrap;
}
.badge.cve { color: var(--blue); border-color: rgba(122,179,255,.5); }
.badge.mal { color: #c08cf0; border-color: rgba(192,140,240,.5); background: rgba(192,140,240,.08); }
.badge.sev-critical { color: var(--crit); border-color: rgba(255,91,110,.5); background: rgba(255,91,110,.08); }
.badge.sev-high     { color: var(--high); border-color: rgba(255,148,87,.5); background: rgba(255,148,87,.08); }
.badge.sev-medium   { color: var(--med);  border-color: rgba(255,206,92,.5); background: rgba(255,206,92,.08); }
.badge.sev-low      { color: var(--low);  border-color: rgba(111,227,154,.5); background: rgba(111,227,154,.08); }
.tag { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

/* ---------------- Contact ---------------- */
.contact-box {
  background: linear-gradient(140deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}

/* ---------------- Article ---------------- */
.article { padding: 52px 0 84px; }
.article .container { width: min(800px, 92vw); }
.back { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.back:hover { color: var(--gold); }
.article-head { margin: 20px 0 26px; }
.article-head .row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 16px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.5px; }
.byline { color: var(--muted); font-size: .92rem; }
.byline strong { color: var(--text-dim); }

.factbox {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: 10px;
  padding: 20px 24px; margin: 0 0 36px;
}
.factbox dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 24px; margin: 0; }
.factbox dt { color: var(--muted); font-family: var(--mono); font-size: .84rem; }
.factbox dd { margin: 0; font-size: .93rem; color: var(--text-dim); }

.article-body { font-size: 1.05rem; color: var(--text-dim); }
.article-body h2 { font-family: var(--mono); color: var(--text); font-size: 1.32rem; margin: 40px 0 12px; letter-spacing: -.3px; }
.article-body h3 { color: var(--text); font-size: 1.12rem; margin: 28px 0 8px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body strong { color: var(--text); }
.article-body code {
  font-family: var(--mono); font-size: .87em; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: #e9c98a;
}
.article-body pre {
  font-family: var(--mono); font-size: .86rem; background: #06080c;
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
  overflow-x: auto; line-height: 1.55; margin: 18px 0;
}
.article-body pre code { background: none; border: none; padding: 0; color: #cdd6e3; }
.article-body blockquote {
  border-left: 3px solid var(--blue); margin: 20px 0; padding: 6px 20px;
  color: var(--muted); background: rgba(122,179,255,.04); border-radius: 0 8px 8px 0;
}
.timeline { list-style: none; padding: 0; }
.timeline li { padding-left: 22px; position: relative; margin-bottom: 7px; }
.timeline li::before { content: "▸"; color: var(--gold); position: absolute; left: 0; }

/* ---------------- Footer ---------------- */
.site-footer { padding: 40px 0; color: var(--muted); font-size: .88rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .nav { gap: 0; }
  .nav a { padding: 7px 9px; font-size: .85rem; }
  section { padding: 56px 0; }
  .hero { padding: 70px 0 56px; }
}
