/* ================================================
   Dark glass · Cyber Violet/Blue · Trilingual
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,700;9..40,900&display=swap');

/* =============== TOKENS =============== */

:root {
  --bg:     #05040a;
  --bg2:    #090712;

  --text:   rgba(225, 248, 235, .93);
  --muted:  rgba(170, 185, 205, .72);
  --dim:    rgba(135, 150, 170, .55);

  /* Violet + Blue */
  --accent:  #8b5cf6;   /* violet */
  --accent2: #3b82f6;   /* electric blue */
  --accent3: #22d3ee;   /* cyan */

  --line:   rgba(139, 92, 246, .15);
  --line2:  rgba(255, 255, 255, .07);

  --glass:  rgba(8, 9, 14, .62);
  --glass2: rgba(6, 7, 12, .48);

  --shadow:  0 20px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(139,92,246,.06);
  --shadow2: 0 8px 28px rgba(0,0,0,.45);

  --r:  20px;
  --r2: 14px;
  --sw: 268px;

/* inline SVG icons used in text */
.inline-icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  fill: currentColor;
  margin-right: 0.25em;
}

  --ff-head: 'Space Mono', monospace;
  --ff-body: 'DM Sans', system-ui, sans-serif;
}

/* =============== RESET =============== */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 17px; /* increased for better readability */
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


a { color: inherit; }

/* =============== MATRIX =============== */

#matrix{
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;

  opacity: .85;
  mix-blend-mode: screen;
  filter: contrast(125%) brightness(120%);
}

/* =============== TOPBAR =============== */

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(5, 4, 10, .70);
  border-bottom: 1px solid var(--line);
}

/* =============== ACCESSIBILITY: SKIP LINK =============== */
.skip{
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus{
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  z-index: 60;
  background: rgba(0,0,0,.8);
  color: var(--text);
  border-radius: 8px;
  border: 1px solid var(--line2);
  box-shadow: 0 6px 18px rgba(0,0,0,.6);
}

/* =============== BRAND =============== */

.brand { display: flex; align-items: center; gap: 12px; }

.brandDot {
  width: 12px; height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  box-shadow: 0 0 16px rgba(139,92,246,.6), 0 0 32px rgba(59,130,246,.3);
  flex-shrink: 0;
  animation: pulseGlow 3s ease-in-out infinite;
  position: relative;
}

.brandDot::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(59,130,246,.1));
  animation: rotate 6s linear infinite;
}

@keyframes pulseGlow {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
    box-shadow: 0 0 16px rgba(139,92,246,.6), 0 0 32px rgba(59,130,246,.3);
  }
  50% { 
    opacity: .7; 
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(139,92,246,.8), 0 0 48px rgba(59,130,246,.5);
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brandTitle {
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2em;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(139,92,246,.3);
  position: relative;
}

.brandTitle::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.5), transparent);
}

.brandSub { 
  font-size: 12px; 
  color: var(--muted); 
  letter-spacing: .05em;
  opacity: .9;
}

/* =============== BURGER =============== */

.iconBtn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
}
.iconBtn:hover { border-color: rgba(139,92,246,.42); }

.burger { display: block; width: 18px; height: 12px; position: relative; }
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--text);
  border-radius: 9px;
}
.burger::before { top: 0; }
.burger::after  { bottom: 0; }

/* =============== LANG SWITCHER =============== */

.lang { display: flex; gap: 6px; }

.pill {
  cursor: pointer;
  border: 1px solid var(--line2);
  background: rgba(0,0,0,.22);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  transition: border-color .18s, color .18s, box-shadow .18s;
}
.pill:hover {
  border-color: rgba(139,92,246,.35);
  color: var(--accent);
}
.pill.is-active {
  border-color: rgba(139,92,246,.55);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(139,92,246,.16), inset 0 0 8px rgba(139,92,246,.07);
}

/* =============== LAYOUT =============== */

.app {
  display: flex;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* =============== GLASS =============== */

.glass, .glass2 {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.05) 0%, transparent 55%);
  pointer-events: none;
}

.glass2 {
  background: var(--glass2);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow2);
}

/* =============== SIDEBAR =============== */

.sidebar {
  width: var(--sw);
  min-width: var(--sw);
  height: calc(100vh - 24px);
  position: sticky;
  top: 12px;
  margin: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sideHeader {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.avatar {
  width: 96px; height: 96px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--ff-head);
  font-size: 28px;
  font-weight: 900;
  color: white;
  border: 1px solid rgba(34,211,238,.6);
  background: linear-gradient(180deg, rgba(34,211,238,.12), rgba(139,92,246,.06));
  box-shadow: 0 12px 50px rgba(34,211,238,.10), 0 6px 28px rgba(139,92,246,.12) inset;
  flex-shrink: 0;
  transform-origin: center;
  animation: pulse 2.8s ease-in-out infinite;
  position: relative;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 6px 28px rgba(139,92,246,.12);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 10px 40px rgba(139,92,246,.22);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 28px rgba(139,92,246,.12);
  }
}

/* electric shocks: quick flicker + streaks to simulate jolts */
.avatar::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 120%; height: 120%;
  border-radius: 20px;
  background: radial-gradient(closest-side at 30% 30%, rgba(34,211,238,.26), transparent 28%), radial-gradient(closest-side at 70% 70%, rgba(139,92,246,.20), transparent 32%);
  filter: blur(14px) saturate(150%) contrast(115%);
  z-index: -1;
  mix-blend-mode: screen;
  animation: shockGlow 1.2s ease-in-out infinite;
}

@keyframes shockGlow {
  0% { filter: blur(8px) hue-rotate(0deg) opacity(0.5); transform: translate(-50%, -50%) scale(1); }
  10% { filter: blur(18px) hue-rotate(20deg) opacity(1); transform: translate(-50%, -50%) scale(1.04); }
  25% { filter: blur(10px) hue-rotate(-10deg) opacity(0.6); transform: translate(-50%, -50%) scale(1); }
  40% { filter: blur(16px) hue-rotate(45deg) opacity(1); transform: translate(-50%, -50%) scale(1.06); }
  60% { filter: blur(10px) hue-rotate(0deg) opacity(0.6); transform: translate(-50%, -50%) scale(1); }
  100% { filter: blur(8px) hue-rotate(0deg) opacity(0.5); transform: translate(-50%, -50%) scale(1); }
}

/* fast streaks and flicker to mimic electric arcs */
.avatar::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 140%; height: 140%;
  border-radius: 22px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  background-image: linear-gradient(90deg, rgba(34,211,238,0) 0%, rgba(34,211,238,.45) 25%, rgba(139,92,246,.45) 50%, rgba(59,130,246,.35) 75%, rgba(34,211,238,0) 100%);
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 70%);
  filter: blur(6px) contrast(140%) saturate(160%);
  animation: shockFlicker 1s steps(3, end) infinite, shockMove 2.6s ease-in-out infinite;
}

@keyframes shockFlicker {
  0% { opacity: 0; }
  6% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
  12% { opacity: 0; }
  18% { opacity: 1; transform: translate(-48%, -52%) scale(1.04); }
  30% { opacity: 0; }
  50% { opacity: 0.9; transform: translate(-52%, -48%) scale(1.06); }
  70% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes shockMove {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-52%, -48%) rotate(8deg); }
  50% { transform: translate(-50%, -50%) rotate(0deg); }
  75% { transform: translate(-48%, -52%) rotate(-8deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

/* smaller avatar on mobile */
@media (max-width: 980px) {
  .avatar { width: 56px; height: 56px; font-size: 16px; border-radius: 12px; }
  .avatar::before { width: 140%; height: 140%; }
}

.who { min-width: 0; }

.name {
  font-family: var(--ff-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .12s;
}
.item:hover {
  color: var(--text);
  background: rgba(139,92,246,.06);
  border-color: rgba(139,92,246,.14);
}
.item.is-active {
  color: var(--accent);
  background: rgba(139,92,246,.09);
  border-color: rgba(139,92,246,.45);
  box-shadow: 0 0 16px rgba(139,92,246,.12);
  font-weight: 700;
}

/* ===== MENU ICONS (GLOBAL, UNIFORM) ===== */
.menu .ico{
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu .ico svg{
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor; /* tes SVG sont fill-based */
  stroke: none;
  opacity: .98;
}

.item.is-active .ico svg{
  filter: drop-shadow(0 0 10px rgba(139,92,246,.45));
}

.sideFooter {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.smallLink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  padding: 7px 13px;
  border: 1px solid rgba(139,92,246,.38);
  border-radius: 999px;
  transition: background .18s, box-shadow .18s;
  font-family: var(--ff-head);
  letter-spacing: .04em;
}
.smallLink:hover {
  background: rgba(139,92,246,.10);
  box-shadow: 0 0 14px rgba(139,92,246,.18);
}

.tiny {
  font-size: 11px;
  color: var(--dim);
  margin-top: 8px;
  line-height: 1.5;
}

/* =============== MAIN =============== */

.main {
  flex: 1;
  padding: 12px 12px 32px 0;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* =============== HERO =============== */

.hero { padding: 26px 24px; }

.heroGrid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: start;
}

/* =============== PROFILE HERO (with photo) =============== */
.profileHeroWrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
}

.profilePhotoCol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.profilePhotoRing {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(34,211,238,.45);
  box-shadow: 0 0 28px rgba(139,92,246,.25), 0 0 0 4px rgba(34,211,238,.08);
  overflow: hidden;
  background: rgba(139,92,246,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow .25s;
}
.profilePhotoRing:hover {
  box-shadow: 0 0 40px rgba(139,92,246,.4), 0 0 0 4px rgba(34,211,238,.18);
}

.profilePhotoImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profilePhotoPlaceholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.profilePhotoUpload {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(139,92,246,.75);
  border: 1.5px solid rgba(34,211,238,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .2s, transform .15s;
  z-index: 2;
}
.profilePhotoUpload:hover {
  background: rgba(139,92,246,1);
  transform: scale(1.1);
}

.profileSocialRow {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.profileSocialBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.3);
  color: var(--accent);
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.profileSocialBtn:hover {
  background: rgba(139,92,246,.28);
  transform: translateY(-2px);
}

.profileInfoCol {
  min-width: 0;
}

@media (max-width: 700px) {
  .profileHeroWrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .profileInfoCol {
    width: 100%;
  }
}

/* =============== TYPOGRAPHY =============== */

.h1 {
  font-family: var(--ff-head);
  font-size: 25px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -.01em;
  line-height: 1.2;
  background: linear-gradient(130deg, var(--text) 35%, var(--accent) 70%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h2 {
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  letter-spacing: .05em;
}

h3 {
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: .04em;
  color: var(--accent);
}

.p { color: var(--muted); line-height: 1.65; margin: 0; }

/* =============== STAT CARDS =============== */

.stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 155px;
}

.statCard {
  padding: 14px 16px;
  border-radius: 16px;
  text-align: right;
}
.statK {
  font-size: 10px;
  color: var(--dim);
  font-family: var(--ff-head);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.statV {
  font-family: var(--ff-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin: 3px 0 2px;
  letter-spacing: .02em;
}
.statS { font-size: 11px; color: var(--muted); }

/* =============== BUTTONS =============== */

.ctaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  font-family: var(--ff-head);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid var(--accent);
  background: rgba(139,92,246,.12);
  color: var(--accent);
  transition: background .18s, box-shadow .18s, transform .15s;
  cursor: pointer;
}
.btn:hover {
  background: rgba(139,92,246,.20);
  box-shadow: 0 0 22px rgba(139,92,246,.28);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line2);
  color: var(--muted);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139,92,246,.08);
  box-shadow: none;
  transform: none;
}
.btn.small {
  padding: 6px 14px;
  font-size: 10px;
  gap: 4px;
}

/* =============== CARDS =============== */

.card { padding: 20px; }

.cardHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.chip {
  font-family: var(--ff-head);
  font-size: 10.5px;
  letter-spacing: .07em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139,92,246,.34);
  background: rgba(139,92,246,.08);
  color: var(--accent);
  white-space: nowrap;
}

/* =============== TWO COLUMN =============== */

.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.block { display: flex; flex-direction: column; gap: 14px; }

/* =============== KEY-VALUE =============== */

.kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line2);
  font-size: 13.5px;
}
.kv:last-child { border-bottom: none; }

.k {
  font-family: var(--ff-head);
  font-size: 10.5px;
  letter-spacing: .07em;
  color: var(--accent);
  text-transform: uppercase;
  padding-top: 2px;
}
.v { color: var(--muted); line-height: 1.5; }

/* =============== NOTE BOX =============== */

.note {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(139,92,246,.06);
  border: 1px solid rgba(139,92,246,.15);
}

.noteTitle {
  font-family: var(--ff-head);
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.list {
  margin: 0;
  padding: 0 0 0 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
}
.list li::marker { color: var(--accent); }

/* =============== CONTACT CARDS =============== */

.contactCards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.contactCard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line2);
}

.contactCardIcon {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contactCardBody {
  flex: 1;
  min-width: 0;
}

.contactCardLabel {
  font-size: 10px;
  font-family: var(--ff-head);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2px;
}

.contactCardValue {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contactCardActions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .contactCard {
    flex-wrap: wrap;
  }
  .contactCardValue {
    font-size: 11px;
  }
}

/* =============== MAP =============== */

.mapWrap {
  border-radius: 14px;
  overflow: hidden;
  height: 190px;
  border: 1px solid var(--line2);
}
.mapWrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: brightness(.82) saturate(.65) hue-rotate(180deg);
}

/* =============== ORG CHART =============== */

.orgChartWrap {
  padding: 16px;
  border-radius: 14px;
  background: rgba(139,92,246,.06);
  border: 1px solid rgba(139,92,246,.15);
  margin-top: 18px;
}

.orgChartWrap .noteTitle { margin-bottom: 8px; }
.orgChartWrap .p { margin: 0; color: var(--muted); }

.orgChart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.orgChart__level {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.orgChart__node {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(139,92,246,.18);
  text-align: center;
  min-width: 120px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

/* =============== IMAGE CARD =============== */

.imgCard {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line2);
}
.imgCard img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.imgCard:hover img { transform: scale(1.03); }

.imgCaption {
  padding: 8px 13px;
  font-size: 11px;
  color: var(--dim);
  font-family: var(--ff-head);
  letter-spacing: .04em;
}

/* =============== PROJECT GRID =============== */

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.proj {
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass2);
  border: 1px solid var(--line2);
  text-decoration: none;
  display: block;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.proj:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,.38);
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 0 1px rgba(139,92,246,.14);
}
.proj img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.proj:hover img { transform: scale(1.06); }

.projMeta { padding: 11px 13px 13px; }
.projT {
  font-family: var(--ff-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .03em;
}
.projS { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* =============== EXAMS / CERTIFICATES (PAGE-SPECIFIC HELPERS) =============== */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.certCard {
  padding: 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line2);
  background: var(--glass2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.certTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.certName {
  font-family: var(--ff-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

.status {
  font-family: var(--ff-head);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.status.s-done {
  color: var(--accent3);
  background: rgba(34,211,238,.06);
  border-color: rgba(34,211,238,.12);
}

.certMeta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.certText { margin-top: 10px; color: var(--muted); line-height: 1.8; font-size: 15px; }
.certActions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* Improve spacing for hero description on exam page */
.hero .p { margin-top: 8px; margin-bottom: 12px; }

/* =============== TIMELINE =============== */

/* smooth main fade for dynamic page loading */
main{
  transition: opacity .3s ease, transform .3s ease;
}
main.fade-out{ opacity: 0; transform: translateY(12px); }
main.fade-in{ opacity: 0; transform: translateY(12px); }

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent2) 0%, rgba(59,130,246,.10) 100%);
}

/* ---- veille page styles moved from inline block ---- */
.tabs { display:flex; gap:8px; flex-wrap:wrap; }

.glassInput {
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.1);
  background: rgba(10, 14, 12, .35);
  color: var(--text);
  outline:none;
  backdrop-filter: blur(10px);
}

.feedCard {
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
}

.feedTop {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  opacity:.8;
  margin-bottom:8px;
}

.feedTitle {
  font-size:16px;
  margin:6px 0 8px;
}

.feedDesc {
  font-size:13px;
  opacity:.85;
}

.feedLink {
  display:inline-block;
  margin-top:10px;
  font-size:13px;
}
/* ---- end veille styles ---- */

/* ---- contatti page ---- */
.glassInput{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10, 14, 12, .35);
  color: var(--text);
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  resize: vertical;
}
.lbl{
  display:block;
  font-size:12px;
  opacity:.85;
  margin: 0 0 6px;
}

/* ---- competenze page ---- */
.skillBox{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
}
.skillTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.skillName{
  font-size:15px;
  font-weight:700;
  letter-spacing:.02em;
}
.lvl{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  opacity:.9;
  white-space:nowrap;
}
.bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  margin-bottom:10px;
}
.bar > span{
  display:block;
  height:100%;
  width:50%;
  background: rgba(124,255,160,.55);
  box-shadow: 0 0 18px rgba(124,255,160,.25);
}
.skillList{
  font-size:13px;
  opacity:.9;
  line-height:1.45;
}
.tag{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  margin:4px 6px 0 0;
  font-size:12px;
  opacity:.92;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- certificazioni page ---- */
.grid2{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:14px;
}
.certCard{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
}
.certTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.certName{
  font-weight:900;
  letter-spacing:.02em;
  font-size:15px;
}
.certMeta{
  font-size:12px;
  opacity:.8;
  margin-bottom:8px;
}
.certText{
  font-size:13px;
  opacity:.9;
  line-height:1.45;
}
.status{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  white-space:nowrap;
}
.s-progress{
  border-color: rgba(0,229,255,.25);
  box-shadow: 0 0 14px rgba(0,229,255,.12);
}
.s-done{
  border-color: rgba(124,255,160,.25);
  box-shadow: 0 0 14px rgba(124,255,160,.12);
}

.timeline .kv{
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.timeline .kv:last-child{ border-bottom:none; }

@media (max-width: 860px){
  .grid2{ grid-template-columns: 1fr; }
}


.tl-item {
  position: relative;
  padding-bottom: 22px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.tl-item.show { opacity: 1; transform: none; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 10px;
  width: 11px; height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(139,92,246,.70);
  border: 2px solid var(--bg);
}

.tl-content {
  padding: 16px 18px;
  border-radius: 16px;
}

.tl-date {
  font-family: var(--ff-head);
  font-size: 10.5px;
  letter-spacing: .09em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* =============== FOOTER =============== */

.foot {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--dim);
  font-family: var(--ff-head);
  letter-spacing: .04em;
}

/* =============== SCROLLBAR =============== */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.42); }

/* =============== SELECTION =============== */

::selection {
  background: rgba(139,92,246,.25);
  color: var(--text);
}

/* =============== RESPONSIVE =============== */

@media (max-width: 1020px) {
  .heroGrid { grid-template-columns: 1fr; }
  .stats { flex-direction: row; }
  .statCard { flex: 1; text-align: left; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .topbar { display: flex; }
  .app { flex-direction: column; }

  .sidebar {
    position: fixed;
    left: 0; right: 0;
    top: 58px;
    height: calc(100vh - 58px);
    width: 100%;
    min-width: unset;
    z-index: 50;
    border-radius: 0;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    overflow-y: auto;
  }
  .sidebar.open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
  .main { margin: 0; padding: 12px 10px; }
  .twoCol { grid-template-columns: 1fr; }
  .sideHeader { padding: 14px 16px 10px; }
  .menu { padding: 0 8px 8px; }
  .item { padding: 11px 12px; font-size: 15px; border-radius: 10px; }
  .lang { padding: 10px 16px; }
  .sideFooter { padding: 10px 16px 20px; }
}

@media (max-width: 700px) {
  /* Hero adjustments */
  .homeHeroGrid { grid-template-columns: 1fr !important; }
  .heroGrid { grid-template-columns: 1fr !important; }
  .statStrip { grid-template-columns: repeat(2,1fr); }
  .quickNav { grid-template-columns: repeat(2,1fr); }
  .homeProjects { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .grid4 { grid-template-columns: 1fr !important; }
  .h1 { font-size: 18px; line-height: 1.3; }
  .h2 { font-size: 16px; }
  .hero { padding: 16px 14px; }
  .card { padding: 14px 12px; }
  .stats { flex-direction: column; }
  .statCard { width: 100%; }
  .item { font-size: 15px; padding: 10px 12px; }
  .menu .ico, .menu .ico svg { width: 22px; height: 22px; }
  /* Quick nav single column on very small screens */
  .quickNav { grid-template-columns: 1fr; }
  .statStrip { grid-template-columns: repeat(2,1fr); }
  /* skill boxes stack */
  .skillBox { padding: 12px; }
  .skillList { font-size: 11px; }
  /* project cards better spacing */
  .hpCard { flex-direction: column; }
  .hpImg { width: 100%; height: 140px; }
  /* table scroll hint */
  .tableScroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* tags wrap naturally */
  .v { flex-wrap: wrap; }
  .tag { font-size: 11px; padding: 4px 8px; }
  /* mapping/proof grids single col */
  .mappingGrid, .proofGrid { grid-template-columns: 1fr; }
}

/* ===== Headings with icons (match sidebar style) ===== */
.h2Row{
  display:flex;
  align-items:center;
  gap:10px;
}
.h2ico{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color: var(--accent2);
}
.h2ico svg{
  width:22px;
  height:22px;
  display:block;
  fill: currentColor;
  stroke:none;
  opacity:.98;
}

/* project page custom styles */
.menu .ico{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu .ico svg{
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  stroke: none;
  opacity: .95;
}

.item.is-active .ico svg{
  filter: drop-shadow(0 0 10px rgba(139,92,246,.45));
}
.menu .item.is-active .ico svg{
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(124,255,160,.40));
}

.tabs{ display:flex; gap:8px; flex-wrap:wrap; }

.glassInput{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10, 14, 12, .35);
  color: var(--text);
  outline:none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.projGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
}

.projCard{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}

.thumb{ position:relative; height:180px; overflow:hidden; }
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.05);
  opacity:.95;
}
.thumbBadge{
  position:absolute;
  left:10px;
  bottom:10px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(6,10,8,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size:12px;
  opacity:.95;
}

.projBody{ padding:14px; }
.projTitle{ font-size:16px; font-weight:900; margin-bottom:8px; letter-spacing:.02em; }
.projText{ font-size:13px; opacity:.9; line-height:1.45; margin-bottom:10px; }
.projTags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.tag{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-size:12px;
  opacity:.92;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.projActions{ display:flex; gap:10px; flex-wrap:wrap; }

/* Modal */
.modal{ position:fixed; inset:0; display:none; z-index:999; }
.modal.isOpen{ display:block; }
.modalOverlay{ position:absolute; inset:0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.modalCard{
  position:relative;
  width:min(920px, calc(100vw - 24px));
  margin: 60px auto 0;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
}
.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modalTitle{ font-size:18px; font-weight:900; letter-spacing:.02em; }
.modalMeta{ font-size:12px; opacity:.8; margin-top:2px; }
.modalImg{ width:100%; height:300px; object-fit:cover; display:block; opacity:.96; }
.modalBody{ padding:14px; }

@media (max-width: 860px){
  .projGrid{ grid-template-columns: 1fr; }
  .thumb{ height:200px; }
  .modalImg{ height:220px; }
  .modalCard{ margin-top: 18px; }
}

/* Focus styles for accessibility (keyboard users) */
.projCard{ transition: transform .18s, box-shadow .18s, border-color .18s; }
.projCard:focus, .projCard:focus-visible{
  outline: none;
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(139,92,246,.16), 0 6px 18px rgba(0,0,0,.55);
  border-color: rgba(139,92,246,.45);
}
.projCard:focus .thumb img{ transform: scale(1.08); transition: transform .25s ease; }



/* ============================================================
   MOBILE IMPROVEMENTS — Added April 2026
   ============================================================ */

/* Better touch targets globally */
a, button { -webkit-tap-highlight-color: transparent; }

/* Topbar height consistent */
.topbar { min-height: 58px; }

/* Sidebar overlay backdrop on mobile */
@media (max-width: 980px) {
  .app::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 40;
    pointer-events: none;
    transition: background .25s ease;
  }
  .app.sidebar-open::before {
    background: rgba(0,0,0,.55);
    pointer-events: auto;
  }
}

/* Burger button bigger tap area */
.iconBtn { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* Main scrollable independently */
.main {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cards: avoid content overflow on small screens */
@media (max-width: 560px) {
  .card, .hero { border-radius: 14px; }
  pre { font-size: 10px !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Better readable body text */
  body { font-size: 15px; }
  .p { font-size: 14px; line-height: 1.6; }
  /* Stat strip 2-col always */
  .statStrip { grid-template-columns: repeat(2,1fr) !important; }
  /* Skill level badge wraps */
  .skillTop { flex-wrap: wrap; gap: 4px; }
  /* Section numbers don't shrink */
  .sectionNum { flex-shrink: 0; }
  /* Tab nav wraps nicely */
  .tabNav { gap: 6px; }
  .tabBtn { padding: 7px 14px; font-size: 11px; }
  /* E4 table: make text smaller to fit */
  .e4Table { font-size: 11px; }
  .e4Table th { font-size: 10px; padding: 8px; }
  .e4Table td { padding: 7px 8px; }
  /* Proof cards code block */
  .proofCard pre { font-size: 9px !important; line-height: 1.6; }
}

/* Medium screens (tablets) */
@media (max-width: 700px) and (min-width: 561px) {
  body { font-size: 16px; }
  .grid4 { grid-template-columns: repeat(2,1fr); }
}

/* Smooth scroll for anchor links */
html { scroll-behavior: smooth; }

/* Prevent horizontal overflow site-wide */
body { max-width: 100vw; overflow-x: hidden; }

/* Better link readability */
.menu .item { touch-action: manipulation; }

/* Home hero: avatar below text on mobile */
@media (max-width: 600px) {
  .homeAvatar { display: none; }
  .homeAvatarCanvas { width: 120px !important; height: 120px !important; }
}

/* Quick nav: 2-col on phones, 1-col on very small */
@media (max-width: 380px) {
  .quickNav { grid-template-columns: 1fr; }
  .qCard { flex-direction: row; align-items: center; }
}

/* Mapping grid responsive */
.mappingGrid { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); }
.proofGrid   { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); }

/* Stat card mobile */
@media (max-width: 560px) {
  .statCard { padding: 12px 14px; }
  .statV { font-size: 1.1rem; }
  .sStrip { padding: 10px 12px; }
  .sStripV { font-size: 1.3rem; }
}
