/* YaneCode Lab — MIT CSAIL Unified Research-Grade Design System
   Inspired by: MIT CSAIL (csail.mit.edu), DeepMind Research, Nature Journal
   Palette: Black #000000 · Dark Base #07090E · Panel #11141F · Surface #161A28
   Accents: CSAIL Burnt Orange #B94700 · CSAIL Gold #F0B323 · Signal Emerald #10B981 · Sky #38BDF8
   Typography: Newsreader (editorial serif headings) · Inter (body) · JetBrains Mono (data/meta)
*/

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-VF.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ═══════════════════════════════════════════
   UNIFIED RESEARCH DESIGN TOKENS (LIGHT MODE - LOGO BLUE PALETTE)
═══════════════════════════════════════════ */
:root {
  /* Surfaces */
  --black:        #001B4D;
  --bg-base:      #F8F9FA;
  --bg-alt:       #F1F5F9;
  --panel:        #FFFFFF;
  --panel-hover:  #F8FAFC;
  --surface:      #F1F5F9;
  --surface-alt:  #E2E8F0;

  /* Borders */
  --border:       #E2E8F0;
  --border-light: rgba(15, 23, 42, 0.06);
  --border-focus: #0052CC;

  /* Text Hierarchy */
  --text-head:    #001E50;
  --text-body:    #334155;
  --text-muted:   #64748B;
  --text-faint:   #94A3B8;

  /* YaneCode Logo Colors */
  --csail-orange:   #0052CC; /* Royal Logo Blue (Primary CTA & highlights) */
  --csail-orange-h: #003D99; /* Deep Royal Blue Hover */
  --csail-gold:     #00276E; /* Deep Navy Blue (from Logo typography) */
  --signal-green:   #047857; /* Verified / Success Green */
  --signal-sky:     #0084D1; /* Atomic Orbital Cyan-Blue */
  --logo-navy:      #00276E;
  --logo-blue:      #0052CC;
  --logo-cyan:      #0084D1;
  --logo-tint:      #EFF6FF;

  /* Typography */
  --font-serif:  'Newsreader', 'Merriweather', Georgia, serif;
  --font-sans:   'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-mono:   'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --wrap: 1220px;
  --radius: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
}

/* ═══════════════════════════════════════════
   RESET & GLOBAL BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 106px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-base);
  position: relative;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-head);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(1.85rem, 3.2vw, 2.65rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--csail-orange); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--csail-gold); }

:focus-visible {
  outline: 2px solid var(--csail-orange);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.wrap    { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.sr      { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* CSAIL Overline Label */
.overline {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--csail-gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.overline::before {
  content: "●";
  font-size: .6rem;
  color: var(--csail-orange);
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--csail-orange); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-md);
  z-index: 200; text-decoration: none; font-size: .875rem;
}
.skip:focus { top: 12px; }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: .9rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
}

.btn--primary {
  background: var(--csail-orange); color: #fff;
  border-color: var(--csail-orange);
}
.btn--primary:hover {
  background: var(--csail-orange-h); border-color: var(--csail-orange-h); color: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent; color: var(--text-head);
  border-color: #CBD5E1;
}
.btn--ghost:hover {
  border-color: var(--text-head); background: rgba(15, 23, 42, 0.05); color: var(--text-head);
}

.btn--small { min-height: 38px; padding: 0 16px; font-size: .8rem; }
.btn--block  { width: 100%; }

/* ═══════════════════════════════════════════
   MIT CSAIL TWO-TIER NAVIGATION (LIGHT MODE)
═══════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.nav__tier-top {
  border-bottom: 1px solid var(--border);
  background: #F8FAFC;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #334155;
}
.nav__tier-top-in {
  display: flex; align-items: center; justify-content: space-between;
}
.nav__audience {
  display: flex; gap: 18px; align-items: center;
}
.nav__audience a {
  color: #475569; text-decoration: none; transition: color .15s; font-weight: 600;
}
.nav__audience a:hover { color: var(--csail-orange); }
.nav__audience-dot { color: #94A3B8; font-size: .6rem; }

.nav__main {
  min-height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
}
.nav__brand img { height: 42px; width: auto; }
.nav__brand-tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  color: var(--csail-orange); letter-spacing: .08em; text-transform: uppercase;
  border-left: 1px solid #CBD5E1; padding-left: 14px; line-height: 1.2;
}

.nav__menu {
  display: flex; align-items: center; gap: 1.75rem;
  font-size: .95rem; font-weight: 500;
}
.nav__menu a:not(.btn) {
  text-decoration: none;
  color: #334155;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-bottom-color .15s;
}
.nav__menu a:not(.btn):hover,
.nav__menu a:not(.btn)[aria-current="page"] {
  color: #0F172A;
  border-bottom-color: var(--csail-orange);
}

.lang {
  display: inline-flex;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.lang__opt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 30px; padding: 0 8px;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: #64748B; text-decoration: none;
  transition: background .15s, color .15s;
}
a.lang__opt:hover { background: #F1F5F9; color: #0F172A; }
.lang__opt.is-active { background: var(--csail-orange); color: #fff; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid #CBD5E1; border-radius: var(--radius-md);
  background: #FFFFFF; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__bars,
.nav__bars::before,
.nav__bars::after {
  display: block; width: 18px; height: 2px;
  background: #0F172A; margin: 0 auto;
  position: relative; content: "";
}
.nav__bars::before { position: absolute; top: -5px; left: 0; }
.nav__bars::after  { position: absolute; top: 5px;  left: 0; }

/* ═══════════════════════════════════════════
   3D PANORAMA HERO (MIT CSAIL LIGHT MODE)
═══════════════════════════════════════════ */
.csail-3d-hero {
  position: relative;
  width: 100%;
  height: clamp(660px, 82vh, 840px);
  background-color: #F8FAFC;
  background-image:
    radial-gradient(rgba(0, 39, 110, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  background-size: 32px 32px, 100% 100%;
  color: var(--text-head);
  overflow: hidden;
  user-select: none;
  cursor: grab;
  border-bottom: 1px solid var(--border);
  touch-action: pan-y;
}
.csail-3d-hero.is-dragging { cursor: grabbing; }

.csail-3d-viewport {
  position: absolute;
  inset: 0;
  perspective: 1000px;
  perspective-origin: 50% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.csail-3d-world {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50% 0px;
  will-change: transform;
}

/* 3D Spatial Laboratory Floor Disc (Concentric Radar / Orbit Grid) */
.csail-3d-floor {
  position: absolute;
  width: 2400px;
  height: 2400px;
  left: -1200px;
  top: -1200px;
  border-radius: 50%;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: translateY(380px) rotateX(90deg);
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 82, 204, 0.06) 0%, rgba(0, 39, 110, 0.02) 45%, transparent 72%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 96px, rgba(0, 39, 110, 0.05) 97px, transparent 98px);
  border: 1px dashed rgba(0, 39, 110, 0.15);
}
.csail-3d-floor::before {
  content: "";
  position: absolute;
  inset: 120px;
  border-radius: 50%;
  border: 1px solid rgba(0, 82, 204, 0.10);
  background-image:
    linear-gradient(to right, rgba(0, 39, 110, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 39, 110, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}
.csail-3d-floor::after {
  content: "";
  position: absolute;
  inset: 340px;
  border-radius: 50%;
  border: 2px solid rgba(0, 82, 204, 0.14);
}

.csail-3d-cluster {
  position: absolute;
  width: min(92vw, 1140px);
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   3D CLUSTER THEMATIC BACKDROP (ADAPTED TO CONTENT)
═══════════════════════════════════════════ */
.csail-3d-backdrop {
  position: absolute;
  inset: -36px -44px -36px -44px;
  z-index: 1;
  pointer-events: none;
  border-radius: 20px;
  overflow: hidden;
  transform: translateZ(-120px) scale(1.08);
  background: #FFFFFF;
  border: 1px solid rgba(0, 39, 110, 0.14);
  box-shadow:
    0 24px 64px rgba(0, 30, 80, 0.09),
    0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.csail-3d-backdrop__visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.csail-3d-backdrop__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.38;
  filter: saturate(1.15) contrast(1.08);
  transform: scale(1.04);
  transition: transform 0.8s ease, opacity 0.4s ease;
}

.csail-3d-cluster:hover .csail-3d-backdrop__img {
  transform: scale(1.08);
  opacity: 0.46;
}

.csail-3d-backdrop__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.90) 42%,
    rgba(255, 255, 255, 0.52) 68%,
    rgba(255, 255, 255, 0.20) 100%
  );
  pointer-events: none;
}

/* Subtle architectural grid lines on 3D backdrop */
.csail-3d-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 39, 110, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 39, 110, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* 3D Metadata HUD Tag */
.csail-3d-backdrop__hud {
  position: absolute;
  bottom: 12px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  z-index: 2;
  border-top: 1px solid rgba(0, 39, 110, 0.10);
  padding-top: 8px;
}

.csail-3d-backdrop__tag {
  font-weight: 700;
  color: var(--csail-orange);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.csail-3d-backdrop__tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--csail-orange);
  box-shadow: 0 0 8px var(--csail-orange);
}

.csail-3d-backdrop__meta {
  color: #64748B;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cluster-ai   { transform: translate(-50%, -50%) rotateY(0deg) translateZ(880px); }
#cluster-sec  { transform: translate(-50%, -50%) rotateY(-90deg) translateZ(880px); }
#cluster-iot  { transform: translate(-50%, -50%) rotateY(-180deg) translateZ(880px); }
#cluster-data { transform: translate(-50%, -50%) rotateY(-270deg) translateZ(880px); }

.csail-3d-cluster__grid {
  position: relative;
  z-index: 2;
  transform: translateZ(36px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.csail-3d-cluster__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #001B4D;
  margin-bottom: 12px;
}
.csail-3d-cluster__meta {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 16px;
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.csail-3d-cluster__meta a {
  color: #00276E;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 39, 110, 0.35);
}
.csail-3d-cluster__meta a:hover {
  color: var(--csail-orange);
  text-decoration-color: var(--csail-orange);
}
.csail-3d-cluster__lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1E293B;
  font-weight: 450;
  max-width: 52ch;
  margin-bottom: 26px;
}
.csail-3d-cluster__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.csail-3d-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.csail-3d-card {
  background: #FFFFFF;
  color: var(--text-head);
  border: 1px solid #E2E8F0;
  border-top: 4px solid #001B4D;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(0, 30, 80, 0.08);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.csail-3d-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(0, 30, 80, 0.15);
}
.csail-3d-card--accent { border-top-color: var(--csail-orange); }

.csail-3d-card__thumb {
  height: 140px;
  background: #EEF2F6;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.csail-3d-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: contrast(1.05) saturate(1.05);
  transition: transform .35s ease;
}
.csail-3d-card:hover .csail-3d-card__thumb img {
  transform: scale(1.06);
}

.csail-3d-card__body {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; flex: 1;
  background: #FFFFFF;
}
.csail-3d-card__tag {
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--csail-orange);
  margin-bottom: 6px;
}
.csail-3d-card__title {
  font-family: var(--font-sans);
  font-size: .95rem; font-weight: 600;
  line-height: 1.35; color: #001B4D;
  margin: 0;
}

.csail-3d-scope {
  grid-column: span 2;
  margin: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-top: 4px solid var(--csail-orange);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 30, 80, 0.08);
}
.csail-3d-scope .scope__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  color: #001B4D;
}
.csail-3d-scope .scope__stage {
  height: 135px;
  position: relative;
  background: #F8FAFC;
  background-image:
    linear-gradient(to right, rgba(0, 39, 110, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 39, 110, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.csail-3d-scope .scope__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.csail-3d-scope .scope__lanes {
  position: absolute; inset: 0; display: grid; grid-template-rows: repeat(4, 1fr); pointer-events: none; z-index: 1;
}
.csail-3d-scope .scope__lanes li {
  display: flex; align-items: center; padding-left: 10px; font-family: var(--font-mono); font-size: .66rem; font-weight: 600; color: #475569; border-top: 1px solid rgba(0, 39, 110, 0.08);
}
.csail-3d-scope .scope__lanes li:first-child { border-top: 0; }
.csail-3d-scope .scope__gate {
  position: absolute; top: 4px; left: 58%; transform: translateX(-50%); z-index: 2;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700; color: #FFFFFF; background: var(--csail-orange); padding: 2px 8px; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.3);
}
.csail-3d-scope .scope__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 14px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0; font-family: var(--font-mono); font-size: .72rem; color: #64748B;
}
.csail-3d-scope .scope__count { margin-left: auto; font-variant-numeric: tabular-nums; }
.csail-3d-scope .scope__count b { color: #001B4D; font-weight: 700; }
.csail-3d-scope .scope__pause {
  font-family: var(--font-mono); font-size: .68rem; color: #475569; background: #FFFFFF; border: 1px solid #CBD5E1; border-radius: var(--radius-md); padding: 2px 8px; cursor: pointer;
  transition: all 0.15s ease;
}
.csail-3d-scope .scope__pause:hover { border-color: var(--csail-orange); color: var(--csail-orange); }

.csail-3d-ctrl-top {
  position: absolute; top: 24px; right: clamp(20px, 4vw, 48px);
  z-index: 40; display: flex; align-items: center; gap: 10px;
}
.csail-3d-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: var(--text-head); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transition: all .18s ease;
}
.csail-3d-btn:hover { background: var(--csail-orange); border-color: var(--csail-orange); color: #FFFFFF; transform: scale(1.1); }
.csail-3d-btn:active { transform: scale(0.95); }

.csail-3d-foot {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 40;
  padding: 14px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}
.csail-3d-foot__in {
  max-width: var(--wrap); margin-inline: auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.csail-3d-prompt {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.csail-3d-prompt-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #F1F5F9; border: 1px solid #CBD5E1;
  color: var(--csail-orange);
}
.csail-3d-featured { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .75rem; }
.csail-3d-featured-tag {
  color: var(--csail-orange); border: 1px solid rgba(0, 82, 204, 0.35);
  background: rgba(0, 82, 204, 0.06);
  padding: 2px 7px; border-radius: var(--radius-md); font-weight: 700; letter-spacing: .08em;
}
.csail-3d-featured-text { color: var(--text-body); }
.csail-3d-indicators { display: flex; gap: 8px; align-items: center; }
.csail-3d-dot {
  width: 24px; height: 4px; background: #CBD5E1;
  border: none; padding: 0; cursor: pointer; border-radius: 2px; transition: all .2s ease;
}
.csail-3d-dot.is-active { background: var(--csail-orange); width: 44px; }

/* ═══════════════════════════════════════════
   SLIDE-OUT SECTIONS DRAWER & FLOATING TRIGGER BUTTON
═══════════════════════════════════════════ */
.side-sections-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px 14px;
  background: #FFFFFF;
  color: var(--text-head);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  box-shadow: -4px 8px 24px rgba(15, 23, 42, 0.12);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-sections-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--csail-orange);
  fill: none;
  display: block;
  transition: transform 0.2s ease;
}
.side-sections-btn:hover {
  background: var(--csail-orange);
  color: #FFFFFF;
  padding-right: 20px;
  box-shadow: -6px 10px 28px rgba(0, 82, 204, 0.28);
  transform: translateY(-50%) translateX(-4px);
}
.side-sections-btn:hover svg {
  stroke: #FFFFFF;
  transform: scale(1.1);
}
.side-sections-btn:focus-visible {
  outline: 2px solid var(--csail-orange);
  outline-offset: 2px;
}

/* Slide-out Backdrop */
.sections-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sections-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Slide-out Drawer Panel */
.sections-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  z-index: 1001;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sections-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.sections-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: #F8FAFC;
}
.sections-drawer__head h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-head);
  margin: 0;
  letter-spacing: -0.01em;
}
.sections-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.18s ease;
}
.sections-drawer__close:hover {
  background: var(--csail-orange);
  border-color: var(--csail-orange);
  color: #FFFFFF;
}

.sections-drawer__list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.sections-drawer__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 28px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  transition: background 0.18s ease, transform 0.18s ease;
}
.sections-drawer__item:hover {
  background: #F8FAFC;
  transform: translateX(4px);
}
.sections-drawer__num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--csail-orange);
  padding-top: 3px;
  min-width: 22px;
}
.sections-drawer__title {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-head);
  margin-bottom: 2px;
  transition: color 0.15s ease;
}
.sections-drawer__item:hover .sections-drawer__title {
  color: var(--csail-orange);
}
.sections-drawer__desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sections-drawer__foot {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: #F8FAFC;
}

/* ═══════════════════════════════════════════
   ALL OTHER SECTIONS: HARMONIZED CSAIL DESIGN SYSTEM (LIGHT MODE)
═══════════════════════════════════════════ */

/* Section Containers & Rhythms */
.section {
  padding: clamp(64px, 8vw, 108px) 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section:nth-of-type(odd)  { background: var(--bg-base); }
.section:nth-of-type(even) { background: #FFFFFF; }

.lead-block { max-width: 54em; margin-bottom: clamp(36px, 5vw, 56px); }
.lead-block h2 { color: var(--text-head); margin-bottom: 14px; }
.lead-block p  { font-size: 1.0625rem; color: var(--text-muted); line-height: 1.7; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7.5fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}
.split__head { position: sticky; top: 120px; }
.split__head h2 { color: var(--text-head); margin-bottom: 14px; }
.split__head > p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; }

/* CSAIL Outline Icons */
.ico {
  width: 44px; height: 44px;
  fill: none; stroke: var(--csail-orange);
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.ico .fill { fill: var(--csail-orange); stroke: none; }

/* ───────────────────────────────────────────
   1. EXPERTISES SECTION (#expertises)
   CSAIL 4-Pillar Grid with Signature 4px Top Rules
─────────────────────────────────────────── */
.expertises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.exp {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--black);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.exp:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}
.exp:nth-child(1) { border-top-color: var(--csail-orange); }
.exp:nth-child(2) { border-top-color: var(--signal-green); }
.exp:nth-child(3) { border-top-color: var(--signal-sky); }
.exp:nth-child(4) { border-top-color: var(--csail-gold); }

.exp__header {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.exp__tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); padding: 4px 8px; border-radius: 2px;
  background: #F1F5F9; border: 1px solid #E2E8F0;
}
.exp:nth-child(1) .exp__tag { color: var(--csail-orange); border-color: rgba(0, 82, 204, .35); }
.exp:nth-child(2) .exp__tag { color: var(--signal-green); border-color: rgba(4, 120, 87, .35); }
.exp:nth-child(3) .exp__tag { color: var(--signal-sky); border-color: rgba(2, 132, 199, .35); }
.exp:nth-child(4) .exp__tag { color: var(--csail-gold); border-color: rgba(180, 83, 9, .35); }

.exp h3 {
  color: var(--text-head); font-size: 1.25rem; font-weight: 600;
  margin: 6px 0 0;
}
.exp p {
  color: var(--text-body); font-size: .95rem; line-height: 1.65;
}
.exp__meta {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--text-muted);
}
.exp__meta span {
  display: inline-flex; align-items: center; gap: 5px;
}
.exp__meta span::before {
  content: "▪"; color: var(--csail-orange); font-size: .65rem;
}
.exp:nth-child(2) .exp__meta span::before { color: var(--signal-green); }
.exp:nth-child(3) .exp__meta span::before { color: var(--signal-sky); }
.exp:nth-child(4) .exp__meta span::before { color: var(--csail-gold); }

/* ───────────────────────────────────────────
   2. INFRASTRUCTURE (#infrastructure)
   Modern Enterprise Architecture Diagram
─────────────────────────────────────────── */
.infra-arch {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 30, 80, 0.05);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3.5vw, 44px);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.infra-arch.in {
  opacity: 1;
  transform: none;
}
.infra-arch__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 39, 110, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 39, 110, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.infra-arch__stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(60px, 0.55fr) auto minmax(60px, 0.55fr) minmax(210px, 1fr);
  align-items: center;
  gap: 8px;
}

.infra-arch__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.infra-arch__col-header {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--logo-navy);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.infra-arch__col-header::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--csail-orange);
}
.infra-arch__col--out .infra-arch__col-header::before {
  background: var(--signal-green);
}

/* Sleek Card Tiles */
.infra-arch__tile {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(0, 30, 80, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.infra-arch__tile:hover {
  border-color: var(--csail-orange);
  box-shadow: 0 6px 18px rgba(0, 82, 204, 0.12);
  transform: translateY(-2px);
}
.infra-arch__tile-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  color: var(--csail-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.infra-arch__tile-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.infra-arch__tile:hover .infra-arch__tile-icon {
  background: var(--csail-orange);
  border-color: var(--csail-orange);
  color: #FFFFFF;
}

.infra-arch__tile--out .infra-arch__tile-icon {
  background: #F0FDF4;
  border-color: #DCFCE7;
  color: var(--signal-green);
}
.infra-arch__tile--out:hover {
  border-color: var(--signal-green);
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.12);
}
.infra-arch__tile--out:hover .infra-arch__tile-icon {
  background: var(--signal-green);
  border-color: var(--signal-green);
  color: #FFFFFF;
}

.infra-arch__tile-text {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: #001B4D;
  line-height: 1.35;
}

/* Connectors */
.infra-arch__connectors {
  width: 100%;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.infra-arch__connectors svg {
  width: 100%;
  height: 100%;
  display: block;
}
.infra-arch__path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
  opacity: 0.9;
}
.infra-arch__path:hover {
  stroke-width: 3.5;
  opacity: 1;
}

/* Center Hub — Light Mode Modern AI Focus */
.infra-arch__hub-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
}
.infra-arch__hub-ring-outer {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 82, 204, 0.22);
  pointer-events: none;
  animation: pulseHubRing 3.5s ease-in-out infinite;
}
@keyframes pulseHubRing {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; border-color: rgba(0, 132, 209, 0.45); }
}
.infra-arch__hub-ring-mid {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 132, 209, 0.38);
  pointer-events: none;
  animation: spinSlow 36s linear infinite;
}

.infra-arch__hub-core {
  width: 166px;
  height: 166px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFFFFF 0%, #F0F7FF 100%);
  border: 2px solid var(--csail-orange);
  box-shadow: 0 12px 36px rgba(0, 82, 204, 0.16), 0 2px 6px rgba(0, 39, 110, 0.04), inset 0 2px 6px #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: #001B4D;
  position: relative;
  z-index: 2;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.infra-arch__hub-core:hover {
  transform: scale(1.04);
  border-color: #00276E;
  box-shadow: 0 18px 46px rgba(0, 82, 204, 0.24);
}
.infra-arch__hub-emblem {
  width: 46px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 10px rgba(0, 82, 204, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.infra-arch__hub-core:hover .infra-arch__hub-emblem {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 6px 14px rgba(0, 82, 204, 0.35));
}
.infra-arch__hub-title {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #001B4D;
  line-height: 1.15;
}
.infra-arch__hub-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 3px;
  max-width: 122px;
}

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

@media (max-width: 900px) {
  .infra-arch__stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .infra-arch__connectors {
    display: none;
  }
  .infra-arch__hub-wrap {
    margin: 8px auto;
  }
}

.trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.trio > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform .2s ease, border-color .2s ease;
}
.trio > div:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.trio > div:nth-child(1) { border-top-color: var(--csail-orange); }
.trio > div:nth-child(2) { border-top-color: var(--csail-gold); }
.trio > div:nth-child(3) { border-top-color: var(--signal-green); }
.trio__tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.trio > div:nth-child(1) .trio__tag { color: var(--csail-orange); }
.trio > div:nth-child(2) .trio__tag { color: var(--csail-gold); }
.trio > div:nth-child(3) .trio__tag { color: var(--signal-green); }
.trio dt {
  font-family: var(--font-mono);
  font-size: .95rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-head);
}
.trio dd { margin: 8px 0 0; font-size: .92rem; color: var(--text-body); line-height: 1.6; }

/* ───────────────────────────────────────────
   3. PUBLICATIONS SECTION (#publications)
   Academic Publishing Strategy & Step Tracker
─────────────────────────────────────────── */
.venues { display: grid; gap: 14px; margin-top: 28px; }
.venue {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--csail-orange);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.venue + .venue { border-left-color: var(--csail-gold); }
.venue__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--csail-orange); margin-bottom: 8px;
}
.venue:last-child .venue__tag { color: var(--csail-gold); }
.venue h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-head); }
.venue p  { margin-top: 6px; font-size: .92rem; color: var(--text-body); line-height: 1.6; }

.steps {
  counter-reset: step;
  display: grid; gap: 12px;
}
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 18px; padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s, transform .4s, border-color .2s;
}
.steps li:hover { border-color: #CBD5E1; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 3;
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700;
  line-height: 1; color: var(--csail-orange);
  font-variant-numeric: tabular-nums;
  align-self: center;
}
.step__phase {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--csail-gold); display: block; margin-bottom: 2px;
}
.steps h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-head); }
.steps p  { font-size: .9rem; color: var(--text-body); line-height: 1.55; }
.steps.in li { opacity: 1; transform: none; }
.steps.in li:nth-child(2) { transition-delay: .07s; }
.steps.in li:nth-child(3) { transition-delay: .14s; }
.steps.in li:nth-child(4) { transition-delay: .21s; }
.steps.in li:nth-child(5) { transition-delay: .28s; }
.steps.in li:nth-child(6) { transition-delay: .35s; }

/* ───────────────────────────────────────────
   4. DOMAINES / SECTORS (#domaines)
   6-Card Sector Grid with Top 4px Rules
─────────────────────────────────────────── */
.domains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.domain {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--black);
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.domain:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}
.domain:nth-child(1) { border-top-color: var(--csail-orange); }
.domain:nth-child(2) { border-top-color: var(--signal-sky); }
.domain:nth-child(3) { border-top-color: var(--signal-green); }
.domain:nth-child(4) { border-top-color: var(--csail-gold); }
.domain:nth-child(5) { border-top-color: var(--csail-orange); }
.domain:nth-child(6) { border-top-color: var(--signal-sky); }

.domain__header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 4px;
}
.domain__tag {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); padding: 3px 7px; border-radius: 2px;
  background: #F1F5F9; border: 1px solid #E2E8F0;
}
.domain:nth-child(1) .domain__tag { color: var(--csail-orange); border-color: rgba(0, 82, 204, .3); }
.domain:nth-child(2) .domain__tag { color: var(--signal-sky); border-color: rgba(2, 132, 199, .3); }
.domain:nth-child(3) .domain__tag { color: var(--signal-green); border-color: rgba(4, 120, 87, .3); }
.domain:nth-child(4) .domain__tag { color: var(--csail-gold); border-color: rgba(180, 83, 9, .3); }
.domain:nth-child(5) .domain__tag { color: var(--csail-orange); border-color: rgba(0, 82, 204, .3); }
.domain:nth-child(6) .domain__tag { color: var(--signal-sky); border-color: rgba(2, 132, 199, .3); }

.domain h3 {
  margin: 12px 0 14px; font-size: 1.15rem; font-weight: 600; color: var(--text-head);
}
.domain li {
  position: relative; padding: 7px 0 7px 18px;
  font-size: .9rem; color: var(--text-body); line-height: 1.5;
}
.domain li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 8px; height: 1.5px; background: var(--csail-orange);
}

/* ───────────────────────────────────────────
   5. COLLABORATION (#collaboration)
   Academic ↔ Industry Bridge Architecture
─────────────────────────────────────────── */
.bridge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  align-items: center; gap: 24px;
}
.bridge__side {
  padding: 34px 36px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--csail-gold);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}
.bridge__side:last-child {
  border-top-color: var(--csail-orange);
  background: #FAFCFE;
}
.bridge__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--csail-gold); margin-bottom: 10px;
}
.bridge__side:last-child .bridge__tag { color: var(--csail-orange); }
.bridge__side h3  { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; color: var(--text-head); }
.bridge__side li  { padding: 11px 0; border-top: 1px solid var(--border); font-size: .95rem; color: var(--text-body); }
.bridge__side li:first-child { border-top: none; padding-top: 0; }
.bridge__mid svg  {
  width: 100%; fill: none; stroke: var(--csail-orange);
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  opacity: .85;
}

/* ───────────────────────────────────────────
   6. CLIENTS / REFERENCES (#confiance)
   Institutional Client Badges with Sector Tags
─────────────────────────────────────────── */
.trust__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.trust__list li {
  display: grid; grid-template-rows: 130px auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.trust__list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.trust__list li:nth-child(1) { border-top-color: var(--signal-green); }
.trust__list li:nth-child(2) { border-top-color: var(--csail-gold); }
.trust__list li:nth-child(3) { border-top-color: var(--signal-sky); }
.trust__list li:nth-child(4) { border-top-color: var(--csail-orange); }

.trust__logo {
  display: flex; align-items: center; justify-content: center;
  padding: 20px 24px;
  background: #FFFFFF;
}
.trust__logo img { max-height: 84px; width: auto; max-width: 100%; object-fit: contain; }
.trust__list p {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--border);
  font-size: .88rem; line-height: 1.5; color: var(--text-body);
}
.trust__tag {
  display: block; font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 4px;
}
.trust__list li:nth-child(1) .trust__tag { color: var(--signal-green); }
.trust__list li:nth-child(2) .trust__tag { color: var(--csail-gold); }
.trust__list li:nth-child(3) .trust__tag { color: var(--signal-sky); }
.trust__list li:nth-child(4) .trust__tag { color: var(--csail-orange); }
.trust__list strong {
  display: block; color: var(--text-head);
  font-size: .95rem; font-weight: 600; margin-bottom: 3px;
}

/* ───────────────────────────────────────────
   7. CONSULTATION (#consultation)
   Technical Intake Form & Session Details
─────────────────────────────────────────── */
.consult__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6.5fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: start;
}
.consult__text > p { margin-top: 16px; font-size: 1.05rem; color: var(--text-muted); }

.formules {
  margin-top: 28px;
  border-top: 1px solid var(--border);
}
.formules li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.formules strong { color: var(--text-head); font-size: 1.05rem; font-weight: 600; }
.formules span   {
  font-family: var(--font-mono); font-size: .85rem; font-weight: 700;
  color: var(--csail-gold); font-variant-numeric: tabular-nums;
}

.consult__by {
  margin-top: 32px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 16px;
}
.consult__by img {
  height: 64px; width: auto;
  background: #FFFFFF; padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.consult__by p { font-size: .88rem; color: var(--text-muted); max-width: 20em; }

/* Direct Consultation Booking Card */
.consult__direct-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-top: 4px solid var(--csail-orange);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 12px 36px rgba(0, 30, 80, 0.07);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.consult__direct-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--csail-orange);
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  padding: 3px 10px;
  border-radius: 20px;
}
.consult__direct-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 700;
  color: #001B4D;
  margin: 0;
  line-height: 1.25;
}
.consult__direct-card p {
  font-size: 0.94rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}
.consult__direct-perks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0;
  padding: 0;
  list-style: none;
}
.consult__direct-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 500;
}
.consult__perk-icon {
  width: 18px;
  height: 18px;
  color: var(--signal-green);
  flex-shrink: 0;
}
.btn--large {
  min-height: 52px;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 82, 204, 0.25);
}
.consult__direct-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.consult__direct-meta a {
  color: var(--csail-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ═══════════════════════════════════════════
   FOOTER (RESEARCH & DR. ET-TOUSY PROFILES)
═══════════════════════════════════════════ */
.foot {
  background: #F8FAFC;
  border-top: 1px solid var(--border);
  padding: 64px 0 36px;
  color: var(--text-muted);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1.05fr 1fr 1fr;
  gap: clamp(24px, 3.5vw, 44px);
  align-items: start;
}
.foot__col--brand { max-width: 360px; }
.foot__logo { height: 40px; width: auto; margin-bottom: 14px; }
.foot__desc { font-size: .88rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 16px; }

.foot__director {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(0, 39, 110, 0.04);
}
.foot__director-img { height: 32px; width: auto; flex-shrink: 0; }
.foot__director-bio { font-size: .78rem; line-height: 1.35; color: var(--text-body); margin: 0; }
.foot__director-bio strong { color: var(--logo-navy); font-weight: 700; }

.foot__title {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--logo-navy);
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 82, 204, 0.15);
}
.foot__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot__link-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-body);
  text-decoration: none;
  font-size: .86rem;
  transition: all .18s ease;
}
.foot__link-icon:hover {
  color: var(--csail-orange);
  transform: translateX(3px);
}
.foot__icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--csail-orange);
}
.foot__link-icon:hover .foot__icon {
  color: var(--csail-orange-h);
}

.foot__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN (SYSTEM-WIDE AUDIT & POLISH)
═══════════════════════════════════════════ */

/* ── 1. Tablet Landscape & Small Laptops (max-width: 1024px) ── */
@media (max-width: 1024px) {
  .csail-3d-cluster__grid {
    gap: clamp(24px, 3.5vw, 40px);
  }
  .split {
    gap: clamp(28px, 4vw, 48px);
  }
  .domains {
    gap: 16px;
  }
}

/* ── 2. Small Tablets & Phablets (max-width: 960px) ── */
@media (max-width: 960px) {
  /* Navigation */
  .nav__tier-top { display: none; }
  .nav__toggle { display: flex; }
  .lang { order: 0; margin-left: auto; }
  .nav__menu {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(0, 30, 80, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    order: unset;
    margin-left: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav__menu a:not(.btn):hover { border-bottom-color: var(--csail-orange); }
  .nav__menu .btn { margin-top: 14px; align-self: flex-start; }

  /* 3D Hero on Tablet / Mobile */
  .csail-3d-hero {
    height: clamp(680px, 90vh, 880px);
    touch-action: pan-y;
  }
  .csail-3d-cluster {
    width: min(94vw, 760px);
  }
  .csail-3d-cluster__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .csail-3d-cluster__title {
    font-size: clamp(2rem, 5.2vw, 2.8rem);
    margin-bottom: 8px;
  }
  .csail-3d-cluster__meta {
    font-size: 0.8rem;
    margin-bottom: 10px;
    gap: 4px 10px;
  }
  .csail-3d-cluster__lead {
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 100%;
  }
  .csail-3d-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .csail-3d-card__thumb {
    height: 110px;
  }
  .csail-3d-card__body {
    padding: 10px 12px;
  }
  .csail-3d-card__title {
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .csail-3d-scope {
    grid-column: span 2;
  }
  .csail-3d-scope .scope__stage {
    height: 110px;
  }
  .csail-3d-backdrop {
    inset: -20px -20px;
    border-radius: 16px;
    transform: translateZ(-30px) scale(1.02);
  }
  .csail-3d-backdrop__hud { display: none; }
  .csail-3d-floor { display: none; }

  /* Architecture Diagram */
  .infra-arch__stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .infra-arch__connectors {
    display: none;
  }
  .infra-arch__hub-wrap {
    margin: 10px auto;
    position: relative;
  }
  .infra-arch__hub-wrap::before,
  .infra-arch__hub-wrap::after {
    content: "↓";
    display: block;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--csail-orange);
    text-align: center;
    margin: 4px auto;
  }

  /* Grid Layouts */
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .split__head {
    position: static;
    margin-bottom: 8px;
  }
  .venues {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
  }
  .trio {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .domains,
  .trust__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .bridge {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .bridge__mid {
    width: 60px;
    margin: 0 auto;
    transform: rotate(90deg);
  }
  .consult__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

/* ── 3. Mobile Screens (max-width: 640px) ── */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .section { padding: clamp(48px, 9vw, 68px) 0; }

  /* Navbar */
  .nav__main {
    min-height: 60px;
    gap: 12px;
  }
  .nav__brand { gap: 10px; }
  .nav__brand img { height: 34px; }
  .nav__brand-tag { display: none; }
  .nav__toggle {
    width: 44px;
    height: 44px;
  }

  /* 3D Hero */
  .csail-3d-hero {
    height: clamp(660px, 92vh, 800px);
    cursor: default;
  }
  .csail-3d-ctrl-top {
    top: 12px;
    right: 12px;
    gap: 8px;
  }
  .csail-3d-btn {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }
  .csail-3d-foot {
    padding: 8px 16px;
  }
  .csail-3d-featured {
    display: none;
  }
  .csail-3d-prompt {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }

  /* Cluster Typography & Cards */
  .csail-3d-cluster {
    width: min(94vw, 480px);
  }
  .csail-3d-cluster__title {
    font-size: clamp(1.75rem, 6.2vw, 2.25rem);
    margin-bottom: 6px;
  }
  .csail-3d-cluster__meta {
    font-size: 0.74rem;
    gap: 4px 8px;
    margin-bottom: 8px;
  }
  .csail-3d-cluster__lead {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }
  .csail-3d-cluster__ctas {
    gap: 8px;
  }
  .csail-3d-cluster__ctas .btn {
    padding: 0 14px;
    min-height: 38px;
    font-size: 0.8rem;
  }
  .csail-3d-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .csail-3d-card__thumb {
    height: 80px;
  }
  .csail-3d-card__body {
    padding: 8px 10px;
  }
  .csail-3d-card__tag {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }
  .csail-3d-card__title {
    font-size: 0.74rem;
    line-height: 1.3;
  }
  .csail-3d-scope .scope__stage {
    height: 90px;
  }
  .csail-3d-scope .scope__head {
    padding: 5px 10px;
    font-size: 0.66rem;
  }
  .csail-3d-scope .scope__foot {
    padding: 5px 10px;
    font-size: 0.66rem;
    gap: 4px 8px;
  }
  .csail-3d-scope .scope__lanes li {
    font-size: 0.58rem;
    padding-left: 6px;
  }
  .csail-3d-scope .scope__gate {
    font-size: 0.6rem;
    padding: 1px 6px;
  }

  /* Expertises */
  .expertises {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .exp {
    padding: 22px 18px;
  }

  /* Infrastructure Architecture Card */
  .infra-arch {
    padding: 20px 16px;
    border-radius: 10px;
  }
  .infra-arch__tile {
    padding: 10px 12px;
    gap: 10px;
  }
  .infra-arch__tile-icon {
    width: 32px;
    height: 32px;
  }
  .infra-arch__tile-icon svg {
    width: 16px;
    height: 16px;
  }
  .infra-arch__tile-text {
    font-size: 0.88rem;
  }
  .infra-arch__hub-core {
    width: 150px;
    height: 150px;
    padding: 10px;
  }
  .infra-arch__hub-emblem {
    width: 40px;
    height: 50px;
  }
  .infra-arch__hub-title {
    font-size: 1.02rem;
  }
  .infra-arch__hub-sub {
    font-size: 0.64rem;
  }
  .infra-arch__hub-ring-outer {
    width: 184px;
    height: 184px;
  }
  .infra-arch__hub-ring-mid {
    width: 166px;
    height: 166px;
  }

  /* Venues & Steps */
  .venues {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .venue {
    padding: 16px 18px;
  }
  .steps li {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .steps li::before {
    font-size: 1.35rem;
  }

  /* Domains & Trust */
  .domains {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .domain {
    padding: 22px 18px;
  }
  .bridge__side {
    padding: 24px 18px;
  }
  .trust__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .trust__logo {
    padding: 16px 20px;
  }
  .trust__logo img {
    max-height: 64px;
  }

  /* Consultation Card */
  .consult__direct-card {
    padding: 20px 18px;
    gap: 14px;
  }
  .consult__direct-card h3 {
    font-size: 1.25rem;
  }
  .consult__direct-perks li {
    font-size: 0.82rem;
    gap: 8px;
  }
  .consult__direct-meta {
    font-size: 0.74rem;
    gap: 6px;
  }

  /* Footer */
  .foot {
    padding: 48px 0 24px;
  }
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .foot__legal {
    margin-top: 32px;
    padding-top: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.74rem;
  }
  .side-sections-btn { display: none; }
}

/* ── 4. Ultra-Compact Mobile (max-width: 400px) ── */
@media (max-width: 400px) {
  .wrap { width: calc(100% - 24px); }
  .csail-3d-cards {
    grid-template-columns: 1fr;
  }
  .csail-3d-scope {
    grid-column: span 1;
  }
  .csail-3d-cluster__title {
    font-size: 1.6rem;
  }
  .csail-3d-cluster__ctas .btn {
    width: 100%;
  }
  .csail-3d-hero {
    height: clamp(660px, 94vh, 820px);
  }
}

@keyframes dashv { to { background-position: 0 14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .csail-3d-world { transition: none !important; }
  .infra-arch, .flow__col li, .steps li { opacity: 1 !important; transform: none !important; }
}
