@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #BA0C2F;
  --dark-red: #8B0000;
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1c1c1c;
  --text: #f0f0f0;
  --text-muted: #888888;
  --border: #222222;
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 34px;
  width: auto;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, black 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, black 55%, transparent 100%);
}

.nav-logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.25s;
}

/* ── Page Wrapper ── */
.page {
  padding-top: 64px;
}

/* ── Hero ── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(186, 12, 47, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 12, 47, 0.10) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 820px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-large {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, black 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, black 55%, transparent 100%);
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--red);
}

.hero-title {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-title .accent {
  color: var(--red);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: #aaaaaa;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
  max-width: 640px;
  line-height: 1.5;
}

.hero-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  background: var(--red);
  color: #fff;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--dark-red);
  border-color: var(--dark-red);
}

.btn-ghost {
  color: var(--text-muted);
  border-color: var(--border);
  margin-left: 1rem;
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: transparent;
}

/* ── Section Base ── */
section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--red);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section-subtitle {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  max-width: 580px;
  line-height: 1.75;
}

/* ── Services Grid (Home) ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 2.5rem;
}

.service-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  transition: background 0.2s;
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.service-card:hover {
  background: var(--surface-2);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 36px;
  height: 36px;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Services Page ── */
.service-detail {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.service-detail h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.service-detail .lead {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.925rem;
  line-height: 1.8;
  max-width: 700px;
}

.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.375rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.service-item::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: var(--red);
  flex-shrink: 0;
}

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 5rem;
}

.photo-wrapper {
  position: relative;
  display: block;
  line-height: 0;
}

.photo-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(139, 0, 0, 0.22);
  mix-blend-mode: normal;
  pointer-events: none;
}

.photo-wrapper img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.about-photo-caption {
  margin-top: 0.875rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.about-text h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
}

.about-text p strong {
  color: var(--text);
  font-weight: 600;
}

.about-text p a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.about-text p a:hover {
  border-bottom-color: var(--red);
  color: var(--text);
}

.expertise-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.expertise-section h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.775rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  transition: all 0.2s;
}

.tag:hover {
  border-color: var(--red);
  color: var(--text);
}

/* ── Research ── */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.research-item {
  background: var(--surface);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.research-item:hover {
  background: var(--surface-2);
}

.research-type {
  font-family: var(--mono);
  font-size: 0.675rem;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.research-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.research-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.research-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

.research-meta .cve {
  display: block;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.research-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.research-placeholder p {
  margin-top: 0.5rem;
  opacity: 0.6;
}

/* ── Contact ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.contact-info p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 0.925rem;
  margin-bottom: 1rem;
}

.contact-info p a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.contact-info p a:hover {
  color: var(--text);
  border-bottom-color: var(--red);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  transition: border-color 0.2s;
  text-decoration: none;
}

.contact-link:hover {
  border-color: var(--red);
}

.contact-link svg {
  color: var(--red);
  flex-shrink: 0;
}

/* Contact form */
.contact-form {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
}

.contact-process h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.process-step {
  display: flex;
  gap: 1.25rem;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  min-width: 20px;
  padding-top: 2px;
}

.step-content h4 {
  font-size: 0.925rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Page Header (inner pages) ── */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(186, 12, 47, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 12, 47, 0.10) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.page-header .section-label {
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  max-width: 600px;
  line-height: 1.75;
}

/* ── Divider ── */
.divider {
  width: 40px;
  height: 3px;
  background: var(--red);
  margin: 1.5rem 0;
}

/* ── CTA Section ── */
.cta-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Stat Bar ── */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 4rem;
}

.stat {
  background: var(--surface);
  padding: 2rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  font-family: var(--mono);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-logo img {
  height: 26px;
}

.footer-logo span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links a {
  font-size: 0.775rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-photo {
    position: static;
    max-width: 240px;
    margin: 0 auto;
    text-align: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-left {
    justify-content: center;
  }

  .hero-right {
    align-items: center;
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-logo-large {
    max-width: 400px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .stat-bar {
    grid-template-columns: 1fr;
  }

  .research-item {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }

  .research-meta {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* ── Write-up Pages ── */
.writeup-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.875rem;
}

.writeup-meta-item {
  font-family: var(--mono);
  font-size: 0.725rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.writeup-meta-item .accent {
  color: var(--red);
}

.series-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 0.875rem 1.25rem;
  margin-bottom: 2.5rem;
}

.series-info-label {
  font-family: var(--mono);
  font-size: 0.675rem;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.series-info-title {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.series-info-title a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.series-info-title a:hover {
  color: var(--text);
  border-bottom-color: var(--red);
}

.writeup-body {
  max-width: 800px;
  padding-bottom: 3rem;
}

.writeup-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.5rem 0 0.875rem;
  color: var(--text);
}

.writeup-body h3 {
  font-size: 0.925rem;
  font-weight: 600;
  margin: 2rem 0 0.625rem;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.writeup-body p {
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
}

.writeup-body a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.writeup-body a:hover {
  border-bottom-color: var(--red);
}

.writeup-body strong {
  color: var(--text);
  font-weight: 600;
}

.writeup-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.7;
}

.writeup-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--red);
  background: var(--surface);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
}

.writeup-body pre code {
  color: var(--text);
  background: none;
  padding: 0;
  border: none;
  font-size: 1em;
}

.writeup-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.writeup-body li {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.75;
  margin-bottom: 0.375rem;
}

.writeup-img {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  display: block;
}

.writeup-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  max-width: 720px;
}

.writeup-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Flag spoiler block */
.spoiler {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
}

.spoiler::before {
  content: 'Flag';
  display: block;
  font-family: var(--mono);
  font-size: 0.675rem;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.spoiler p {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
  margin: 0 !important;
  line-height: 1.6;
}

/* Write-up prev/next nav */
.writeup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.writeup-nav a {
  font-family: var(--mono);
  font-size: 0.725rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.writeup-nav a:hover {
  color: var(--red);
}

.writeup-nav .nav-center {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* GitHub Gist dark theme overrides */
.gist {
  margin: 1.5rem 0;
}

.gist .gist-file {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
}

.gist .gist-data {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

.gist .gist-meta {
  background: var(--surface-2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 0.5rem 0.875rem !important;
}

.gist .gist-meta a {
  color: var(--text-muted) !important;
}

.gist table, .gist tr, .gist td {
  border: none !important;
  background: var(--surface) !important;
}

.gist .blob-num {
  color: var(--text-muted) !important;
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  padding: 0 0.75rem !important;
}

.gist .blob-code-inner {
  color: var(--text) !important;
}

.gist .pl-c { color: #888 !important; }
.gist .pl-k { color: var(--red) !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .container {
    padding: 0 1.25rem;
  }
}
