/* ------------------------------------------------------------------
   Robert Perez - Security Lab Notes
   Custom dark theme. Designed for recruiters and beginner learners.
   ------------------------------------------------------------------ */

:root {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --bg-elev-2: #1c2128;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  /* Lighter gray for running body copy so paragraphs clear WCAG AA (4.5:1).
     --fg-muted stays for chrome (tags, labels, dates). */
  --fg-body: #aeb6c1;
  --fg-faint: #6e7681;
  --border: #30363d;
  --border-soft: #21262d;
  --accent: #58a6ff;
  --accent-strong: #79c0ff;
  --accent-soft: rgba(88, 166, 255, 0.12);
  --green: #7ee787;
  --green-soft: rgba(126, 231, 135, 0.12);
  --orange: #ffa657;
  --orange-soft: rgba(255, 166, 87, 0.12);
  --red: #ff7b72;
  --purple: #d2a8ff;
  --code-bg: #010409;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;
  --max-prose: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--accent-strong); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  margin: 1.8em 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; margin-top: 0; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border-soft); padding-bottom: 0.35em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; color: var(--fg-muted); }

p { margin: 1em 0; }

ul, ol { margin: 1em 0; padding-left: 1.5em; }
li { margin: 0.35em 0; }
li > p { margin: 0.25em 0; }

strong { color: var(--accent-strong); font-weight: 600; }
em { color: var(--green); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 2.5em 0; }

blockquote {
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg-muted);
}
blockquote p { margin: 0.4em 0; }

/* ------------------------------------------------------------------
   Inline code + code blocks
   ------------------------------------------------------------------ */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-elev);
  color: var(--orange);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1em 1.2em;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 1.4em 0;
}
pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--fg);
  font-size: inherit;
}

/* Rouge syntax highlighting - dark theme */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp, .highlight .cs { color: #8b949e; font-style: italic; }
.highlight .err { color: var(--red); }
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: var(--red); }
.highlight .o, .highlight .ow { color: var(--accent-strong); }
.highlight .nb, .highlight .nf, .highlight .fm { color: var(--purple); }
.highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi { color: var(--orange); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sr, .highlight .ss, .highlight .sx { color: #a5d6ff; }
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .mo, .highlight .il { color: #79c0ff; }
.highlight .na, .highlight .nc, .highlight .no, .highlight .nl, .highlight .nn, .highlight .py { color: var(--green); }
.highlight .nt { color: var(--accent); }
.highlight .p, .highlight .pi { color: var(--fg); }
.highlight .gh, .highlight .gu { color: var(--accent); font-weight: bold; }
.highlight .gd { color: var(--red); background: rgba(255, 123, 114, 0.1); }
.highlight .gi { color: var(--green); background: rgba(126, 231, 135, 0.1); }
.highlight .gp { color: var(--fg-muted); }

/* ------------------------------------------------------------------
   Site navigation
   ------------------------------------------------------------------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9em 1.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fg);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; color: var(--fg); }
.nav-brand-prompt {
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(88, 166, 255, 0.3);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}
.nav-brand-name {
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.3em;
}

.nav-link {
  color: var(--fg-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5em 0.9em;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.nav-link:hover {
  color: var(--fg);
  background: var(--bg-elev);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5em 0.6em;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
}

/* ------------------------------------------------------------------
   Main / shared
   ------------------------------------------------------------------ */
.site-main {
  min-height: calc(100vh - 200px);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5em;
}

.container-prose {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 0 1.5em;
}

/* ------------------------------------------------------------------
   Homepage hero
   ------------------------------------------------------------------ */
.hero {
  padding: 3em 1.5em 2.5em;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(88, 166, 255, 0.08), transparent 60%);
  border-bottom: 1px solid var(--border-soft);
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(88, 166, 255, 0.3);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: 1em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--fg);
}

.hero-title-prompt {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--fg-body);
  max-width: 640px;
  margin: 0 auto 1.75em;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75em;
  flex-wrap: wrap;
}

/* Availability / target-role line under the hero buttons */
.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  /* Even breathing room above (buttons) and below (stats bar, which adds
     its own 2em top margin) so the line is not sandwiched. */
  margin: 2em auto 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
}
.hero-availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(126, 231, 135, 0.6);
  flex-shrink: 0;
}

/* Stats bar under hero */
.stats-bar {
  margin-top: 2em;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
.stat {
  flex: 1;
  min-width: 160px;
  padding: 1em 1.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  border-right: 1px solid var(--border-soft);
}
.stat:last-child { border-right: 0; }
.stat-number {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.stat-divider {
  color: var(--fg-faint);
  font-weight: 400;
  margin: 0 0.15em;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.25em;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--fg);
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--bg-elev-2);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--bg);
}

/* ------------------------------------------------------------------
   Section blocks (used on home)
   ------------------------------------------------------------------ */
.section {
  padding: 4em 0;
  border-bottom: 1px solid var(--border-soft);
}
.section:first-of-type { padding-top: 3em; }
.section:last-of-type { border-bottom: 0; }

.section-header {
  text-align: center;
  margin-bottom: 2.5em;
}
.section-title {
  font-size: 1.75rem;
  margin: 0 0 0.4em;
}
.section-subtitle {
  color: var(--fg-body);
  margin: 0;
  font-size: 1rem;
}

/* ------------------------------------------------------------------
   Lab cards grid
   ------------------------------------------------------------------ */
.lab-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  margin: 0 0 0.9em;
  justify-content: center;
}
.lab-filter:last-of-type { margin-bottom: 2em; }
.lab-filter-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  margin-right: 0.3em;
  min-width: 4.5em;
  text-align: right;
}
.lab-filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 0.45em 1em;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.lab-filter-btn:hover {
  color: var(--fg);
  border-color: var(--accent);
}
.lab-filter-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4em 1.5em;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.lab-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: opacity 0.18s ease, transform 0.25s ease;
}
.lab-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top right, rgba(255, 123, 114, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.lab-card:hover {
  border-color: var(--red);
  background: var(--bg-elev-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 123, 114, 0.15);
}
.lab-card:hover::before { opacity: 1; transform: scaleX(1); }
.lab-card:hover::after { opacity: 1; }

.lab-card[data-category="blue-team"]::before { background: var(--accent); }
.lab-card[data-category="blue-team"]::after {
  background: radial-gradient(circle at top right, rgba(88, 166, 255, 0.06), transparent 60%);
}
.lab-card[data-category="blue-team"]:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(88, 166, 255, 0.15);
}

.lab-card-meta {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-bottom: 0.9em;
  font-size: 0.78rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-soft);
  padding: 0.18em 0.55em;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.tag-platform { color: var(--fg-muted); border-color: var(--border-soft); background: var(--bg-elev-2); }
.tag-difficulty-easy { color: var(--green); border-color: rgba(126, 231, 135, 0.2); background: var(--green-soft); }
.tag-difficulty-medium { color: var(--orange); border-color: rgba(255, 166, 87, 0.2); background: var(--orange-soft); }
.tag-difficulty-hard { color: var(--red); border-color: rgba(255, 123, 114, 0.2); background: rgba(255, 123, 114, 0.1); }
.tag-category-offensive { color: var(--red); border-color: rgba(255, 123, 114, 0.25); background: rgba(255, 123, 114, 0.12); }
.tag-category-blue-team { color: var(--accent); border-color: rgba(88, 166, 255, 0.25); background: var(--accent-soft); }

.lab-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4em;
  line-height: 1.3;
  color: var(--fg);
}
.lab-card-title a {
  color: inherit;
  text-decoration: none;
}
/* The title link expands via ::before to cover the entire card, making
   the whole card clickable. Other interactive items (the read-writeup
   link) use a higher z-index to stay independently clickable. */
.lab-card-title a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-lg);
}
.lab-card-title a:hover { color: var(--red); }
.lab-card[data-category="blue-team"] .lab-card-title a:hover { color: var(--accent); }

.lab-card-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
  margin: 0 0 0.9em;
}

.lab-card-summary {
  color: var(--fg-body);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1em;
  /* Do NOT use flex:1 here. It stretches this box past the clamp height,
     which defeats -webkit-line-clamp and lets long summaries render a 5th
     line that overflow:hidden then slices mid-text under the read link. */
  flex: 0 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Pin the summary to a constant 4-line height (min == max) so a short
     excerpt reserves the same space as a full one. This keeps the read
     link on the same baseline across a row instead of riding up under a
     shorter card. The value is 4 lines at font-size 0.92rem, line-height
     1.55. min-height also serves as the fallback cap for engines that
     ignore -webkit-line-clamp. */
  min-height: calc(0.92rem * 1.55 * 4);
  max-height: calc(0.92rem * 1.55 * 4);
}

.lab-card-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: auto;
  letter-spacing: 0.01em;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.lab-card-link::after {
  content: "→";
  transition: transform 0.18s ease;
  display: inline-block;
}
.lab-card[data-category="blue-team"] .lab-card-link { color: var(--accent-strong); }
.lab-card:hover .lab-card-link { color: #ff9b94; }
.lab-card[data-category="blue-team"]:hover .lab-card-link { color: #a5d6ff; }
.lab-card:hover .lab-card-link::after {
  transform: translateX(4px);
}

/* ------------------------------------------------------------------
   Skills section (homepage)
   ------------------------------------------------------------------ */
.section-skills { background: rgba(255, 255, 255, 0.01); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25em;
}

.skills-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.4em 1.5em;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.skills-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.skills-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1em;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.skills-card-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skills-dot-red { background: var(--red); box-shadow: 0 0 8px rgba(255, 123, 114, 0.5); }
.skills-dot-green { background: var(--green); box-shadow: 0 0 8px rgba(126, 231, 135, 0.5); }
.skills-dot-blue { background: var(--accent); box-shadow: 0 0 8px rgba(88, 166, 255, 0.5); }
.skills-dot-orange { background: var(--orange); box-shadow: 0 0 8px rgba(255, 166, 87, 0.5); }
.skills-dot-purple { background: var(--purple); box-shadow: 0 0 8px rgba(210, 168, 255, 0.5); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-soft);
  padding: 0.28em 0.65em;
  border-radius: 4px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.skills-card-footnote {
  margin: 1em 0 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* ------------------------------------------------------------------
   Manual page (tabbed command reference)
   ------------------------------------------------------------------ */
.manual-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  margin: 2.5em 0 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--border-soft);
}
.manual-tab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.5em 1.1em;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.manual-tab:hover { color: var(--fg); border-color: var(--accent); }
.manual-tab.active {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
}

/* One level shown at a time. Level 1 keeps the active class in markup so
   the page still shows content if JavaScript is disabled. */
.manual-panel { display: none; }
.manual-panel.active { display: block; }
.manual-panel h1:first-child { margin-top: 0; }

.manual-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-soft);
}
.manual-nav .btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.manual-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.manual-nav .btn:disabled:hover {
  background: var(--bg-elev);
  border-color: var(--border);
  transform: none;
}
.manual-progress {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-faint);
  text-align: center;
  flex: 1;
}

@media (max-width: 720px) {
  /* Keep the four tabs on one swipeable row instead of stacking. */
  .manual-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .manual-tab { flex: 0 0 auto; }
}

/* ------------------------------------------------------------------
   Page + lab writeup pages
   ------------------------------------------------------------------ */
.page-header {
  padding: 3.5em 1.5em 2em;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.page-header-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5em;
}
.page-header-subtitle {
  color: var(--fg-body);
  margin: 0;
  font-size: 1.05rem;
}

.page-content {
  padding: 3em 1.5em;
}

.lab-header {
  padding: 3em 1.5em 2em;
  border-bottom: 1px solid var(--border-soft);
  max-width: var(--max-prose);
  margin: 0 auto;
}
.lab-header-meta {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin-bottom: 1em;
}
.lab-header-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
.lab-header-summary {
  color: var(--fg-body);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.lab-content {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 2.5em 1.5em 4em;
}
.lab-content h2:first-child { margin-top: 0; }

.lab-content ul, .lab-content ol { padding-left: 1.4em; }

.lab-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lab-content img:hover { border-color: var(--accent); }

/* Lightbox (click any image in a lab post to enlarge) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2em;
  z-index: 1000;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1.2em;
  right: 1.2em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lightbox-close:hover {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}

.lab-footer-nav {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 2em 1.5em 4em;
  border-top: 1px solid var(--border-soft);
}
.lab-footer-nav a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elev);
  margin-top: 4em;
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.8em 1.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
}
.footer-text {
  color: var(--fg-muted);
  font-size: 0.85rem;
}
.footer-sep { color: var(--fg-faint); margin: 0 0.4em; }
.footer-links {
  display: flex;
  gap: 1.2em;
}
.footer-links a {
  color: var(--fg-muted);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent); }

/* ------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------ */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 1.5em;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5em;
    flex-direction: column;
    min-width: 160px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.6em 0.9em; }

  .hero { padding: 4em 1.5em 3.5em; }
  .stats-bar {
    flex-direction: column;
    margin-top: 2.5em;
  }
  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    padding: 0.85em 1em;
  }
  .stat:last-child { border-bottom: 0; }
  .lab-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .lab-header, .lab-content, .lab-footer-nav { padding-left: 1.25em; padding-right: 1.25em; }
}

/* ------------------------------------------------------------------
   About page headshot
   ------------------------------------------------------------------ */
.about-photo {
  width: 175px;
  height: 175px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  float: right;
  margin: 0.25rem -3rem 1rem 1.75rem;
}

@media (max-width: 560px) {
  .about-photo {
    float: none;
    display: block;
    margin: 0 auto 1.5rem;
  }
}
