/* ============================================================
   ZERO TRUST COMPLIANCE PORTAL — Design System
   Portfolio: Houssam Essaki
   ============================================================ */

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

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg-primary:    #04080f;
  --bg-secondary:  #070d1a;
  --bg-card:       rgba(8, 18, 42, 0.68);
  --bg-sidebar:    rgba(5, 10, 24, 0.97);
  --bg-hover:      rgba(0, 212, 255, 0.06);

  --cyan:          #00d4ff;
  --cyan-dim:      rgba(0, 212, 255, 0.55);
  --cyan-glow:     rgba(0, 212, 255, 0.18);
  --cyan-border:   rgba(0, 212, 255, 0.22);
  --green:         #00e676;
  --green-dim:     rgba(0, 230, 118, 0.55);
  --green-glow:    rgba(0, 230, 118, 0.12);
  --amber:         #ffab00;
  --amber-glow:    rgba(255, 171, 0, 0.14);
  --red:           #ff4757;
  --red-glow:      rgba(255, 71, 87, 0.14);
  --purple:        #7c4dff;
  --purple-glow:   rgba(124, 77, 255, 0.14);

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-code:      #00d4ff;

  --sidebar-width:  272px;
  --radius:         12px;
  --radius-sm:       8px;
  --radius-lg:      18px;
  --radius-xl:      24px;

  --shadow-card:    0 4px 28px rgba(0,0,0,0.55);
  --shadow-glow-c:  0 0 24px rgba(0,212,255,0.28);
  --shadow-glow-g:  0 0 24px rgba(0,230,118,0.28);

  --transition:     all 0.28s cubic-bezier(.4,0,.2,1);
  --transition-fast: all 0.15s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ─── BG GRID ────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ─── CANVAS (PARTICLES) ─────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.layout {
  min-height: 100vh;
  position: relative;
  z-index: 2;
  width: 100%;
}

.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding: 2.5rem 3.5rem 4rem;
  min-height: 100vh;
  position: relative;
  z-index: 5;
  color: var(--text-primary);
  box-sizing: border-box;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--cyan-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--cyan-border); }

.sidebar-profile {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--cyan-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-name {
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 0.06em;
}
.sidebar-online {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--green);
  letter-spacing: 0.08em;
}
.sidebar-online .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

/* Placeholder for removed trust bar */
.trust-bar-wrap { display: none; }
.trust-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}
.trust-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.trust-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(.4,0,.2,1) 0.5s;
}

/* Sidebar Navigation */
.sidebar-nav { padding: 1rem 0.75rem; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.nav-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 0.5rem 0.35rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--cyan);
  border-radius: 0 3px 3px 0;
  transition: width 0.2s ease;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  font-weight: 600;
}
.nav-item.active::before { width: 3px; }
.nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-status {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Sidebar bottom */
.sidebar-bottom {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--cyan-border);
}
.social-links {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}
.social-link {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.social-link:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan-dim);
  color: var(--cyan);
  transform: translateY(-2px);
}
.social-link svg { width: 16px; height: 16px; fill: currentColor; }

/* ─── LANGUAGE SWITCHER ──────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--cyan-border);
  border-radius: 20px;
  padding: 3px;
}
.lang-btn {
  flex: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  text-align: center;
  letter-spacing: 0.05em;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: var(--bg-primary);
}
.lang-btn:hover:not(.active) { color: var(--text-primary); }

/* ─── PAGE HEADER ────────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.page-tag::before {
  content: '';
  width: 18px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.page-title {
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.page-subtitle {
  color: var(--text-secondary);
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

/* ─── CARDS (GLASSMORPHISM BASE) ─────────────────────────── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.card:hover {
  border-color: var(--cyan-dim);
  box-shadow: var(--shadow-card), var(--shadow-glow-c);
  transform: translateY(-4px);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.04), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::after { opacity: 1; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-green  { background: var(--green-glow); border: 1px solid var(--green-dim); color: var(--green); }
.badge-cyan   { background: var(--cyan-glow);  border: 1px solid var(--cyan-dim);  color: var(--cyan); }
.badge-amber  { background: var(--amber-glow); border: 1px solid rgba(255,171,0,.5); color: var(--amber); }
.badge-red    { background: var(--red-glow);   border: 1px solid rgba(255,71,87,.5); color: var(--red); }
.badge-purple { background: var(--purple-glow);border: 1px solid rgba(124,77,255,.5); color: var(--purple); }
.badge-muted  { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: var(--text-secondary); }

/* Severity → badge color map */
.sev-CRITICAL { background: var(--red-glow);   border: 1px solid rgba(255,71,87,.5);  color: var(--red); }
.sev-HIGH     { background: var(--amber-glow); border: 1px solid rgba(255,171,0,.5); color: var(--amber); }
.sev-MEDIUM   { background: var(--cyan-glow);  border: 1px solid var(--cyan-dim);    color: var(--cyan); }
.sev-LOW      { background: var(--green-glow); border: 1px solid var(--green-dim);   color: var(--green); }

/* ─── TAGS ───────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  padding: 0.18rem 0.55rem;
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
}
.tag:hover { background: var(--cyan-glow); color: var(--cyan); border-color: var(--cyan-dim); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}
.btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: var(--bg-primary);
  box-shadow: 0 4px 14px rgba(0,212,255,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,212,255,0.45);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
}
.btn-outline:hover { background: var(--cyan-glow); border-color: var(--cyan); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text-primary); }
.btn-green {
  background: linear-gradient(135deg, var(--green), #00a852);
  color: var(--bg-primary);
  box-shadow: 0 4px 14px rgba(0,230,118,0.25);
}
.btn-green:hover { box-shadow: 0 6px 20px rgba(0,230,118,0.4); transform: translateY(-1px); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn-icon { padding: 0.45rem; }
.btn-icon svg { width: 16px; height: 16px; }

/* ─── KPI CARDS (HOME) ───────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--cyan)), transparent);
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow-c); }
.kpi-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--text-primary), var(--card-accent, var(--cyan)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── HOME HERO ──────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 2rem;
}
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  animation: slideInFromBottom 0.9s cubic-bezier(.22,1,.36,1) both;
}
.hero-main-photo {
  width: 280px;
  height: 380px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-lg);
  border: 2px solid var(--cyan-border);
  box-shadow: 0 0 40px var(--cyan-glow), var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
  display: block;
}
.hero-main-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 0 60px var(--cyan-glow), var(--shadow-card);
  border-color: var(--cyan-dim);
}
.hero-text { flex: 1; animation: slideInFromLeft 0.7s cubic-bezier(.22,1,.36,1) 0.1s both; }
.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
.hero-name {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-typing-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0;
  min-height: 2rem;
}
.hero-typing-prefix {
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  font-size: 1rem;
}
.hero-typing {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--cyan);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}
.hero-bio {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 520px;
  line-height: 1.7;
  margin: 0.75rem 0 1.25rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Domaines d'interet - Geometric Hexagonal Design */
.interests-section {
  margin: 1.5rem 0 0.5rem;
}
.interests-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.interests-geometric {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.interest-hex {
  position: relative;
  width: 200px;
  height: 220px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, var(--cyan-border), rgba(0,212,255,0.08));
  transition: var(--transition);
  animation: fadeInUp 0.5s ease both;
  animation-delay: var(--hex-delay, 0s);
  cursor: default;
}
.interest-hex::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(160deg, rgba(8, 18, 42, 0.95), rgba(4, 8, 15, 0.98));
  z-index: 0;
}
.interest-hex:hover {
  transform: scale(1.06) translateY(-4px);
  filter: drop-shadow(0 0 20px rgba(0,212,255,0.35));
}
.interest-hex:hover::before {
  background: linear-gradient(160deg, rgba(0, 212, 255, 0.08), rgba(4, 8, 15, 0.95));
}
.interest-hex-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 2.2rem 1rem;
  gap: 0.3rem;
}
.interest-hex-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 0 8px rgba(0,212,255,0.45));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}
.interest-hex:hover .interest-hex-icon {
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 0 16px rgba(0,229,255,0.7));
}
.cyber-svg-icon {
  width: 100%;
  height: 100%;
  display: block;
}
.interest-hex-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.interest-hex-desc {
  font-size: 0.62rem;
  color: var(--text-secondary);
  line-height: 1.35;
  max-width: 140px;
}

/* Identity badge style (merged) */
.identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, rgba(0,230,118,0.12), rgba(0,212,255,0.08));
  border: 1px solid var(--green-dim);
  border-radius: 30px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.1em;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.identity-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,230,118,0.1), transparent);
  animation: shimmer 2.5s ease infinite;
}

/* Nav section tiles */
.section-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.section-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.section-tile:hover {
  background: var(--bg-hover);
  border-color: var(--cyan-dim);
  color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-c);
}
.section-tile .tile-icon { font-size: 1.5rem; }
.section-tile .tile-label { font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; }
.section-tile .tile-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cyan);
}

/* ─── PROJECT CARDS ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.project-card-img {
  height: 180px;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}
.project-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.06); }
.project-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(0,230,118,0.03));
  color: var(--text-muted);
  font-size: 2.5rem;
}
.project-card-placeholder span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.project-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.project-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.project-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.project-card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cyan-border);
  flex-wrap: wrap;
}

/* ─── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.filter-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition-fast);
  letter-spacing: 0.05em;
}
.filter-btn:hover { color: var(--text-primary); border-color: var(--cyan-border); background: var(--bg-hover); }
.filter-btn.active {
  background: var(--cyan-glow);
  border-color: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 600;
}

/* ─── TIMELINE (EXPERIENCE) ──────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--green), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.25rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--cyan);
  transform: translate(calc(-50% + 1px), -50%);
  transition: var(--transition);
  z-index: 2;
}
.timeline-item:hover::before { background: var(--green); box-shadow: 0 0 14px var(--green); }
.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.timeline-card { padding: 1.25rem; }
.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.timeline-company-wrap { display: flex; align-items: center; gap: 0.75rem; }
.company-logo {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: rgba(255,255,255,0.05);
  padding: 4px;
  flex-shrink: 0;
}
.company-logo-placeholder {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--cyan-glow);
  border: 1px solid var(--cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}
.timeline-company { font-weight: 700; font-size: 1rem; }
.timeline-role { color: var(--text-secondary); font-size: 0.82rem; }
.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* Mission list */
.mission-list {
  margin: 0.75rem 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mission-list li {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}
.mission-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  top: 0.25em;
}

/* Experience photo */
.exp-photo-wrap {
  width: 100%;
  height: 320px;
  max-height: 400px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  margin: 0.75rem 0;
  border: 1px solid var(--cyan-border);
  background: rgba(0, 0, 0, 0.35);
}
.exp-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.4s ease;
}
.exp-photo-wrap.exp-dataprotect {
  height: 440px;
  max-height: 480px;
}
.exp-photo-wrap.exp-dataprotect img {
  object-position: center 38%;
}
.exp-photo-wrap:hover img { transform: scale(1.02); }

.timeline-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Redacted entry */
.timeline-redacted {
  cursor: pointer;
  border-color: rgba(255,71,87,0.25) !important;
}
.timeline-redacted:hover { border-color: rgba(255,71,87,0.5) !important; }
.redacted-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.redacted-icon { font-size: 1.5rem; }
.redacted-text { color: var(--red); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.redacted-hint { color: var(--text-muted); font-size: 0.7rem; margin-top: 0.2rem; font-family: 'JetBrains Mono', monospace; }

/* ─── CTF CARDS ──────────────────────────────────────────── */
.ctf-category-bar {
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.ctf-cat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.ctf-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ctf-cat-tag {
  padding: 0.3rem 0.8rem;
  background: var(--cyan-glow);
  border: 1px solid var(--cyan-dim);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.ctf-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.ctf-card { padding: 1.25rem; }
.ctf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cyan-border);
  gap: 0.75rem;
}
.ctf-date-loc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.ctf-name { font-size: 1.05rem; font-weight: 700; margin: 0.2rem 0; }
.ctf-organizer { color: var(--text-secondary); font-size: 0.8rem; }
.ctf-meta {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.ctf-meta-item {
  padding: 0.4rem 0.75rem;
  background: rgba(0,212,255,0.04);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: var(--radius-sm);
}
.ctf-meta-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.ctf-meta-value { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.ctf-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 0.75rem; }

.ctf-slideshow {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--cyan-border);
  background: rgba(0, 0, 0, 0.4);
}
.ctf-slideshow-track { position: relative; width: 100%; height: 100%; }
.ctf-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease-in-out;
}
.ctf-slide.active { opacity: 1; }
.ctf-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
}
.ctf-slideshow-nav {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.ctf-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
}
.ctf-dot.active { background: var(--cyan); }

.ctf-footer { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-top: 0.75rem; border-top: 1px solid var(--cyan-border); }

.ctf-classified {
  cursor: pointer;
  border-style: dashed;
  border-color: rgba(255,171,0,0.3);
  opacity: 0.75;
  transition: var(--transition);
}
.ctf-classified:hover { opacity: 1; border-color: var(--amber); box-shadow: 0 0 20px var(--amber-glow); }
.classified-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  min-height: 200px;
}
.classified-icon { font-size: 2.5rem; animation: pulse 2s ease-in-out infinite; }
.classified-title { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--amber); letter-spacing: 0.2em; }
.classified-hint { font-size: 0.72rem; color: var(--text-muted); }

/* ─── CERTIFICATION CARDS ────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.cert-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cert-logo-wrap {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--cyan-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 4px;
}
.cert-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cert-logo-placeholder {
  font-size: 1.4rem;
  color: var(--cyan);
}
.cert-issuer { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.08em; }
.cert-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cert-date { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--cyan); }
.cert-footer { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.cert-classified {
  cursor: pointer;
  border-style: dashed;
  border-color: rgba(255,171,0,0.3);
}
.cert-classified:hover { border-color: var(--amber); box-shadow: 0 0 20px var(--amber-glow); }

/* ─── ACTIVITY CARDS ─────────────────────────────────────── */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.activity-card { padding: 1.5rem; }
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}
.activity-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}
.activity-logo {
  width: 48px; height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--cyan-border);
}
.activity-name { font-size: 1.1rem; font-weight: 700; }
.activity-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}
.activity-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 0.75rem; margin-top: 0.5rem; }

.activity-photos {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}
.activity-photo-wrap {
  flex: 1;
  min-width: 260px;
  height: 380px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--cyan-border);
  background: rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}
.activity-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.4s ease;
}
.activity-photo-wrap:hover { border-color: var(--cyan); }
.activity-photo-wrap:hover img { transform: scale(1.03); }

.activity-card[data-club="jlm"] .activity-photo-wrap img,
.activity-photo-jlm img {
  object-position: center 85% !important;
}

/* ─── EVENTS SECTION & CARDS ─────────────────────────────── */
.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-club-events {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}
.activity-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.activity-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.15);
}

.events-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 212, 255, 0.15);
}
.events-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.events-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.2rem 0;
}
.events-section-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 580px;
}

.events-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.events-filter-btn {
  background: rgba(8, 18, 42, 0.6);
  border: 1px solid var(--cyan-border);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.events-filter-btn:hover {
  border-color: var(--cyan);
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.08);
}
.events-filter-btn.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  font-weight: 700;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.event-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 212, 255, 0.12);
}
.event-card-top {
  margin-bottom: 0.75rem;
}
.event-club-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--cyan-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.event-club-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
}
.event-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.event-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.event-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--cyan);
  flex-shrink: 0;
}

.event-photo-deck {
  position: relative;
  margin: 0.75rem 0 0.85rem;
  perspective: 900px;
}
.event-deck-stack {
  position: relative;
  width: 100%;
  height: 290px;
  border-radius: var(--radius-sm);
}
.event-deck-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--cyan-border);
  background: rgba(6, 13, 31, 0.95);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
  user-select: none;
}
.event-deck-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.4s ease;
}
.event-deck-card:hover img {
  transform: scale(1.03);
}

.event-deck-card.is-active {
  z-index: 3;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 212, 255, 0.15);
  pointer-events: auto;
}
.event-deck-card.is-active:hover {
  border-color: var(--cyan);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75), 0 0 22px rgba(0, 212, 255, 0.3);
}

.event-deck-card.is-next {
  z-index: 2;
  opacity: 0.7;
  transform: translate3d(10px, -6px, -15px) scale(0.96) rotate(1.8deg);
  border-color: rgba(0, 212, 255, 0.25);
  pointer-events: none;
  filter: brightness(0.7);
}

.event-deck-card.is-hidden {
  z-index: 1;
  opacity: 0;
  transform: translate3d(16px, -10px, -30px) scale(0.92) rotate(3deg);
  pointer-events: none;
}

.event-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: var(--cyan);
}
.event-deck-card.is-active:hover .event-photo-overlay {
  opacity: 1;
}

.event-deck-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
  padding: 0 0.2rem;
}
.event-deck-btn {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--cyan-border);
  color: var(--cyan);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.event-deck-btn:hover {
  background: var(--cyan-glow);
  color: #fff;
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.45);
  transform: scale(1.1);
}
.event-deck-btn svg {
  width: 14px;
  height: 14px;
}
.event-deck-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.event-deck-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}
.event-deck-dot.active {
  width: 16px;
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}
.event-deck-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.45);
}

.event-card-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: auto;
}
.event-insta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-color: rgba(225, 48, 108, 0.4);
  color: #ff5b94;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}
.event-insta-btn svg {
  flex-shrink: 0;
}
.event-insta-btn:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(225, 48, 108, 0.5);
  transform: translateY(-2px);
}

/* ─── ADMIN MODAL (KONAMI CODE) ──────────────────────────── */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,8,15,0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.admin-overlay.show { opacity: 1; pointer-events: all; }
.admin-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 400px;
  max-width: 95vw;
  box-shadow: var(--shadow-card), 0 0 60px var(--cyan-glow);
  transform: translateY(-20px);
  transition: transform 0.3s;
}
.admin-overlay.show .admin-modal { transform: translateY(0); }
.admin-modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-align: center;
  margin-bottom: 0.5rem;
}
.admin-modal-sub {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.admin-input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  outline: none;
  transition: var(--transition);
  margin-bottom: 1rem;
}
.admin-input:focus { border-color: var(--cyan-dim); box-shadow: 0 0 0 3px var(--cyan-glow); }
.admin-input::placeholder { color: var(--text-muted); }
.admin-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--red);
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 0.75rem;
  display: none;
}
.admin-error.show { display: block; }

/* ─── PUZZLE WIDGET ──────────────────────────────────────── */
.puzzle-widget {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 260px;
  background: rgba(6,12,28,0.97);
  border: 1px solid rgba(255,171,0,0.3);
  border-radius: var(--radius);
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: var(--transition);
  overflow: hidden;
}
.puzzle-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.puzzle-widget.expanded .puzzle-widget-header { border-color: rgba(255,171,0,0.2); }
.puzzle-icon { font-size: 1rem; }
.puzzle-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  flex: 1;
}
.puzzle-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
}
.puzzle-toggle {
  font-size: 0.55rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.puzzle-widget.expanded .puzzle-toggle { transform: rotate(180deg); }
.puzzle-widget-body {
  display: none;
  padding: 0.75rem 1rem 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
.puzzle-widget.expanded .puzzle-widget-body { display: flex; }
.puzzle-briefing { font-size: 0.73rem; color: var(--text-secondary); line-height: 1.5; }
.puzzle-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.puzzle-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,171,0,0.15);
  border: 1px solid rgba(255,171,0,0.3);
  transition: var(--transition);
}
.puzzle-dot.collected {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
}
.puzzle-hint { font-size: 0.7rem; color: var(--text-muted); font-style: italic; }
.btn-puzzle-complete {
  display: block;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(135deg, var(--amber), #cc8800);
  border-radius: var(--radius-sm);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  transition: var(--transition);
}
.btn-puzzle-complete:hover { transform: translateY(-1px); box-shadow: 0 4px 14px var(--amber-glow); }

.puzzle-notif {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 300px;
  background: rgba(6,12,28,0.97);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(255,171,0,0.2);
  transform: translateX(320px);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.puzzle-notif.show { transform: translateX(0); }
.puzzle-notif-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
.puzzle-notif-body { font-size: 0.8rem; color: var(--text-primary); line-height: 1.5; margin-bottom: 0.3rem; }
.puzzle-notif-progress { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); }

.puzzle-complete-modal {
  position: fixed;
  inset: 0;
  background: rgba(4,8,15,0.92);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.puzzle-complete-modal.show { opacity: 1; pointer-events: all; }
.puzzle-complete-content {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--amber);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 80px var(--amber-glow);
  max-width: 400px;
}
.puzzle-complete-icon { font-size: 3rem; margin-bottom: 1rem; }
.puzzle-complete-content h2 { font-size: 1.2rem; margin-bottom: 1.5rem; color: var(--amber); }

/* ─── IMAGE LIGHTBOX ─────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4,8,15,0.95);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox.show { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  border: 1px solid var(--cyan-border);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* ─── MOBILE SIDEBAR TOGGLE ──────────────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  width: 40px; height: 40px;
  background: var(--bg-sidebar);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--cyan-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ─── UTILITY ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mono { font-family: 'JetBrains Mono', monospace; }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── REVEAL ANIMATION CLASSES ───────────────────────────── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.4s ease both;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

/* ─── MOBILE SIDEBAR BACKDROP & SECRET BADGE ─────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 9, 20, 0.72);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.secret-badge-clearance {
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  display: inline-block;
  line-height: 1.4;
  word-break: break-word;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .section-tiles { grid-template-columns: repeat(3, 1fr); }
  .interests-geometric { flex-direction: column; align-items: center; }
}

@media (max-width: 900px) {
  .layout {
    position: static;
    z-index: auto;
    padding-left: 0;
  }
  .sidebar {
    background: #050a18;
    transform: translateX(calc(-1 * var(--sidebar-width)));
    z-index: 1100;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.85);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle {
    display: flex;
    z-index: 1101;
  }
  body.sidebar-open .puzzle-widget {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(-10px);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 4.5rem 1.25rem 2rem;
  }
  .hero-top { flex-direction: column; align-items: center; text-align: center; }
  .hero-main-photo { width: 220px; height: 300px; }
  .hero-cta, .hero-badges { justify-content: center; }
  .hero-bio { text-align: center; margin: 0.75rem auto 1.25rem; }
  .hero-name { font-size: 2rem; }
  .section-tiles { grid-template-columns: repeat(2, 1fr); }
  .interests-geometric { flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
  .activity-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .activity-header .badge {
    align-self: flex-start;
    white-space: normal;
    line-height: 1.3;
    font-size: 0.58rem;
    padding: 0.25rem 0.55rem;
  }
  .activity-header-left {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ctf-cards-grid, .projects-grid, .certs-grid, .activities-grid, .events-grid {
    grid-template-columns: 1fr;
  }
  .section-tiles { grid-template-columns: repeat(2, 1fr); }
  .puzzle-widget {
    top: 0.75rem;
    right: 0.75rem;
    width: 200px;
  }
  .puzzle-widget-header {
    padding: 0.55rem 0.75rem;
  }
  .puzzle-title {
    font-size: 0.58rem;
  }
  .sidebar-toggle {
    top: 0.75rem;
    left: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .interests-geometric { gap: 1rem; }
  .interest-hex { width: 160px; height: 180px; }
  .event-deck-stack { height: 260px; }
  .activity-photo-wrap { height: 340px; }
  .secret-badge-clearance {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.55rem;
  }
}

/* ─── HOME: SKILLS & EDUCATION ───────────────────────────── */
.skills-section { margin-top: 3rem; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.skill-card { padding: 1.1rem 1.25rem; }
.skill-card-title {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 0.7rem;
}
.edu-list { display: grid; gap: 0.9rem; margin-top: 1rem; }
.edu-card { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; padding: 1.1rem 1.25rem; align-items: start; }
.edu-period { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--green); padding-top: 0.15rem; }
.edu-school { font-weight: 700; font-size: 0.95rem; }
.edu-title { color: var(--text-secondary); font-size: 0.86rem; margin-top: 0.15rem; }
.edu-note { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }
@media (max-width: 640px) { .edu-card { grid-template-columns: 1fr; gap: 0.4rem; } .skills-grid { grid-template-columns: 1fr; } }

/* ============================================================
   RESPONSIVE v2 — phones, foldables, tablets, desktops, TVs
   (appended last so it overrides earlier rules)
   ============================================================ */

/* ── Base: never let anything exceed the screen ───────────── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg, canvas, iframe { max-width: 100%; }
.card, .timeline-card, .project-card-body, .cert-header, .activity-card, .event-card {
  overflow-wrap: anywhere;
}
.tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.badge { max-width: 100%; }

/* Mobile browsers: 100vh includes the hidden address bar → use dvh */
@supports (height: 100dvh) {
  .sidebar { height: 100dvh; }
  .layout, .main-content, body { min-height: 100dvh; }
}

/* Notches / rounded corners / home bar (needs viewport-fit=cover) */
.main-content {
  padding-left: max(var(--pad-x, 3.5rem), env(safe-area-inset-left));
  padding-right: max(var(--pad-x, 3.5rem), env(safe-area-inset-right));
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}
.sidebar-bottom { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

/* ── Very large screens (2K / 4K / TV): keep content readable ─ */
@media (min-width: 1700px) {
  .main-content { --pad-x: max(3.5rem, calc((100% - 1500px) / 2)); }
}
@media (min-width: 2400px) {
  html { font-size: 18px; }
}

/* ── Laptops / small desktops / iPad landscape (901–1180) ──── */
@media (min-width: 901px) and (max-width: 1180px) {
  .main-content { --pad-x: 2rem; }
  .projects-grid, .certs-grid, .ctf-cards-grid, .activities-grid, .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .hero-top { gap: 1.75rem; }
}

/* ── Tablets & phones (≤900): burger menu layout ───────────── */
@media (max-width: 900px) {
  .main-content { --pad-x: 1.25rem; }
  .sidebar { width: min(var(--sidebar-width), 86vw); transform: translateX(-105%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle {
    top: calc(0.75rem + env(safe-area-inset-top));
    left: calc(0.75rem + env(safe-area-inset-left));
  }
  .puzzle-widget {
    top: calc(0.75rem + env(safe-area-inset-top));
    right: calc(0.75rem + env(safe-area-inset-right));
    max-width: calc(100vw - 6rem);
  }
  .hero-photo-wrap { max-width: 100%; }
  .hero-main-photo { max-width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .hero-typing-wrap { justify-content: center; flex-wrap: wrap; text-align: center; }
  .hero-badges, .hero-cta { max-width: 100%; }
  .hero-badges .badge { white-space: normal; text-align: center; line-height: 1.35; }
  .hero-cta .btn { max-width: 100%; justify-content: center; }

  /* hexagons clip long text on small screens → rounded cards */
  .interests-geometric { align-items: center; width: 100%; }
  .interest-hex,
  .interest-hex::before { clip-path: none; border-radius: var(--radius-lg); }
  .interest-hex { width: min(100%, 420px); height: auto; min-height: 0; }
  .interest-hex::before { border: 1px solid var(--cyan-border); background-clip: padding-box; }
  .interest-hex-inner { padding: 1.4rem 1.25rem; height: auto; }

  .filter-bar { gap: 0.4rem; padding: 0.6rem; }
  .filter-btn { border-color: var(--cyan-border); }
  .timeline { padding-left: 1.5rem; }
  .ctf-header, .cert-header, .timeline-header { flex-wrap: wrap; gap: 0.6rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .lightbox img { max-width: 96vw; max-height: 92dvh; max-height: 92vh; object-fit: contain; }
}

/* ── Phones (≤600) ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .main-content { --pad-x: 1rem; padding-top: 4.25rem; }
  .page-title { font-size: 1.55rem; }
  .hero-name { font-size: clamp(1.6rem, 8vw, 2rem); }
  .hero-typing, .hero-typing-prefix { font-size: 0.9rem; }
  .hero-bio { font-size: 0.92rem; }
  .btn { padding: 0.65rem 1rem; }
  .ctf-slideshow { height: 220px; }
  .ctf-slide img { object-fit: contain; background: rgba(0,0,0,.55); }
  .activity-photo-wrap { min-width: 0; width: 100%; height: auto; max-height: 420px; }
  .activity-photo-wrap img { height: auto; max-height: 420px; object-fit: contain; }
  .event-deck-stack { height: 230px; }
  .event-deck-card img { object-fit: contain; background: rgba(0,0,0,.5); }
  .project-card-img { height: 190px; }
  .project-card-footer, .cert-footer, .timeline-footer, .ctf-footer { flex-wrap: wrap; gap: 0.5rem; }
  .edu-card { padding: 1rem; }
}

/* ── Very small / foldable closed (≤360) ───────────────────── */
@media (max-width: 360px) {
  .main-content { --pad-x: 0.75rem; }
  .page-title { font-size: 1.35rem; }
  .hero-name { font-size: 1.5rem; }
  .btn { font-size: 0.8rem; padding: 0.6rem 0.8rem; }
  .badge { font-size: 0.6rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .puzzle-widget { width: 168px; }
  .sidebar { width: 88vw; }
  .tag { font-size: 0.62rem; }
  .skill-card-title { letter-spacing: 0.08em; }
}

/* ── Phones in landscape (short screens) ───────────────────── */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-main-photo { width: 150px; height: auto; max-height: 55vh; }
  .hero-top { flex-direction: row; text-align: left; align-items: center; }
  .hero-cta, .hero-badges, .hero-typing-wrap { justify-content: flex-start; text-align: left; }
  .hero-bio { text-align: left; margin-left: 0; }
  .sidebar-profile { padding: 0.75rem; }
  .sidebar-nav { padding: 0.5rem; justify-content: flex-start; }
  .nav-item { padding: 0.45rem 0.75rem; }
  .main-content { padding-top: 3.5rem; }
  .lightbox img { max-height: 88vh; }
  .puzzle-widget { transform: scale(.9); transform-origin: top right; }
}

/* ── Touch screens: comfortable tap targets, no hover tricks ── */
@media (pointer: coarse) {
  .btn, .btn-sm, .filter-btn, .lang-btn, .events-filter-btn, .ctf-dot {
    min-height: 44px;
  }
  .btn-sm { padding-top: 0.55rem; padding-bottom: 0.55rem; }
  .social-link { width: 44px; height: 44px; }
  .sidebar-toggle { width: 44px; height: 44px; }
  .nav-item { min-height: 44px; }
  .event-deck-btn { min-width: 44px; min-height: 44px; }
  .interest-hex:hover, .card:hover { transform: none; }
}

/* ── Accessibility: reduced motion / high contrast / print ──── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #particles-canvas { display: none; }
  .cursor { animation: none; }
}
@media (prefers-contrast: more) {
  :root { --text-secondary: #cbd5e1; --text-muted: #94a3b8; --cyan-border: rgba(0,212,255,.55); }
}
@media print {
  .sidebar, .sidebar-toggle, .puzzle-widget, #particles-canvas, .sidebar-backdrop, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .main-content { margin: 0; width: 100%; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; border-color: #999; background: #fff; }
  * { color: #000 !important; -webkit-text-fill-color: #000 !important; }
}
