/* ============================================================
   mamadouwane.com — v1
   Dark retro-futuristic cloud-engineering control room.
   Plain CSS, no frameworks.
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-raise: #0a0f1c;
  --panel: rgba(14, 20, 35, 0.6);
  --line: rgba(110, 195, 224, 0.14);
  --line-strong: rgba(110, 195, 224, 0.35);
  --accent: #6cc3dd;
  --accent-bright: #b5e7f5;
  --accent-deep: #2e7fa3;
  --accent-glow: rgba(95, 190, 220, 0.45);
  --alt: #9da8f7;
  --alt-glow: rgba(140, 155, 245, 0.45);
  --ink: #e9e4d8;
  --body: #b9c0d0;
  --muted: #828ba0;
  --ok: #7dd87d;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient layers: faint dot grid + two soft glow fields */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(110, 195, 224, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 0%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 60% 45% at 18% -5%, rgba(80, 160, 215, 0.07), transparent 70%),
    radial-gradient(ellipse 55% 45% at 85% 108%, rgba(70, 110, 255, 0.06), transparent 70%),
    linear-gradient(180deg, #060910 0%, var(--bg) 35%);
}

::selection { background: rgba(110, 195, 224, 0.3); color: var(--ink); }

a { color: var(--accent); text-decoration: none; }
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(1100px, 92%); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 13px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}
.brand {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cursor {
  display: inline-block;
  width: 0.55em; height: 1em;
  margin-left: 5px;
  vertical-align: text-bottom;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-bright);
  text-shadow: 0 0 14px var(--accent-glow);
}
.clock {
  color: rgba(110, 195, 224, 0.55);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============ Hero ============ */
.hero { padding: 88px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-tag {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  margin-bottom: 26px;
}

/* --- Operating-profile readout --- */
.readout {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 36px;
  background: rgba(14, 20, 35, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.readout-cell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  border-left: 1px solid var(--line);
}
.readout-cell:first-child { border-left: none; }
.readout-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.readout-value {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 14px rgba(95, 190, 220, 0.25);
}

.hero h1 {
  color: var(--ink);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.headline {
  color: var(--accent);
  font-size: clamp(0.85rem, 1.6vw, 1.02rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 22px;
}
.headline .sep {
  color: var(--muted);
  margin: 0 6px;
}
.intro {
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.75;
  max-width: 54ch;
  margin-bottom: 34px;
}
.accent-word {
  font-family: var(--mono);
  font-size: 0.95em;
  font-weight: 600;
  color: var(--accent);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #04141d;
  box-shadow: 0 0 26px rgba(95, 190, 220, 0.3), 0 4px 14px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost {
  border-color: rgba(110, 195, 224, 0.4);
  color: var(--accent);
}
.btn-ghost:hover {
  background: rgba(110, 195, 224, 0.08);
  box-shadow: 0 0 18px rgba(95, 190, 220, 0.15);
}

/* --- Topology panel --- */
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.panel-head,
.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.panel-head { border-bottom: 1px solid var(--line); }
.panel-foot {
  border-top: 1px solid var(--line);
  text-transform: none;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.panel-title { color: rgba(110, 195, 224, 0.8); }
#topology {
  display: block;
  width: 100%;
  height: auto;
  padding: 14px 10px 6px;
}
#topology .dot {
  fill: var(--accent);
}
#topology .glyph {
  filter: drop-shadow(0 0 5px rgba(95, 190, 220, 0.55));
}
#topology .dot.dim {
  fill: rgba(110, 195, 224, 0.26);
}
#topology .link {
  fill: none;
  stroke: rgba(110, 195, 224, 0.3);
  stroke-width: 1.4;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
#topology .pulse {
  fill: var(--accent-bright);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
#topology .label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Terminal cards --- */
.term-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 64px;
}
.term {
  background: rgba(9, 13, 23, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}
.term-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: rgba(110, 195, 224, 0.045);
  border-bottom: 1px solid var(--line);
}
.term-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.term-dot:first-child { background: rgba(110, 195, 224, 0.55); }
.term-title {
  margin-left: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.term-body {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #a8b1c4;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .cmd { color: var(--accent-bright); }
.term-body .dim { color: #5c6577; }
.term-body .ok { color: var(--ok); }
.caret {
  display: inline-block;
  width: 7px; height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: blink 1.1s steps(1) infinite;
}

/* ============ Capability strip ============ */
.capabilities {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(110, 195, 224, 0.025);
}
.cap-row { display: flex; flex-wrap: wrap; }
.cap {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 22px;
  border-left: 1px solid var(--line);
}
.cap:first-child { border-left: none; }
.cap-num {
  color: rgba(110, 195, 224, 0.55);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.cap-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.cap-desc {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

/* ============ Sections ============ */
.section { padding: 92px 0 0; }
.section:last-of-type { padding-bottom: 96px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 40px;
}
.sec-index {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.2em;
}
.section-head h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.sec-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ============ Project card ============ */
.project-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  padding: 40px 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.45);
}
.project-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.project-title-row h3 {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(157, 168, 247, 0.4);
  border-radius: 999px;
  color: var(--alt);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--alt);
  box-shadow: 0 0 8px var(--alt-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.project-desc {
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 52ch;
  margin-bottom: 26px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin-bottom: 30px;
}
.tags li {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.project-link {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.project-link:hover { text-shadow: 0 0 14px var(--accent-glow); }

/* --- Pipeline diagram --- */
.project-side {
  border-left: 1px solid var(--line);
  padding-left: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.side-title {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}
.pipeline { list-style: none; }
.pipeline .stage {
  position: relative;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.pipeline .stage + .stage { margin-top: 26px; }
.pipeline .stage + .stage::before {
  /* connector */
  content: "";
  position: absolute;
  left: 26px;
  top: -27px;
  height: 26px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong));
}
.pipeline .stage-gate {
  border-color: rgba(157, 168, 247, 0.5);
  background: rgba(157, 168, 247, 0.07);
  color: #cdd4fc;
  box-shadow: 0 0 22px rgba(140, 155, 245, 0.14);
}
.gate-tag {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: none;
}

/* --- Next-project teaser --- */
.project-next {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 18px 26px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}
.next-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.next-desc {
  flex: 1;
  min-width: 220px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ============ Resume ============ */
.resume-card {
  padding: 36px 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.resume-card p {
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 60ch;
  margin-bottom: 26px;
}
.resume-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.chip-soon {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
}
.chip-live {
  border: 1px solid rgba(125, 216, 125, 0.4);
  color: var(--ok);
}

/* ============ Contact roster ============ */
.roster { list-style: none; }
.roster li {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.roster li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.roster-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.roster-value { font-size: 14px; overflow-wrap: anywhere; }
a.roster-value:hover { text-shadow: 0 0 14px var(--accent-glow); }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  background: rgba(5, 8, 14, 0.6);
}
.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ============ Reveal on scroll ============ */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============ Responsive ============ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .term-row { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; gap: 36px; padding: 32px 28px; }
  .project-side {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 32px;
  }
  .clock { display: none; }
}
@media (max-width: 620px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 4px 18px;
    height: auto;
    padding: 12px 0;
  }
  .site-nav { gap: 16px; flex-wrap: wrap; }
  .site-nav a { font-size: 11px; letter-spacing: 0.1em; }
  .roster li { grid-template-columns: 90px 1fr auto; gap: 12px; }
  .resume-card, .project-card { padding: 28px 22px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .caret, .badge-dot { animation: none; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
