/* ============================================================
   DESIGN TOKENS
   Theme: signal path — a career that ran analog voice circuits
   for two decades before turning that same signal-tracing
   instinct toward web application security.
   ============================================================ */

:root {
  /* Color */
  --bg:          #10161C;   /* rack-room dark */
  --bg-panel:    #182029;   /* card / panel surface */
  --bg-panel-2:  #1D2731;   /* slightly raised panel */
  --line:        #2A343F;   /* hairline dividers, patch traces */
  --text:        #E7EAEE;
  --text-muted:  #8D98A6;
  --text-faint:  #5B6572;
  --amber:       #E8A33D;   /* status-light amber — primary accent */
  --amber-dim:   #8A6326;
  --teal:        #4FD1C5;   /* fiber/data accent — secondary */
  --teal-dim:    #2C6E68;
  --danger:      #E2635A;

  /* Type */
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
  color: var(--text);
}

p { margin: 0 0 1em 0; color: var(--text); }
.muted { color: var(--text-muted); }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   STATUS LIGHT — small pulsing dot used as a recurring motif,
   like an equipment power/link LED.
   ============================================================ */
.status-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px 1px rgba(232, 163, 61, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .status-light { animation: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(16, 22, 28, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active {
  color: var(--amber);
  text-decoration: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  max-width: 14ch;
  margin-bottom: 24px;
}
.hero .lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 36px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: inline-block;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--amber);
  color: #14100A;
  border-color: var(--amber);
  font-weight: 700;
}
.btn-primary:hover { background: #F0B25A; }
.btn-secondary {
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

/* ============================================================
   SIGNAL TRACE — the signature element.
   An oscilloscope-style waveform that starts as a smooth,
   even sine wave (20 years of voice/network engineering)
   and breaks into a sharp, irregular trace partway across
   (the turn toward offensive security). Rendered as inline SVG.
   ============================================================ */
.signal-trace {
  width: 100%;
  height: auto;
  display: block;
}
.signal-trace .trace-smooth { stroke: var(--teal); }
.signal-trace .trace-sharp { stroke: var(--amber); }
.signal-trace path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.signal-trace .trace-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   SECTIONS / DIVIDERS
   ============================================================ */
section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.section-head h2 { font-size: 22px; margin: 0; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.trace-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--teal-dim), var(--line) 40%, var(--amber-dim));
  border: none;
  margin: 0;
}

/* ============================================================
   CARDS — styled loosely like patch-panel port labels
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--teal-dim); }
.card .port-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* Writeup list items */
.writeup-list { display: flex; flex-direction: column; gap: 0; }
.writeup-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.writeup-item:first-child { padding-top: 0; }
.writeup-item .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  padding-top: 4px;
}
.writeup-item h3 { font-size: 18px; margin-bottom: 6px; }
.writeup-item h3 a { color: var(--text); }
.writeup-item h3 a:hover { color: var(--amber); text-decoration: none; }
.writeup-item p { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  border: 1px solid var(--teal-dim);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ============================================================
   TIMELINE (about page)
   ============================================================ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--teal-dim), var(--amber-dim));
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--teal);
}
.timeline-item.current::before { border-color: var(--amber); }
.timeline-item .range {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.timeline-item h4 { font-size: 16px; margin-bottom: 6px; }
.timeline-item p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ============================================================
   WRITEUP TEMPLATE PAGE
   ============================================================ */
.writeup-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.writeup-header .tag-row { margin-bottom: 20px; }
.writeup-header h1 { font-size: clamp(26px, 4vw, 38px); max-width: 20ch; }
.writeup-meta {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 20px;
}
.writeup-body { padding: 48px 0; max-width: 720px; }
.writeup-body h2 {
  font-size: 20px;
  margin-top: 48px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.writeup-body h2::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
.writeup-body h2:first-child { margin-top: 0; }
.writeup-body p { color: var(--text-muted); }
.writeup-body code {
  font-family: var(--font-mono);
  background: var(--bg-panel);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--teal);
}
.writeup-body pre {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
}
.impact-box {
  background: var(--bg-panel-2);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 20px 0;
}
.impact-box p:last-child { margin-bottom: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin: 0;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; font-size: 11px; }
  .writeup-item { grid-template-columns: 1fr; gap: 8px; }
  .writeup-item .date { padding-top: 0; }
  .hero { padding: 64px 0 44px; }
  section { padding: 48px 0; }
}
