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

:root {
  --bg: #070a0f;
  --bg2: #0b1118;
  --surface: #101923;
  --surface2: #162334;
  --line: rgba(232, 237, 243, 0.09);
  --line2: rgba(232, 237, 243, 0.16);
  --accent: #00e5a0;
  --accent-rgb: 0, 229, 160;
  --accent-soft: rgba(0, 229, 160, 0.08);
  --brand-accent: #00e5a0;
  --accent2: #4d8dff;
  --accent3: #ff4d6d;
  --text: #eef4fb;
  --muted: #98a6b7;
  --muted2: #667385;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-rgb), 0.12), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(77, 141, 255, 0.09), transparent 30rem),
    linear-gradient(180deg, #070a0f 0%, #091018 42%, #070a0f 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.055'/%3E%3C/svg%3E");
}

a, button { -webkit-tap-highlight-color: transparent; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 3rem;
  background: rgba(7, 10, 15, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-brand {
  color: var(--brand-accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-back {
  padding: 7px 14px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.nav-back:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-hamburger {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 0.75rem 1.5rem 1.25rem;
  background: rgba(7, 10, 15, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  display: flex;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:hover { color: var(--accent); }

.container {
  position: relative;
  z-index: 1;
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 0 3rem;
}

.project-header {
  position: relative;
  z-index: 1;
  padding: 8.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

.project-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 72%),
    linear-gradient(rgba(var(--accent-rgb), 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 141, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.breadcrumb a { color: var(--brand-accent); text-decoration: none; }
.breadcrumb a:hover { opacity: 0.78; }
.breadcrumb span { color: var(--muted2); }

.project-num {
  margin-bottom: 1rem;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 1.4rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(3rem, 7.6vw, 6.1rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.9;
}

.project-lead {
  max-width: 760px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
}

.tag {
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.tag.green { border-color: rgba(var(--accent-rgb), 0.35); color: var(--accent); }
.tag.blue { border-color: rgba(77, 141, 255, 0.35); color: #75a8ff; }
.tag.red { border-color: rgba(255, 77, 109, 0.35); color: var(--accent3); }

.project-body {
  position: relative;
  z-index: 1;
  padding: 5rem 0 6rem;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.project-grid > * { min-width: 0; }

h2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 3rem 0 1rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

h2:first-child { margin-top: 0; }

h2::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

h3 {
  margin: 2rem 0 0.75rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.2;
}

p {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.8;
}

p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 550; }

p, code, pre, .tag, .tool-pill, .project-lead, .machine-desc, .phase-desc,
.finding-desc, .vuln-section-text, .chain-desc, .flow-desc { overflow-wrap: anywhere; }

.divider {
  height: 1px;
  margin: 2.75rem 0;
  background: var(--line);
}

.flow { display: flex; flex-direction: column; gap: 0; margin: 1.5rem 0; }

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 10px minmax(0, 1fr);
  gap: 0 1rem;
  align-items: start;
  padding-bottom: 1.5rem;
}

.flow-step:last-child { padding-bottom: 0; }
.flow-connector { position: absolute; left: 33px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.flow-step:last-child .flow-connector { display: none; }
.flow-num { padding-top: 2px; color: var(--muted2); font-family: var(--mono); font-size: 10px; }
.flow-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; flex-shrink: 0; }
.flow-dot.green { background: var(--accent); }
.flow-dot.blue { background: var(--accent2); }
.flow-dot.yellow { background: #ffc142; }
.flow-dot.red { background: var(--accent3); }
.flow-title { margin-bottom: 3px; color: var(--text); font-family: var(--display); font-size: 0.98rem; font-weight: 650; }
.flow-desc { color: var(--muted); font-size: 0.84rem; line-height: 1.65; }

.code-block {
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.78);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.code-dot { width: 8px; height: 8px; border-radius: 50%; }
.code-label { margin-left: 6px; color: var(--muted); font-family: var(--mono); font-size: 10px; }

pre {
  overflow-x: auto;
  padding: 1.25rem 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}

code {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.attack-grid,
.phases,
.machine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.attack-card,
.phase-card,
.machine-card,
.method-step,
.finding-card,
.vuln-card,
.sidebar-card,
.appendix-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(16, 25, 35, 0.82);
}

.attack-card,
.phase-card,
.machine-card,
.finding-card,
.appendix-block { padding: 1.3rem 1.45rem; }

.phase-card { border-top: 2px solid var(--accent); }
.attack-label, .phase-num, .appendix-label, .finding-severity, .vuln-section-label {
  margin-bottom: 0.5rem;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phase-num, .appendix-label { color: var(--accent); }
.finding-severity { color: var(--accent3); }

.attack-title,
.phase-title,
.finding-title,
.chain-title,
.vuln-title,
.machine-name {
  color: var(--text);
  font-family: var(--display);
  font-weight: 650;
}

.attack-title,
.phase-title,
.finding-title { margin-bottom: 0.5rem; font-size: 1.02rem; }

.attack-detail,
.phase-desc,
.finding-desc,
.appendix-desc {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.attack-detail strong { color: var(--accent); font-weight: 550; }

.screenshot-carousel {
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 25, 35, 0.82);
}

.carousel-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05080d;
}

.screenshot-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(16, 25, 35, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.screenshot-card.is-active { opacity: 1; pointer-events: auto; }

.screenshot-card img {
  display: block;
  width: 100%;
  height: calc(100% - 54px);
  object-fit: contain;
  object-position: center;
  background: #05080d;
}

.screenshot-card figcaption {
  min-height: 54px;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-transform: uppercase;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.78);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 15px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.carousel-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: var(--accent-soft);
  color: var(--accent);
}

.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 0.55rem; }

.carousel-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--muted2);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active { background: var(--accent); transform: scale(1.25); }

.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card { padding: 1.45rem; }

.sidebar-title {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.skill-list { display: flex; flex-direction: column; gap: 0.55rem; list-style: none; }

.skill-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.skill-list li::before,
.role-list li::before {
  content: '→';
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }

.tool-pill {
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 10, 15, 0.66);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.project-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.project-nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.project-nav a:hover { color: var(--accent); }

footer {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

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

.footer-brand,
.footer-copy {
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 10px;
}

.footer-brand { color: var(--muted); font-size: 12px; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; list-style: none; }
.footer-links a { color: var(--muted); font-family: var(--mono); font-size: 11px; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

.role-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; list-style: none; }
.role-list li { display: flex; align-items: flex-start; gap: 1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.role-list li strong { color: var(--text); font-weight: 550; }

.machine-card { transition: border-color 0.2s; }
.machine-card:hover { border-color: var(--line2); }
.machine-card.insane { border-color: rgba(255, 77, 109, 0.25); }
.machine-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.machine-name { font-size: 1.08rem; }
.machine-os { margin-bottom: 0.5rem; color: var(--muted2); font-family: var(--mono); font-size: 10px; }
.machine-desc { margin-bottom: 0.75rem; color: var(--muted); font-size: 0.84rem; line-height: 1.65; }
.machine-techniques { display: flex; flex-wrap: wrap; gap: 0.375rem; }

.difficulty,
.technique,
.vuln-severity {
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.diff-easy { border: 1px solid rgba(0, 229, 160, 0.25); background: rgba(0, 229, 160, 0.1); color: #00e5a0; }
.diff-medium { border: 1px solid rgba(255, 143, 0, 0.25); background: rgba(255, 143, 0, 0.1); color: #ff8f00; }
.diff-hard { border: 1px solid rgba(255, 77, 109, 0.25); background: rgba(255, 77, 109, 0.1); color: var(--accent3); }
.diff-insane { border: 1px solid rgba(255, 77, 109, 0.35); background: rgba(255, 77, 109, 0.15); color: var(--accent3); font-weight: 650; }
.technique { border: 1px solid var(--line); background: rgba(7, 10, 15, 0.66); color: var(--muted2); }
.technique.highlight { border-color: rgba(var(--accent-rgb), 0.25); color: var(--accent); }

.method-steps { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }
.method-step { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; }
.method-num { flex-shrink: 0; padding-top: 2px; color: var(--accent); font-family: var(--mono); font-size: 10px; }
.method-text { color: var(--muted); font-size: 0.88rem; line-height: 1.65; }
.method-text strong { color: var(--text); }

.vuln-stack { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.vuln-card { overflow: hidden; }
.vuln-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.vuln-title { font-size: 0.98rem; }
.vuln-severity.critical { border: 1px solid rgba(255, 77, 109, 0.25); background: rgba(255, 77, 109, 0.1); color: var(--accent3); }
.vuln-severity.high { border: 1px solid rgba(255, 143, 0, 0.25); background: rgba(255, 143, 0, 0.1); color: #ff8f00; }
.vuln-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding: 1.25rem 1.5rem; }
.vuln-section-text { color: var(--muted); font-size: 0.84rem; line-height: 1.65; }
.vuln-section-text code { font-size: 11px; }

.chain { display: flex; flex-direction: column; gap: 0; margin: 1.5rem 0; }
.chain-step { position: relative; display: flex; align-items: flex-start; gap: 1.25rem; padding-bottom: 1.5rem; }
.chain-step:last-child { padding-bottom: 0; }
.chain-step::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 1px; background: var(--line); }
.chain-step:last-child::after { display: none; }
.chain-num {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: rgba(16, 25, 35, 0.85);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
}
.chain-content { padding-top: 6px; }
.chain-title { margin-bottom: 4px; font-size: 0.98rem; }
.chain-desc { color: var(--muted); font-size: 0.84rem; line-height: 1.65; }

body.project-soc { --accent: #00e5a0; --accent-rgb: 0, 229, 160; --accent-soft: rgba(0, 229, 160, 0.08); }
body.project-pentest { --accent: #ff8f00; --accent-rgb: 255, 143, 0; --accent-soft: rgba(255, 143, 0, 0.08); }
body.project-htb { --accent: #9fef00; --accent-rgb: 159, 239, 0; --accent-soft: rgba(159, 239, 0, 0.06); }
body.project-cyberdojo { --accent: #9fefff; --accent-rgb: 159, 239, 255; --accent-soft: rgba(159, 239, 255, 0.07); }
body.project-pentest .tag.orange,
body.project-pentest .tag.green,
body.project-htb .tag.green,
body.project-cyberdojo .tag.cyan { border-color: rgba(var(--accent-rgb), 0.35); color: var(--accent); }
body.project-cyberdojo .skill-list li::before { color: var(--brand-accent); }

.soc-inline-001 { position: relative; }
.soc-inline-002, .cyberdojo-inline-001 { background: #ff5f57; }
.soc-inline-003, .cyberdojo-inline-002 { background: #febc2e; }
.soc-inline-004, .cyberdojo-inline-003 { background: #28c840; }
.soc-inline-005 { color: #75a8ff; }
.soc-inline-006, .pentest-inline-002, .soc-inline-009, .cyberdojo-inline-005 { color: var(--accent); }
.soc-inline-007, .soc-inline-018, .pentest-inline-008, .htb-inline-006, .cyberdojo-inline-004, .cyberdojo-inline-014 { color: var(--muted2); }
.soc-inline-008 { margin-top: 2rem; }
.soc-inline-009 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.soc-inline-010 { border-color: rgba(0, 229, 160, 0.15); }
.soc-inline-011, .pentest-inline-004, .cyberdojo-inline-010 { display: flex; flex-direction: column; gap: 0.5rem; }
.soc-inline-012, .htb-inline-003, .cyberdojo-inline-011 { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.soc-inline-013, .pentest-inline-007, .htb-inline-002, .htb-inline-005, .cyberdojo-inline-012 { height: 1px; background: var(--line); }
.soc-inline-014 { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.soc-inline-015 { color: var(--accent3); font-family: var(--display); font-size: 2rem; font-weight: 700; }
.soc-inline-016 { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.soc-inline-017 { color: var(--muted); font-size: 0.8rem; }
.pentest-inline-001 { border-left-color: var(--accent); }
.pentest-inline-003 { border-color: rgba(255, 143, 0, 0.15); }
.pentest-inline-005 { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.pentest-inline-006 { flex-shrink: 0; color: var(--accent); font-family: var(--mono); font-size: 11px; }
.htb-inline-001 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.htb-inline-002 { margin-bottom: 1rem; }
.htb-inline-004, .cyberdojo-inline-006 { color: var(--accent); }
.htb-inline-005 { margin: 0.5rem 0; }
.cyberdojo-inline-007 { margin-top: 1.5rem; }
.cyberdojo-inline-008 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: rgba(16, 25, 35, 0.82);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: border-color 0.2s;
}
.cyberdojo-inline-008:hover { border-color: rgba(159, 239, 255, 0.4); }
.cyberdojo-inline-009 { border-color: rgba(159, 239, 255, 0.15); }
.cyberdojo-inline-013 { color: var(--accent3); }

@media (max-width: 1024px) {
  nav { padding: 0 2rem; }
  .container { padding: 0 2rem; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .project-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .attack-grid,
  .phases,
  .machine-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 0 1.5rem; gap: 0.75rem; }
  .nav-back { display: none; }
  .container { padding: 0 1.5rem; }
  .project-header { padding: 7rem 0 3rem; }
  .project-body { padding: 4rem 0 5rem; }
  .project-kicker { align-items: flex-start; line-height: 1.5; }
  h1 { font-size: clamp(2.55rem, 12vw, 4rem); line-height: 0.96; }
  h2 { align-items: flex-start; font-size: 1.5rem; line-height: 1.15; }
  h2::before { margin-top: 0.7rem; width: 24px; }
  .project-lead { font-size: 1rem; line-height: 1.7; }
  .tag-row { margin-bottom: 0; }
  .sidebar-card,
  .attack-card,
  .phase-card,
  .machine-card,
  .method-step,
  .finding-card,
  .appendix-block { padding: 1.2rem; }
  .vuln-header { grid-template-columns: 1fr; align-items: start; padding: 1rem 1.2rem; }
  .vuln-body { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-nav { align-items: flex-start; flex-wrap: wrap; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-links { gap: 0.9rem 1.25rem; }
  pre { padding: 1rem; font-size: 11px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
  .carousel-viewport { aspect-ratio: 4 / 3; }
}

@media (max-width: 520px) {
  nav { padding: 0 1rem; }
  .nav-brand { font-size: 12px; }
  .container { padding: 0 1rem; }
  .project-header { padding: 6.5rem 0 2.5rem; }
  .project-body { padding-bottom: 4rem; }
  .project-nav { flex-direction: column; }
  .footer-links { flex-direction: column; align-items: center; }
  .tool-grid { grid-template-columns: 1fr; }
  .machine-header { flex-direction: column; align-items: flex-start; }
  .method-step, .role-list li, .chain-step { gap: 0.75rem; }
  .flow-step { grid-template-columns: 24px 10px minmax(0, 1fr); gap: 0 0.75rem; }
  .htb-inline-001 { grid-template-columns: 1fr; }
  .carousel-controls { padding: 0.75rem; }
  .carousel-btn { width: 42px; height: 42px; }
}

/* Field-file visual system */
:root {
  --bg: #05080d;
  --bg2: #0a1018;
  --surface: #111925;
  --surface2: #162131;
  --line: rgba(255,255,255,0.1);
  --line2: rgba(255,255,255,0.18);
  --accent: #00f0c8;
  --accent-rgb: 0, 240, 200;
  --accent-soft: rgba(0,240,200,0.08);
  --brand-accent: #00f0c8;
  --accent2: #57a4ff;
  --accent3: #ff4d6d;
  --text: #edf4ff;
  --muted: #8a9aaf;
  --muted2: #5f7188;
}

body {
  padding-left: 72px;
  background:
    radial-gradient(circle at 16% 12%, rgba(var(--accent-rgb),0.12), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(87,164,255,0.12), transparent 26rem),
    var(--bg);
}

body::before {
  opacity: 1;
  background:
    linear-gradient(120deg, transparent 0 54%, rgba(var(--accent-rgb),0.055) 54% 55%, transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(255,77,109,0.08), transparent 28rem);
}

nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: 72px;
  height: auto;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.2rem;
  padding: 1rem 0.75rem;
  background: rgba(5,8,13,0.94);
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.nav-brand,
.nav-links a,
.nav-back {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.nav-links { flex-direction: column; gap: 1.2rem; }
.nav-links a:hover, .nav-back:hover { color: var(--accent); }
.nav-back { border: 0; padding: 0; }
.nav-back:hover { background: transparent; border-color: transparent; }

.project-header {
  padding: 7rem 0 4rem;
  border-bottom: 1px solid var(--line);
}

.project-header::before {
  background:
    linear-gradient(120deg, transparent 0 54%, rgba(var(--accent-rgb),0.055) 54% 55%, transparent 55%),
    radial-gradient(circle at 90% 20%, rgba(87,164,255,0.12), transparent 24rem);
  background-size: auto;
  mask-image: none;
}

h1 {
  text-transform: uppercase;
  font-size: clamp(3.6rem, 10vw, 8rem);
  line-height: 0.78;
}

h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.92;
}

.project-kicker,
.breadcrumb a,
h2::before,
.phase-num,
.appendix-label,
.chain-num,
.method-num { color: var(--accent); }

.sidebar-card,
.attack-card,
.phase-card,
.machine-card,
.method-step,
.finding-card,
.vuln-card,
.appendix-block,
.code-block,
.screenshot-carousel {
  border-radius: 0;
  border-color: var(--line);
  background: rgba(17,25,37,0.88);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.phase-card { border-top-color: var(--accent); }
.tag, .tool-pill, .technique, .difficulty, .vuln-severity { border-radius: 0; }
.tag.green, .tag.blue, .tag.red { border-color: rgba(var(--accent-rgb),0.32); color: var(--accent); }
.project-nav, footer { border-top-color: var(--line); }

@media (max-width: 980px) {
  body { padding-left: 0; }
  nav {
    position: sticky;
    top: 0;
    width: auto;
    min-height: auto;
    height: 64px;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-brand,
  .nav-links a,
  .nav-back {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .nav-links, .nav-back { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu {
    top: 64px;
    background: rgba(5,8,13,0.97);
  }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(3rem, 18vw, 5.4rem); }
  h2 { font-size: clamp(2rem, 12vw, 3.4rem); }
}

.case-file-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  border: 1px solid var(--line);
  background: var(--line);
  max-width: 960px;
}

.case-file-strip article {
  min-width: 0;
  padding: 1rem;
  background: rgba(17,25,37,0.88);
}

.case-file-strip span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.case-file-strip strong {
  display: block;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.1;
}

.project-grid > div:first-child {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(5,8,13,0.42);
}

.sidebar-card:first-child {
  border-color: rgba(var(--accent-rgb),0.32);
}

.project-nav {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(17,25,37,0.72);
}

@media (max-width: 980px) {
  .case-file-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .case-file-strip { grid-template-columns: 1fr; }
  .project-grid > div:first-child { padding: 1rem; }
}

/* Detail pages: match the alternate field-file theme */
body.project-soc,
body.project-pentest,
body.project-htb,
body.project-cyberdojo {
  --accent: #00f0c8;
  --accent-rgb: 0, 240, 200;
  --accent-soft: rgba(0,240,200,0.08);
}

.container {
  width: min(1180px, calc(100% - 4rem));
  padding: 0;
}

.project-header {
  min-height: 72vh;
  display: flex;
  align-items: stretch;
  padding: 0;
}

.project-header .container {
  display: grid;
  align-content: center;
  padding: 5rem 0 4rem;
}

.project-header .container::before {
  content: 'DVW.SEC / CASE FILE';
  display: flex;
  min-height: 72px;
  align-items: center;
  margin: -5rem 0 4rem;
  padding: 0 2rem;
  border: 1px solid var(--line);
  background: rgba(5,8,13,0.62);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.breadcrumb {
  margin-bottom: 1.4rem;
  color: var(--muted);
}

.project-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(0,240,200,0.42);
  background: rgba(0,240,200,0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.project-kicker::before {
  display: none;
}

h1 {
  max-width: 1050px;
  margin: 1.5rem 0;
  font-size: clamp(3.7rem, 9.5vw, 7.4rem);
}

.project-lead {
  max-width: 780px;
  margin-bottom: 1.75rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.tag-row {
  gap: 0.45rem;
}

.tag,
.tool-pill,
.technique,
.difficulty,
.vuln-severity {
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0,240,200,0.32);
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.case-file-strip {
  max-width: none;
  margin-top: 2.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.case-file-strip article {
  padding: 1.25rem;
}

.case-file-strip strong {
  font-size: 1.2rem;
}

.project-body {
  padding: 0;
}

.project-body .container {
  padding: 5rem 0 6rem;
}

.project-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 2rem;
}

.project-grid > div:first-child {
  padding: 0;
  border: 0;
  background: transparent;
}

.project-grid > div:first-child > h2 {
  margin-top: 0;
}

.project-grid > div:first-child > h2:not(:first-child) {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--line);
}

h2 {
  display: block;
  max-width: 850px;
  margin-bottom: 1.35rem;
  font-size: clamp(2.1rem, 5vw, 5rem);
}

h2::before {
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 1rem;
  background: var(--accent);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1;
}

p {
  max-width: 760px;
  font-size: 1rem;
}

.divider {
  display: none;
}

.flow,
.attack-grid,
.phases,
.machine-grid,
.method-steps,
.vuln-stack,
.chain,
.screenshot-carousel,
.code-block {
  margin: 1.5rem 0 0;
}

.flow {
  border: 1px solid var(--line);
  background: rgba(17,25,37,0.72);
}

.flow-step {
  grid-template-columns: 56px 14px minmax(0, 1fr);
  padding: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.flow-step:last-child {
  border-bottom: 0;
}

.flow-connector {
  display: none;
}

.flow-num {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.flow-dot {
  margin-top: 0.45rem;
  background: var(--accent) !important;
}

.flow-title,
.attack-title,
.phase-title,
.finding-title,
.machine-name,
.chain-title,
.vuln-title {
  font-size: 1.15rem;
  line-height: 1;
}

.attack-grid,
.phases,
.machine-grid {
  gap: 1rem;
}

.attack-card,
.phase-card,
.machine-card,
.method-step,
.finding-card,
.vuln-card,
.appendix-block,
.sidebar-card {
  background: rgba(17,25,37,0.88);
  border: 1px solid var(--line);
  box-shadow: none;
}

.attack-card,
.phase-card,
.machine-card,
.finding-card,
.appendix-block,
.method-step {
  padding: 1.25rem;
}

.phase-card,
.finding-card,
.appendix-block,
.machine-card.insane,
.pentest-inline-001 {
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--line);
}

.attack-label,
.phase-num,
.appendix-label,
.finding-severity,
.vuln-section-label,
.sidebar-title {
  color: var(--accent2);
}

.code-block,
.screenshot-carousel {
  border: 1px solid var(--line);
  background: rgba(5,8,13,0.88);
  box-shadow: -10px 10px 0 rgba(87,164,255,0.12);
}

.code-header,
.carousel-controls,
.screenshot-card figcaption {
  border-color: var(--line);
}

.sidebar {
  top: 1rem;
}

.sidebar-card {
  position: relative;
  padding: 1.25rem;
}

.sidebar-card:first-child {
  border-color: rgba(0,240,200,0.42);
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 42px;
  height: 4px;
  background: var(--accent);
}

.skill-list li,
.role-list li {
  color: var(--muted);
}

.skill-list li::before,
.role-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: 0.48rem;
  background: var(--accent);
}

.project-nav {
  margin-top: 4rem;
  border: 1px solid var(--line);
  background: rgba(17,25,37,0.88);
}

footer .container {
  width: min(1180px, calc(100% - 4rem));
}

@media (max-width: 980px) {
  .container,
  footer .container {
    width: min(100% - 2rem, 780px);
  }

  .project-header {
    min-height: auto;
  }

  .project-header .container {
    padding: 2rem 0 4rem;
  }

  .project-header .container::before {
    min-height: 64px;
    margin: -2rem 0 3rem;
    padding: 0 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: clamp(2.9rem, 16vw, 4.8rem);
  }

  .project-lead {
    font-size: 1rem;
  }

  .case-file-strip,
  .attack-grid,
  .phases,
  .machine-grid {
    grid-template-columns: 1fr;
  }

  .project-grid > div:first-child > h2:not(:first-child) {
    margin-top: 3.5rem;
    padding-top: 3rem;
  }

  .flow-step {
    grid-template-columns: 42px 12px minmax(0, 1fr);
    padding: 1rem;
  }
}
