/* ============================================================
   TENDEKAI MUGOMBA — PORTFOLIO HUB
   Brand: dark navy/graphite base, amber primary accent, cyan
   secondary accent. Hero + project imagery mixes real photography
   with the data-viz language used across the individual projects.
   Pending section: technical/blueprint schematic treatment.
   ============================================================ */

:root {
  --navy: #0a1420;
  --navy-deep: #060c14;
  --graphite: #131c28;
  --graphite-raised: #1a2532;
  --hairline: rgba(226, 232, 240, 0.1);
  --hairline-strong: rgba(226, 232, 240, 0.2);

  --ink-white: #eef2f6;
  --ink-light: #aab5c2;
  --ink-dim: #6d7885;

  --amber: #f5a623;
  --amber-deep: #b9770f;
  --cyan: #35c2c1;
  --cyan-deep: #157a79;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink-light);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-white);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.2em; max-width: 62ch; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
::selection { background: var(--amber); color: var(--navy-deep); }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 1em;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 6vw; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- Floating social sidebar ---------- */
.social-rail {
  position: fixed;
  left: 2.5vw;
  bottom: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  z-index: 40;
}

@media (min-width: 900px) {
  .social-rail { display: flex; }
}

.social-rail a {
  color: var(--ink-dim);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-rail a:hover { color: var(--amber); transform: translateY(-3px); }
.social-rail::after { content: ''; width: 1px; height: 90px; background: var(--ink-dim); margin-top: 0.4rem; }


/* ---------- Header: hides on scroll down, reappears on scroll up ---------- */
header.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1.4rem 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(6,12,20,0.9), transparent);
  transition: transform 0.35s ease;
}

header.site-header.hide { transform: translateY(-100%); }

.brand {
  font-family: var(--font-display);
  color: var(--ink-white);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand span { color: var(--amber); }

nav.main-nav { display: none; gap: 2.2rem; font-family: var(--font-mono); font-size: 0.82rem; }
@media (min-width: 800px) { nav.main-nav { display: flex; } }
nav.main-nav a { color: var(--ink-light); }
nav.main-nav a:hover { color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,12,20,0.55) 0%, rgba(6,12,20,0.85) 65%, var(--navy) 100%),
    linear-gradient(120deg, rgba(245,166,35,0.12), rgba(53,194,193,0.1)),
    url('https://images.pexels.com/photos/9889007/pexels-photo-9889007.jpeg?auto=compress&cs=tinysrgb&w=1920');
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
}

.hero-bg-note {
  position: absolute;
  bottom: 1rem; right: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-dim);
  background: rgba(6,12,20,0.6);
  padding: 0.3rem 0.6rem;
  border: 1px dashed var(--hairline-strong);
  z-index: 2;
}

.hero-content { position: relative; z-index: 2; padding: 8rem 6vw 4rem; max-width: 1240px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.8rem);
  max-width: 14ch;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--amber); }

.hero-role {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-light);
  max-width: 56ch;
}

.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.btn:hover { background: var(--amber); color: var(--navy-deep); }
.btn.ghost { border-color: var(--hairline-strong); color: var(--ink-light); }
.btn.ghost:hover { border-color: var(--cyan); color: var(--cyan); background: transparent; }

.scroll-indicator {
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-dim);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  z-index: 2;
}
.scroll-indicator .line { width: 1px; height: 34px; background: var(--ink-dim); animation: scrolldraw 2s ease-in-out infinite; }
@keyframes scrolldraw { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.01% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Section shell ---------- */
.section { padding: 10rem 0; border-top: 1px solid var(--hairline); }
.section-head { max-width: 62ch; margin-bottom: 4.5rem; }
.section h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); letter-spacing: -0.02em; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.3fr; } }

.about-bio { font-size: 1.08rem; color: var(--ink-light); }
.about-bio strong { color: var(--ink-white); }

.skill-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.skill-chip {
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.4rem 0.9rem; border: 1px solid var(--hairline-strong);
  border-radius: 20px; color: var(--ink-light);
}

.about-figure {
  border: 1px solid var(--hairline-strong);
  background: var(--graphite);
  border-radius: 4px;
  min-height: 600px; /* bigger frame for the photos */
  position: relative; /* REQUIRED: without this, the absolutely-positioned
                          .slide images inside have no positioned ancestor
                          to be contained by, so they escape the box and
                          scatter across the page instead of stacking here */
  overflow: hidden;
}

@media (min-width: 1200px) {
  .about-figure { min-height: 720px; }
}

.about-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
  filter: saturate(1.05) brightness(0.92);
}

.about-slideshow .slide.active { opacity: 1; }

.slideshow-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(245,166,35,0.1), rgba(53,194,193,0.08));
  pointer-events: none;
}

/* Prev/next slideshow arrows — circular, semi-transparent buttons that
   sit on top of the photo, amber on hover to match the site's accent */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: rgba(6, 12, 20, 0.55);
  color: var(--ink-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.slide-nav svg { width: 20px; height: 20px; }
.slide-nav:hover { background: var(--amber); border-color: var(--amber); color: var(--navy-deep); }
.slide-nav-prev { left: 1rem; }
.slide-nav-next { right: 1rem; }

/* ---------- Projects ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2.5rem; }
.filter-btn {
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.5rem 1.1rem; border: 1px solid var(--hairline-strong);
  border-radius: 20px; color: var(--ink-light); background: transparent; cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--amber); color: var(--amber); }
.filter-btn.active { background: var(--amber); border-color: var(--amber); color: var(--navy-deep); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}

.project-card {
  border: 1px solid var(--hairline-strong);
  background: var(--graphite);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--amber); }

.project-thumb {
  height: 170px;
  background: linear-gradient(140deg, var(--graphite-raised), var(--navy-deep));
  position: relative;
  display: flex; align-items: flex-end;
  padding: 0.8rem;
  overflow: hidden;
}
.project-thumb .tag-badge {
  font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--cyan); background: rgba(6,12,20,0.75);
  padding: 0.3rem 0.6rem; border-radius: 3px;
  position: relative; z-index: 2;
}
.thumb-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.thumb-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(1.05);
}

.pulse-dot {
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

.project-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 0.5em; }
.project-body p { font-size: 0.93rem; color: var(--ink-light); margin-bottom: 1rem; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.project-tags span {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-dim);
  border: 1px solid var(--hairline); padding: 0.2rem 0.5rem; border-radius: 3px;
}

.project-links { display: flex; gap: 0.9rem; margin-top: auto; font-family: var(--font-mono); font-size: 0.8rem; }
.project-links a.disabled { color: var(--ink-dim); pointer-events: none; text-decoration: line-through; }

/* ---------- Pending / blueprint section ---------- */
.blueprint-section {
  background: var(--navy);
}

.blueprint-title-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5em;
}

.blueprint-title-row h2 { margin-bottom: 0; }

.compass-anim {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  opacity: 0.9;
  transform-origin: 50% 22%;
  animation: compassSwing 3.4s ease-in-out infinite;
}
.compass-anim svg { width: 100%; height: 100%; display: block; }

@keyframes compassSwing {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

@media (prefers-reduced-motion: reduce) {
  .compass-anim { animation: none; }
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.6rem;
}

.blueprint-card {
  position: relative;
  border-left: 2px solid var(--amber);
  padding: 1.8rem 0 1.8rem 1.6rem;
  font-family: var(--font-mono);
  overflow: hidden;
}

/* Diagonal caution-stripe veil — signals "don't judge this content yet,"
   sitting above the text but low-opacity enough to still read through. */
.blueprint-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 166, 35, 0.09) 0px,
    rgba(245, 166, 35, 0.09) 10px,
    transparent 10px,
    transparent 20px
  );
}

.blueprint-tag {
  display: inline-block; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--navy-deep); background: var(--amber);
  padding: 0.25rem 0.55rem; margin-bottom: 0.9rem;
  position: relative; z-index: 2;
}

.blueprint-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: saturate(1.1);
  z-index: 0;
}

.blueprint-card h3 { font-family: var(--font-mono); font-size: 1rem; color: var(--ink-white); text-transform: uppercase; letter-spacing: 0.02em; }
.blueprint-card p { font-family: var(--font-body); font-size: 0.88rem; color: var(--ink-light); margin: 0.7em 0 1em; }

.blueprint-meta { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--ink-dim); border-top: 1px dashed var(--hairline-strong); padding-top: 0.7rem; }

.blueprint-progress { height: 2px; background: var(--hairline); margin-top: 1rem; position: relative; overflow: hidden; }
.blueprint-progress span { position: absolute; inset: 0; background: var(--amber); transform: scaleX(var(--pct, 0.2)); transform-origin: left; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--hairline-strong); padding: 4rem 0 3rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-links { display: flex; gap: 1.5rem; font-family: var(--font-mono); font-size: 0.85rem; }
.footer-note { margin-top: 2.5rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-dim); }

/* ---------- Resume request dialog ---------- */
.resume-dialog {
  border: 1px solid var(--hairline-strong);
  background: var(--graphite);
  color: var(--ink-light);
  border-radius: 6px;
  padding: 2.2rem;
  width: min(92vw, 380px);
}

.resume-dialog::backdrop {
  background: rgba(6, 12, 20, 0.75);
  backdrop-filter: blur(2px);
}

.resume-dialog h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4em;
}

.dialog-sub {
  font-size: 0.9rem;
  color: var(--ink-dim);
  margin-bottom: 1.2rem;
}

.resume-dialog input[type="email"] {
  width: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--hairline-strong);
  color: var(--ink-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border-radius: 3px;
}
.resume-dialog input[type="email"]:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
}

.dialog-close {
  position: absolute;
  top: 0.8rem; right: 0.9rem;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--amber); }

.resume-dialog form, .resume-success { position: relative; }
