/* ===== VARIABLES ===== */
:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --surface: #13131f;
  --surface2: #1a1a2e;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #7c6ff7;
  --accent2: #a78bfa;
  --accent3: #c084fc;
  --text: #e8e8f0;
  --text-muted: #6b7280;
  --text-dim: #4b5563;
  --radius: 14px;
  --radius-sm: 8px;
  --navbar-h: 64px;
  --font-display: 'Syne', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg: #f5f5fa;
  --bg2: #eeeef5;
  --surface: #ffffff;
  --surface2: #f0f0f8;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #6c5ce7;
  --accent2: #7c6ff7;
  --accent3: #a855f7;
  --text: #1a1a2e;
  --text-muted: #5a5a72;
  --text-dim: #8888a0;
}

[data-theme="light"] #main-nav {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(124, 111, 247, 0.1);
}

[data-theme="light"] .nav-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .slider-btn {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .space-hint .key-badge {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] #nav-show-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
}

[data-theme="light"] .key-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .slide-tag {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .pdf-card {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pdf-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .pdf-icon {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pdf-btn-dl {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .cat-tab {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .pdf-modal {
  background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .pdf-modal-inner {
  background: #fff;
}

[data-theme="light"] .pdf-modal-close {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-links.open {
  background: rgba(255, 255, 255, 0.97);
}

[data-theme="light"] .home-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 111, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg);
}

/* Theme toggle icon animation */
#theme-toggle-btn .icon-moon,
#theme-toggle-btn .icon-sun {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

#theme-toggle-btn:hover .icon-moon,
#theme-toggle-btn:hover .icon-sun {
  transform: rotate(25deg);
}

/* Smooth color transition on theme change */
body,
#main-nav,
.pdf-card,
.pdf-modal-inner,
.cat-tab,
.nav-toggle-btn,
#nav-show-btn,
.slider-btn,
.key-badge {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ===== RESET & BASE ===== */
*,
*::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-display);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== FONT FACES (system fallbacks) ===== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 99px;
}

/* ===== NAVBAR ===== */
#main-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 900px;
  z-index: 1000;
  background: rgba(19, 19, 31, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0 8px;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(124, 111, 247, 0.1);
}

#main-nav.nav-hidden {
  top: -90px;
  opacity: 0;
  pointer-events: none;
}

/* Quand nav cachée : contenu prend toute la hauteur */
body.nav-is-hidden .section {
  padding-top: 0;
}

body.nav-is-hidden .slider-wrapper {
  height: 100vh;
}

body.nav-is-hidden #home {
  min-height: 100vh;
}

/* Hint "Espace" flottant quand nav cachée */
.space-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 998;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

body.nav-is-hidden .space-hint {
  opacity: 1;
}

.space-hint .key-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(19, 19, 31, 0.9);
  backdrop-filter: blur(8px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 8px 16px;
  white-space: nowrap;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  display: inline-block;
}

.logo-text .dot {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.nav-brand:hover .logo-text {
  transform: scale(1.05);
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  transition: color 0.3s ease;
}

.nav-brand:hover .logo-sub {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 99px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(124, 111, 247, 0.15);
  color: var(--accent2);
}

.nav-links a.active {
  background: rgba(124, 111, 247, 0.2);
  color: var(--accent2);
}

.nav-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-toggle-btn:hover {
  background: rgba(124, 111, 247, 0.2);
  color: var(--accent2);
}

/* Floating hide button when nav is hidden */
#nav-show-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999;
  background: rgba(19, 19, 31, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--accent2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#nav-show-btn.visible {
  opacity: 1;
  pointer-events: all;
}

#nav-show-btn:hover {
  background: rgba(124, 111, 247, 0.3);
}

/* Help popup */
.help-popup {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 1001;
  background: rgba(19, 19, 31, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 240px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  cursor: grab;
  user-select: none;
}

.help-popup.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.help-popup-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.help-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.help-row .key-badge {
  min-width: 48px;
  text-align: center;
}

[data-theme="light"] .help-popup {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== SECTIONS ===== */
.section {
  min-height: 100vh;
  padding-top: calc(var(--navbar-h) + 40px);
  transition: padding-top 0.4s ease;
}

/* ===== PAGE TRANSITIONS ===== */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== HOME SECTION ===== */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 111, 247, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.home-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  opacity: 0.4;
}

.home-content {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.home-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 111, 247, 0.12);
  border: 1px solid rgba(124, 111, 247, 0.25);
  color: var(--accent2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.home-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.home-name {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.home-name .accent {
  color: var(--accent2);
}

.home-sub {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-family: var(--font-mono);
}

.home-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(124, 111, 247, 0.35);
}

.home-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 111, 247, 0.5);
  color: white;
}

/* ===== SLIDER (PRESENTATIONS) ===== */
#presentations {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--navbar-h) - 40px);
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Column = horizontal slide */
.slide-col {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
}

.slide-col.prev-col {
  transform: translateX(-100%);
}

.slide-col.active-col {
  transform: translateX(0);
}

.slide-col.next-col {
  transform: translateX(100%);
}

/* Row = vertical sub-slide */
.slide-row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(20px, 5vw, 80px);
}

.slide-row.prev-row {
  transform: translateY(-100%);
}

.slide-row.active-row {
  transform: translateY(0);
}

.slide-row.next-row {
  transform: translateY(100%);
}

/* Slide content */
.slide-card {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.slide-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.slide-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.slide-title .hl {
  color: var(--accent2);
}

.slide-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 24px;
}

.slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.slide-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.slide-tag.accent {
  background: rgba(124, 111, 247, 0.12);
  border-color: rgba(124, 111, 247, 0.3);
  color: var(--accent2);
}

/* Timeline dot for sub-slides */
.slide-timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  box-shadow: 0 0 24px rgba(124, 111, 247, 0.4);
}

/* Navigation arrows */
.slider-nav {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.slider-btn {
  background: rgba(19, 19, 31, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.slider-btn:hover:not(:disabled) {
  background: rgba(124, 111, 247, 0.2);
  color: var(--accent2);
  border-color: rgba(124, 111, 247, 0.4);
}

.slider-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.slider-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.s-dot {
  width: 6px;
  height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.s-dot.active {
  background: var(--accent2);
  width: 20px;
  border-radius: 3px;
}

/* Vertical hint */
.slide-down-hint {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  z-index: 10;
}

.v-dot {
  width: 6px;
  height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.v-dot.active {
  background: var(--accent2);
  height: 20px;
  border-radius: 3px;
}

/* Slide background variants */
.slide-bg-1 {
  background: radial-gradient(ellipse at 30% 40%, rgba(124, 111, 247, 0.12) 0%, transparent 60%);
}

.slide-bg-2 {
  background: radial-gradient(ellipse at 70% 60%, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
}

.slide-bg-3 {
  background: radial-gradient(ellipse at 50% 30%, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
}

.slide-bg-4 {
  background: radial-gradient(ellipse at 20% 70%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
}

/* Counter display */
.slide-counter {
  position: absolute;
  top: 16px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  z-index: 10;
}

/* Keyboard hint */
.slide-keys {
  position: absolute;
  top: 16px;
  right: 24px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.key-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ===== MODULES SECTION ===== */
#modules {
  padding-bottom: 80px;
}

.modules-header {
  text-align: center;
  padding: 60px 24px 48px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-title .hl {
  color: var(--accent2);
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Category tabs */
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 0 24px;
}

.cat-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.cat-tab:hover {
  background: rgba(124, 111, 247, 0.1);
  color: var(--accent2);
}

.cat-tab.active {
  background: rgba(124, 111, 247, 0.18);
  border-color: rgba(124, 111, 247, 0.4);
  color: var(--accent2);
}

/* PDF grid */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 clamp(16px, 5vw, 60px);
  max-width: 1400px;
  margin: 0 auto;
}

.pdf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.pdf-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  opacity: 0;
  transition: opacity 0.25s;
}

.pdf-card:hover {
  border-color: rgba(124, 111, 247, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.pdf-card:hover::before {
  opacity: 1;
}

.pdf-cat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  width: fit-content;
  font-family: var(--font-mono);
}

.badge-modules {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-stage1 {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.badge-stage2 {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.pdf-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pdf-info {
  flex: 1;
}

.pdf-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.pdf-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pdf-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  letter-spacing: 0.03em;
  font-family: var(--font-mono);
}

.pdf-btn-view {
  background: rgba(124, 111, 247, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(124, 111, 247, 0.25);
}

.pdf-btn-view:hover {
  background: rgba(124, 111, 247, 0.3);
  color: var(--accent2);
}

.pdf-btn-dl {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.pdf-btn-dl:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* PDF Viewer Modal */
.pdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pdf-modal.open {
  display: flex;
}

.pdf-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 960px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.pdf-modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.pdf-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.pdf-modal-close:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #ff6b6b;
}

.pdf-modal-body {
  flex: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

.pdf-placeholder .big-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.pdf-placeholder p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ===== EMPTY STATE ===== */
.pdf-category {
  display: none;
}

.pdf-category.visible {
  display: contents;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .pdf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #main-nav {
    width: calc(100% - 24px);
    top: 8px;
    border-radius: 16px;
    padding: 0 4px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(13, 13, 20, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    flex-direction: column;
    gap: 4px;
  }

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

  .nav-links a {
    width: 100%;
    justify-content: center;
  }

  .nav-hamburger {
    display: flex;
  }

  .slide-down-hint {
    display: none;
  }

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

/* ===== UTILITY ===== */
.text-accent {
  color: var(--accent2);
}

.hidden {
  display: none !important;
}