/* =============================================
   POUR 1NF0 — Shared site styles
   cyberpunk × familial × organic
   ============================================= */

:root {
  --bg:        #0c0a15;
  --bg-alt:    #130f22;
  --bg-card:   rgba(90, 60, 180, 0.07);
  --cyan:      #00e5ff;
  --green:     #6dff8a;
  --pink:      #ff2d78;
  --amber:     #ffb347;
  --text:      #dde8f0;
  --text-dim:  #7a8fa8;
  --line:      rgba(0, 229, 255, 0.18);
  --line-str:  rgba(0, 229, 255, 0.45);
  --nav-h:     56px;
  --font-mono: 'Courier New', Courier, monospace;
  --font-body: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --shadow-s:  0 2px 8px rgba(0,0,0,0.55), 0 1px 2px rgba(80,40,160,0.18);
  --shadow-m:  0 4px 24px rgba(0,0,0,0.65), 0 2px 6px rgba(80,40,160,0.22);
  --shadow-l:  0 8px 40px rgba(0,0,0,0.75), 0 4px 12px rgba(80,40,160,0.28);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Grain overlay (organic texture, no extra file) ── */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Warm radial glow (organic depth) ── */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(60, 20, 120, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(0, 120, 140, 0.12) 0%, transparent 70%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ──────────────────────────────── */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(12, 10, 21, 0.88);
  border-bottom: 1px solid var(--line-str);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-m), 0 0 32px rgba(0, 229, 255, 0.06);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.7), 0 2px 8px rgba(0,0,0,0.6);
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
  text-shadow: 0 0 22px rgba(0, 229, 255, 0.9), 0 2px 10px rgba(0,0,0,0.7);
}

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

.nav-links a {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.nav-links a.active {
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.55);
}

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.5);
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(12, 10, 21, 0.97);
    border-bottom: 1px solid var(--line-str);
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-l);
  }
  .nav-links.open { display: flex; }
}

/* ── Page wrapper ────────────────────────── */

.page {
  padding-top: calc(var(--nav-h) + 2rem);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ──────────────────────────── */

.page-title {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.45), 0 4px 16px rgba(0,0,0,0.7);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--green);
  text-shadow: 0 0 12px rgba(109, 255, 138, 0.35), 0 2px 8px rgba(0,0,0,0.6);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

/* ── Cards / panels ──────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-s);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

/* grain on cards */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: var(--shadow-m), 0 0 20px rgba(0, 229, 255, 0.07);
  transform: translateY(-1px);
}

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.07);
  border-radius: 6px;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: var(--shadow-s), 0 0 0 0 rgba(0, 229, 255, 0);
}

.btn:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: var(--shadow-s), 0 0 16px rgba(0, 229, 255, 0.25);
  text-decoration: none;
}

.btn-green {
  border-color: var(--green);
  color: var(--green);
  background: rgba(109, 255, 138, 0.07);
}
.btn-green:hover {
  background: rgba(109, 255, 138, 0.15);
  box-shadow: var(--shadow-s), 0 0 16px rgba(109, 255, 138, 0.25);
}

.btn-amber {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255, 179, 71, 0.07);
}
.btn-amber:hover {
  background: rgba(255, 179, 71, 0.15);
  box-shadow: var(--shadow-s), 0 0 16px rgba(255, 179, 71, 0.25);
}

.btn-red {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 45, 120, 0.07);
}
.btn-red:hover {
  background: rgba(255, 45, 120, 0.15);
  box-shadow: var(--shadow-s), 0 0 16px rgba(255, 45, 120, 0.25);
}

/* ── Accent line ─────────────────────────── */

.neon-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  margin: 2.5rem 0;
  opacity: 0.3;
}

/* ── Neon-bordered photo ─────────────────── */

.neon-photo {
  border: 1px solid var(--line-str);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.12);
}

/* ── Tag pills ───────────────────────────── */

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  background: rgba(90, 60, 180, 0.06);
}

/* ── Page hero ───────────────────────────── */

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

/* ── CTA row ─────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

/* ── Social links grid ───────────────────── */

.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.social-grid a {
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-card);
}

.social-grid a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
  text-decoration: none;
}

/* ── Cybercrime book page ────────────────── */

.book-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.book-cover img {
  width: 220px;
}
.book-body p { color: var(--text); margin-bottom: 1rem; line-height: 1.8; }
.book-body b { color: var(--cyan); }
.book-body i { color: var(--text-dim); }
.authors { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 2rem; }

.ref-section { margin-top: 3rem; }
.ref-hint { color: var(--text-dim); font-size: 0.9rem; }
#ref-result { margin-top: 1.5rem; margin-bottom: 2rem; }

.ref-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.ref-form input[type="number"] {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line-str);
  color: var(--text);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  width: 120px;
  outline: none;
  -moz-appearance: textfield;
}
.ref-form input[type="number"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0,255,255,0.2);
}
.ref-form input[type="number"]::-webkit-outer-spin-button,
.ref-form input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.ref-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem;
  max-width: 640px;
  margin-bottom: 0.75rem;
}
.ref-card-meta { color: var(--cyan); font-size: 0.8rem; margin-bottom: 0.5rem; }
.ref-card-title { color: var(--text); margin-bottom: 0.25rem; }
.ref-card-sub { color: var(--text-dim); font-size: 0.85rem; }
.ref-card-link { color: var(--cyan); font-size: 0.85rem; }
.ref-card-comment { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.5rem; }

/* ── Formations page ─────────────────────── */

.intro-section {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
.intro-section p { color: var(--text-dim); margin-top: 0.75rem; line-height: 1.8; }
.intro-section b { color: var(--cyan); }

.formation-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin: 3rem 0;
}
.formation-block.reverse { direction: rtl; }
.formation-block.reverse > * { direction: ltr; }

.formation-img img {
  width: 100%;
  border-radius: 2px;
}
.formation-img .img-placeholder {
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.formation-content h2 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,255,255,0.4);
  margin-bottom: 1rem;
}
.formation-content p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.formation-content b { color: var(--text); }

.meta-block { margin-bottom: 1.25rem; }
.meta-line { font-size: 0.875rem; margin-bottom: 0.35rem; color: var(--text); }
.meta-line .label { color: var(--green); font-weight: bold; margin-right: 0.4rem; }

/* ── Videos page ────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  align-items: center;
}
.filter-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 0.5rem;
}
.filter-bar .btn { font-size: 0.8rem; padding: 0.35rem 0.9rem; }
.filter-bar .btn.active {
  background: rgba(0, 255, 255, 0.18);
  border-color: var(--cyan);
  color: var(--cyan);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
  color: inherit;
  text-decoration: none;
}
.video-card:hover {
  border-color: var(--line-str);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.08);
  text-decoration: none;
}
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #0d0d1e;
}
.video-info { padding: 0.75rem 1rem; }
.video-title {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.video-playlist, .video-date { font-size: 0.78rem; color: var(--text-dim); }

.placeholder-grid {
  color: var(--text-dim);
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
}
.placeholder-grid p { margin-top: 0.75rem; font-size: 0.9rem; }

/* ── Responsive (768px) ──────────────────── */

@media (max-width: 768px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover { order: -1; text-align: center; }
  .book-cover img { width: 160px; }

  .formation-block,
  .formation-block.reverse { grid-template-columns: 1fr; direction: ltr; }
  .formation-img { display: none; }
}
