/* =========================================================
   SITE V4 — Industrial Portfolio
   Hybrid: dark cinematic hero + light technical content
   ========================================================= */

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

:root {
  /* Light theme (default) */
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-2: #f1f3f7;
  --panel-3: #e8ecf2;
  --border: #dfe3eb;
  --border-hi: #c6cdd9;
  --ink: #0b1220;
  --ink-dim: #4e5868;
  --ink-mute: #8a93a3;

  --accent: #0e7490;       /* deep teal */
  --accent-hi: #0891b2;
  --accent-soft: #cffafe;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --green: #15803d;
  --green-soft: #dcfce7;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark section overrides */
.dark {
  --bg: #08101f;
  --panel: #0d182d;
  --panel-2: #13213c;
  --panel-3: #1a2b4a;
  --border: #1f2f4d;
  --border-hi: #2e4370;
  --ink: #e7ecf5;
  --ink-dim: #8e9cb5;
  --ink-mute: #5a6780;

  --accent: #5eead4;
  --accent-hi: #99f6e4;
  --accent-soft: rgba(94,234,212,.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251,191,36,.12);
  --red: #f87171;
  --red-soft: rgba(248,113,113,.14);
  --green: #4ade80;
  --green-soft: rgba(74,222,128,.12);

  background: var(--bg);
  color: var(--ink);
}

html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Typography ---------- */
.mono { font-family: var(--mono); }
h1, .h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
h2, .h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.25; }
h3, .h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.micro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--ink-dim);
}

/* ---------- TOP BAR ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: #08101f;
  color: #e7ecf5;
  border-bottom: 1px solid #1f2f4d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  font-family: var(--mono);
  font-size: 11px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 22px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff;
}
.brand-mark {
  width: 20px; height: 20px;
  border: 1px solid #5eead4;
  position: relative;
  display: inline-block;
}
.brand-mark::before, .brand-mark::after {
  content: ''; position: absolute; background: #5eead4;
}
.brand-mark::before { top: 50%; left: 2px; right: 2px; height: 1px; transform: translateY(-50%); }
.brand-mark::after { left: 50%; top: 2px; bottom: 2px; width: 1px; transform: translateX(-50%); }
.topbar-nav { display: flex; gap: 20px; }
.topbar-nav a {
  color: #8e9cb5; font-weight: 500; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 0; position: relative;
  transition: color .15s;
}
.topbar-nav a:hover { color: #fff; }
.topbar-nav a.active { color: #5eead4; }
.topbar-nav a.active::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: -18px; height: 2px; background: #5eead4;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #8e9cb5;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; display: inline-block;
  box-shadow: 0 0 0 0 rgba(74,222,128,.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ---------- SIDE NAV ---------- */
.sidebar {
  position: fixed;
  top: 52px; left: 0; bottom: 0;
  width: 220px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  z-index: 80;
  display: flex; flex-direction: column;
}
.side-id {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.side-id-code {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-mute); text-transform: uppercase;
}
.side-id-name { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.side-id-role { font-size: 11px; color: var(--ink-dim); margin-top: 2px; font-family: var(--mono); }

.sidenav { display: flex; flex-direction: column; gap: 1px; padding: 0 10px; }
.sidenav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  font-size: 12px; font-weight: 500;
  color: var(--ink-dim);
  border-left: 2px solid transparent;
  transition: all .12s;
}
.sidenav a .num {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  width: 20px;
}
.sidenav a:hover { background: var(--panel-2); color: var(--ink); }
.sidenav a.active {
  background: var(--panel-2);
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 600;
}
.sidenav a.active .num { color: var(--accent); }

.side-footer { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid var(--border); }
.side-cta {
  display: block; text-align: center;
  padding: 10px 12px; background: #08101f; color: #5eead4;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600;
  border: 1px solid #1f2f4d;
  transition: all .15s;
}
.side-cta:hover { background: #5eead4; color: #08101f; border-color: #5eead4; }

/* ---------- MAIN ---------- */
.main {
  margin-left: 220px; margin-top: 52px;
  min-height: calc(100vh - 52px);
}
.section { padding: 56px 48px; }
.section-sm { padding: 32px 48px; }
.container { max-width: 1240px; margin: 0 auto; }

/* ---------- DARK HERO ---------- */
.hero {
  background: #08101f;
  color: #e7ecf5;
  padding: 72px 48px 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #1f2f4d;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(94,234,212,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.hero::after {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(94,234,212,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-meta {
  display: flex; gap: 24px; align-items: center;
  margin-bottom: 32px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-meta .mk {
  display: inline-flex; align-items: center; gap: 8px;
  color: #8e9cb5;
}
.hero-meta .mk strong { color: #5eead4; font-weight: 500; }
.hero-title {
  font-size: 56px; font-weight: 600;
  letter-spacing: -0.035em; line-height: 1.02;
  max-width: 860px; color: #fff;
}
.hero-title .accent { color: #5eead4; font-style: italic; font-weight: 400; }
.hero-sub {
  margin-top: 24px; max-width: 720px;
  font-size: 15px; line-height: 1.7; color: #8e9cb5;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 48px;
  border: 1px solid #1f2f4d;
  border-right: none;
}
.hero-stat {
  padding: 20px 24px;
  border-right: 1px solid #1f2f4d;
  position: relative;
}
.hero-stat-num {
  font-size: 28px; font-weight: 600; color: #fff;
  font-family: var(--mono); letter-spacing: -0.02em;
}
.hero-stat-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #5a6780; margin-top: 4px;
}
.hero-cta { display: flex; gap: 14px; margin-top: 36px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-family: var(--mono); font-size: 11px;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid; transition: all .15s;
}
.btn-primary { background: #5eead4; color: #08101f; border-color: #5eead4; }
.btn-primary:hover { background: #99f6e4; border-color: #99f6e4; color: #08101f; }
.btn-ghost { background: transparent; color: #fff; border-color: #2e4370; }
.btn-ghost:hover { border-color: #5eead4; color: #5eead4; }
.btn-arrow::after { content: '→'; font-family: var(--sans); font-size: 14px; }

.btn-light-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-light-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-light-ghost { background: transparent; color: var(--ink); border-color: var(--border-hi); }
.btn-light-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- LIGHT SECTION HEADERS ---------- */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; gap: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.sec-head-left { display: flex; gap: 18px; align-items: baseline; }
.sec-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-mute);
}
.sec-head h2 { font-size: 26px; }
.sec-count {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.1em;
}

/* ---------- PANELS / CARDS ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  position: relative;
}
.panel::before, .panel::after,
.panel-corners::before, .panel-corners::after {
  content: ''; position: absolute;
  width: 8px; height: 8px;
  border-color: var(--ink);
  pointer-events: none;
}
.panel-corners::before {
  top: -1px; left: -1px;
  border-top: 1px solid; border-left: 1px solid;
}
.panel-corners::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid; border-right: 1px solid;
}
.panel-body { padding: 24px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.panel-head h3 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--mono); color: var(--ink-dim); }
.panel-head .tag {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 8px; border: 1px solid var(--border);
  color: var(--ink-dim); letter-spacing: 0.1em;
}

/* Skills cards grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.skill-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  transition: all .18s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14,116,144,.08); }
.skill-card .num {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--ink-mute);
  position: absolute; top: 16px; right: 20px;
}
.skill-card h3 { margin-top: 28px; font-size: 17px; font-weight: 600; }
.skill-card p { font-size: 13px; color: var(--ink-dim); margin-top: 8px; line-height: 1.6; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 4px 9px; background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--ink-dim);
}

/* ---------- DATA TABLE ---------- */
.dtable {
  width: 100%; border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
}
.dtable th, .dtable td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.dtable th {
  background: var(--panel-2);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable tbody tr:hover { background: var(--panel-2); }
.dtable .c-id { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }

/* status dot */
.sdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; }
.sdot.ok { background: var(--green); }
.sdot.warn { background: var(--amber); }
.sdot.crit { background: var(--red); }

/* ---------- JOURNAL CARDS ---------- */
.log-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.log-filters { position: sticky; top: 72px; align-self: start; }
.filter-block { padding: 20px 0; border-top: 1px solid var(--border); }
.filter-block:first-child { border-top: none; padding-top: 0; }
.filter-block h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-mute); text-transform: uppercase; margin-bottom: 12px; }
.filter-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; color: var(--ink-dim); cursor: pointer;
}
.filter-opt input { accent-color: var(--accent); }
.filter-opt:hover { color: var(--ink); }

.log-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px 26px;
  margin-bottom: 14px;
  position: relative;
  transition: all .15s;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.log-card:hover { border-color: var(--border-hi); }
.log-card .detail-link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.log-card:hover .detail-link { color: var(--accent-hi); }
.log-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  opacity: .3;
}
.log-card.crit::before { background: var(--red); }
.log-card.warn::before { background: var(--amber); }
.log-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px; gap: 12px;
}
.log-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.log-meta .sep { width: 3px; height: 3px; background: var(--ink-mute); border-radius: 50%; }
.log-type {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 4px 10px;
  border: 1px solid;
}
.log-type.crit { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.log-type.warn { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.log-type.ok { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.log-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.005em; }
.log-card p { font-size: 13px; color: var(--ink-dim); line-height: 1.65; margin-bottom: 14px; }
.log-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.log-foot a {
  font-weight: 600; color: var(--accent); letter-spacing: 0.14em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px;
}
.log-foot a:hover { color: var(--accent-hi); }

/* ---------- INTERVENTION DETAIL ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-dim);
  padding: 8px 14px; border: 1px solid var(--border);
  background: var(--panel);
  margin-bottom: 24px;
}
.back-link:hover { border-color: var(--accent); color: var(--accent); }

.int-hero {
  background: #08101f; color: #e7ecf5;
  padding: 56px 48px 52px;
  border-bottom: 1px solid #1f2f4d;
  position: relative; overflow: hidden;
}
.int-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(94,234,212,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at top left, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top left, black 0%, transparent 75%);
}
.int-hero .container { position: relative; }
.int-type-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #5eead4;
  padding: 6px 12px; border: 1px solid #1f2f4d; background: rgba(94,234,212,.06);
  margin-bottom: 20px;
}
.int-type-badge.crit { color: #f87171; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.08); }
.int-type-badge.warn { color: #fbbf24; border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.int-hero h1 { font-size: 40px; color: #fff; letter-spacing: -0.025em; line-height: 1.08; max-width: 900px; }
.int-hero-meta {
  display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: #8e9cb5; text-transform: uppercase;
}
.int-hero-meta strong { color: #fff; font-weight: 500; margin-left: 6px; }

.int-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }

.ipanel {
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.ipanel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.ipanel-head .mk {
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-hi);
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
}
.ipanel-head h3 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-family: var(--mono); }
.ipanel-head.crit { background: var(--red-soft); }
.ipanel-head.crit h3 { color: var(--red); }
.ipanel-head.crit .mk { border-color: var(--red); color: var(--red); }
.ipanel-head.ok { background: var(--accent-soft); }
.ipanel-head.ok h3 { color: var(--accent); }
.ipanel-head.ok .mk { border-color: var(--accent); color: var(--accent); }
.ipanel-body { padding: 22px; font-size: 13px; line-height: 1.75; color: var(--ink-dim); }
.ipanel-body p { margin-bottom: 12px; }
.ipanel-body strong { color: var(--ink); font-weight: 600; }

.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.step:last-child { border-bottom: none; padding-bottom: 0; }
.step:first-child { padding-top: 0; }
.step-num {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.1em;
}
.step-body { font-size: 13px; color: var(--ink); line-height: 1.7; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.metric {
  padding: 18px 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  text-align: center;
  position: relative;
}
.metric::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
}
.metric-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.metric-value { font-size: 24px; font-weight: 600; color: var(--ink); margin-top: 6px; letter-spacing: -0.02em; }

/* Side info panel */
.ispec {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 18px;
  position: sticky;
}
.ispec h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-mute);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ispec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 12px; gap: 10px;
}
.ispec-row + .ispec-row { border-top: 1px solid var(--border); }
.ispec-label { color: var(--ink-dim); }
.ispec-val { font-family: var(--mono); color: var(--ink); font-weight: 500; text-align: right; }
.ispec-val.crit { color: var(--red); }

.ipart {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 12px;
}
.ipart-mk {
  width: 24px; height: 24px;
  border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
}
.ipart-name { color: var(--ink); font-weight: 500; }
.ipart-ref { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); margin-top: 2px; letter-spacing: 0.04em; }

.itools { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 360px 1fr; gap: 36px; }
.contact-rows { display: flex; flex-direction: column; gap: 8px; }
.crow {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
}
.crow .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); width: 80px; }
.crow .v { color: var(--ink); font-weight: 500; font-family: var(--mono); font-size: 12px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fg { margin-bottom: 18px; }
.fg label {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px;
}
.fg input, .fg select, .fg textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--sans); font-size: 13px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink);
  transition: border-color .15s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- FOOTER ---------- */
.footer {
  margin-left: 220px;
  padding: 22px 48px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-mute); text-transform: uppercase; }
.footer-links a:hover { color: var(--ink); }

/* ---------- UTILITIES ---------- */
.divider { height: 1px; background: var(--border); margin: 32px 0; }
.hline {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.hline .bar { flex: 1; height: 1px; background: var(--border); }
.hline .mk {
  width: 6px; height: 6px; background: var(--ink);
}

/* ---------- IMAGERY ---------- */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 32px;
}
.hero-col { min-width: 0; }
.hero-img {
  position: relative;
  aspect-ratio: 4/3;
  background: #0f1a2e;
  border: 1px solid #1f2f4d;
  overflow: hidden;
}
.hero-img img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(0.88);
}
.hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(8,16,31,.25) 0%, transparent 35%),
    linear-gradient(0deg, rgba(8,16,31,.35) 0%, transparent 40%);
  pointer-events: none;
}
.hero-img-corner {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #5eead4;
  padding: 5px 10px;
  background: rgba(8,16,31,.75);
  border: 1px solid rgba(94,234,212,.3);
  z-index: 2;
}
.hero-img-bl {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; color: rgba(255,255,255,.7);
  z-index: 2;
}

/* Intervention cover image */
.int-cover {
  position: relative;
  background: #08101f;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.int-cover img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9) brightness(0.92);
}
.int-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,16,31,.35) 0%, transparent 30%, transparent 70%, rgba(8,16,31,.65) 100%);
  pointer-events: none;
}
.int-cover-meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
  z-index: 2;
}
.int-cover-meta .tag-mini {
  padding: 4px 10px;
  border: 1px solid rgba(94,234,212,.4);
  color: #5eead4;
  background: rgba(8,16,31,.6);
}

/* Inline technical figures inside intervention articles */
.tech-figs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.tech-fig {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.tech-fig img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: contrast(1.03) saturate(0.92);
}
.tech-fig figcaption {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tech-fig .fig-tag {
  align-self: flex-start;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Filter helpers */
.filter-reset {
  margin-top: 18px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .12s;
}
.filter-reset:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--panel);
}
.filter-count {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border-left: 2px solid var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.log-card.hidden { display: none; }
.log-empty {
  display: none;
  padding: 48px 22px;
  border: 1px dashed var(--border);
  background: var(--panel);
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.log-empty.show { display: block; }

/* Log card thumbnail (journal) */
.log-card { display: grid; grid-template-columns: 180px 1fr; gap: 0; padding: 0; }
.log-thumb {
  position: relative;
  background: #0f1a2e;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.log-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) saturate(0.88);
}
.log-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(8,16,31,.2) 0%, transparent 45%);
}
.log-body { padding: 24px 26px; }
.log-card::before { left: 180px; }

/* ---------- MOBILE NAV ---------- */
.menu-btn {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid #1f2f4d;
  color: #5eead4;
  font-size: 20px;
  cursor: pointer;
  position: fixed;
  top: 2px; right: 2px;
  z-index: 110;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn:active { background: rgba(94,234,212,.15); }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(8,16,31,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 105;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-nav a {
  color: #e7ecf5;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: 1px solid #1f2f4d;
  min-width: 220px;
  text-align: center;
  transition: all .15s;
}
.mobile-nav a:hover, .mobile-nav a:active {
  border-color: #5eead4;
  color: #5eead4;
  background: rgba(94,234,212,.08);
}
.mobile-nav-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e9cb5;
  font-size: 28px;
  cursor: pointer;
  border: 1px solid #1f2f4d;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-close:active { color: #fff; border-color: #5eead4; }

#nav-toggle:checked ~ .mobile-nav {
  opacity: 1;
  pointer-events: auto;
}

/* Touch-friendly active states */
a:active, .btn:active, .side-cta:active, .back-link:active,
.log-foot a:active, .entry-link:active, .filter-reset:active {
  opacity: .7;
  transform: scale(.98);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .footer { margin-left: 0; }
  .section, .section-sm { padding: 40px 28px; }
  .hero, .int-hero { padding: 52px 28px; }
  .hero-title { font-size: 40px; }
  .int-hero h1 { font-size: 30px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .int-grid { grid-template-columns: 1fr; }
  .log-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-img { aspect-ratio: 16/10; }
  .int-cover img { height: 260px; }
  .int-cover-meta { padding: 12px 28px; }
  .log-card { grid-template-columns: 140px 1fr; }
  .log-card::before { left: 140px; }
  .log-body { padding: 20px; }
  /* Filters: horizontal layout on tablet to prevent overlap */
  .log-filters { position: static; display: flex; flex-wrap: wrap; gap: 0 24px; padding-bottom: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
  .filter-block { padding: 12px 0; border-top: none; }
  .filter-block:first-child { padding-top: 12px; }
  .filter-count { width: 100%; margin-top: 8px; }
  .filter-reset { margin-top: 12px; width: auto; }
}

@media (max-width: 600px) {
  .menu-btn { display: flex; }
  .topbar-nav { display: none !important; }
  .topbar { padding: 0 12px; height: 52px; }
  .topbar-left { gap: 10px; }
  .brand { font-size: 11px; letter-spacing: 0.08em; }
  .brand-mark { width: 18px; height: 18px; }
  .status-pill { display: none; }

  .hero { padding: 72px 18px 40px; }
  .hero-title { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
  .hero-sub { font-size: 13px; margin-top: 16px; }
  .hero-meta { flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 28px; }
  .hero-stat { padding: 14px 12px; }
  .hero-stat-num { font-size: 22px; }
  .hero-stat-label { font-size: 9px; }
  .hero-cta { flex-direction: column; gap: 10px; margin-top: 24px; }
  .hero-cta .btn { width: 100%; justify-content: center; padding: 14px 20px; font-size: 12px; }

  .int-hero { padding: 72px 18px 32px; }
  .int-hero h1 { font-size: 22px; line-height: 1.15; }
  .int-hero-meta { gap: 14px 24px; margin-top: 20px; font-size: 10px; }
  .int-type-badge { font-size: 9px; padding: 4px 8px; }

  .section, .section-sm { padding: 28px 18px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 12px; margin-bottom: 20px; }
  .sec-head h2 { font-size: 20px; }
  .sec-label { font-size: 9px; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 14px; }
  /* Dernières interventions → horizontal slider on mobile */
  .grid-2 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .grid-2 > article {
    min-width: 82vw;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .grid-2::-webkit-scrollbar { height: 4px; }
  .grid-2::-webkit-scrollbar-track { background: var(--panel-2); border-radius: 2px; }
  .grid-2::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
  .skill-card { padding: 18px; }
  .skill-card h3 { font-size: 15px; margin-top: 20px; }
  .skill-card p { font-size: 12px; }
  .tag { font-size: 9px; padding: 3px 7px; }

  .log-card { grid-template-columns: 1fr; }
  .log-thumb { height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
  .log-card::before { left: 0; top: auto; bottom: 0; width: 100%; height: 3px; }
  .log-body { padding: 16px; }
  .log-card h3 { font-size: 15px; }
  .log-card p { font-size: 12px; }
  .log-meta { font-size: 10px; gap: 8px; }
  .log-type { font-size: 9px; padding: 3px 7px; }
  .log-foot { font-size: 10px; flex-direction: column; align-items: flex-start; gap: 8px; }

  .int-cover img { height: 180px; }
  .int-cover-meta { padding: 10px 18px; font-size: 9px; }

  .tech-figs { grid-template-columns: 1fr; gap: 14px; }
  .tech-fig figcaption { font-size: 9px; }

  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .crow { padding: 12px 14px; font-size: 12px; }
  .crow .k { width: 70px; font-size: 9px; }
  .crow .v { font-size: 11px; }

  .footer {
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    text-align: center;
  }
  .footer-links { gap: 16px; }

  .dtable th, .dtable td { padding: 10px 12px; font-size: 12px; }
  .dtable th { font-size: 9px; }

  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric { padding: 14px 10px; }
  .metric-value { font-size: 20px; }
  .metric-label { font-size: 9px; }

  .step { grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; }
  .step-num { font-size: 10px; }
  .step-body { font-size: 12px; }

  .back-link { padding: 10px 12px; font-size: 10px; margin-bottom: 16px; }

  .ispec { padding: 14px; }
  .ispec h4 { font-size: 9px; }
  .ispec-row { font-size: 11px; }
  .ipart { grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 10px; }
  .ipart-mk { width: 20px; height: 20px; font-size: 10px; }
  .ipart-name { font-size: 11px; }
  .ipart-ref { font-size: 9px; }

  .hero-split { gap: 20px; }
  .hero-img { aspect-ratio: 16/9; }
  .hero-img-corner { font-size: 9px; padding: 4px 8px; }
  .hero-img-bl { font-size: 9px; }

  h1, .h1 { font-size: 28px; }
  h2, .h2 { font-size: 18px; }

  .fg input, .fg select, .fg textarea { padding: 12px 12px; font-size: 16px; }
  .btn { padding: 12px 18px; font-size: 10px; }

  .ipanel-head { padding: 10px 14px; }
  .ipanel-head h3 { font-size: 10px; }
  .ipanel-body { padding: 14px; font-size: 12px; }

  /* Filters: compact horizontal scroll on small mobile */
  .log-filters { gap: 0 16px; padding-bottom: 4px; margin-bottom: 12px; }
  .filter-block { padding: 8px 0; }
  .filter-block:first-child { padding-top: 8px; }
  .filter-opt { font-size: 12px; padding: 4px 0; }
  .filter-block h4 { font-size: 9px; margin-bottom: 6px; }
  .filter-reset { padding: 7px 10px; font-size: 9px; margin-top: 8px; }
  .filter-count { font-size: 10px; padding: 8px 10px; margin-top: 6px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 22px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { border-right: none; border-bottom: 1px solid #1f2f4d; }
  .hero-stat:last-child { border-bottom: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { gap: 12px; }
}
