/* ============================================================
   MUNYAI KHUTHADZO — PORTFOLIO STYLESHEET
   File: style.css
   Description: All styles for the portfolio site
   Colours: Navy, Blue, Green, Teal, Purple, Orange
   ============================================================ */

.hidden {
  opacity: 0;
  transform: translateY(20px);
}

.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}



/* ── CSS VARIABLES (COLOUR PALETTE) ─────────────────────────
   Change these to update colours site-wide instantly        */
:root {
  --navy:         #1B3A6B;
  --blue:         #2E6FD9;
  --light-blue:   #EBF2FF;
  --green:        #1A7A4A;
  --light-green:  #EAFAF1;
  --teal:         #0F766E;
  --light-teal:   #CCFBF1;
  --purple:       #6C3483;
  --light-purple: #F5EEF8;
  --orange:       #C0392B;
  --gray:         #444343;
  --light-gray:   #ebeff7;
  --white:        #ffffff;
  --dark:         #0D1117;
}

/* ── RESET & BASE ────────────────────────────────────────── */


.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/*
  PURPOSE:
  Lock initial layout BEFORE JS runs
  Prevent body-level layout shift cascade
*/

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  overflow-x: hidden;
}

/*
  PURPOSE:
  Prevent layout shift by reserving final rendered space
  so JS animations do not push content down after first paint
*/

/*
  PURPOSE:
  Prevent initial render shift by locking layout space immediately
  before any JS animation or observer runs
*/

.hero-content {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*
  PURPOSE:
  Prevent CLS caused by stats loading/animation injection
*/

.hero-stats {
  min-height: 120px; /* ensures space is reserved before JS updates numbers */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--gray);
  background: var(--white);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

/* ── NAVIGATION ──────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}

.nav-brand span {
  color: #7EB3FF;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #AACCFF;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.active {
  color: #FFFFFF;
}

/* ── HERO SECTION ────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #0D2347 50%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(46,111,217,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(108,52,131,0.1) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: rgba(46,111,217,0.2);
  border: 1px solid rgba(46,111,217,0.4);
  color: #7EB3FF;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-name span {
  color: #7EB3FF;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #AACCFF;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-statement {
  font-size: 1rem;
  color: #8899BB;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 40px;
  font-style: italic;
}

.hero-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #6677AA;
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  display: inline-block;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: #1E5DC7;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #AACCFF;
  border: 2px solid rgba(174,204,255,0.3);
}

.btn-outline:hover {
  border-color: #AACCFF;
  color: var(--white);
  transform: translateY(-2px);
}

/* ── HERO STATS ──────────────────────────────────────────── */
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #6677AA;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── SECTION SHARED STYLES ───────────────────────────────── */
section {
  padding: 80px 24px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 48px;
}

/* ── ABOUT SECTION ───────────────────────────────────────── */
#about {
  background: var(--light-gray);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-quote {
  background: var(--white);
  border-left: 4px solid var(--blue);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin-top: 24px;
  font-style: italic;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── SKILLS GRID ─────────────────────────────────────────── */
.skills-grid {
  display: grid;
  gap: 16px;
}

.skill-category {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #E2E8F0;
}

.skill-category h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 12px;
}

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

.tag {
  background: var(--light-blue);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.tag.green  { background: var(--light-green);  color: var(--green); }
.tag.purple { background: var(--light-purple); color: var(--purple); }
.tag.teal   { background: var(--light-teal);   color: var(--teal); }

/* ── PORTFOLIO SECTION ───────────────────────────────────── */
#portfolio {
  background: var(--white);
}

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

.portfolio-card {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  background: var(--white);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(27,58,107,0.12);
  border-color: var(--blue);
}

.card-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.card-phase {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.card-body {
  padding: 0 24px 20px;
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--light-gray);
  color: var(--gray);
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-stat {
  font-size: 0.8rem;
  color: var(--gray);
}

.card-stat strong {
  color: var(--navy);
}

.card-link {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
}

.github-cta {
  text-align: center;
  margin-top: 48px;
}

/* ── WORKFLOW SECTION ────────────────────────────────────── */
#workflow {
  background: var(--navy);
}

#workflow .section-label { color: #7EB3FF; }
#workflow .section-title { color: var(--white); }
#workflow .section-subtitle { color: #AACCFF; }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px;
}

.workflow-step {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s;
}

.workflow-step:hover {
  background: rgba(46,111,217,0.2);
  border-color: rgba(46,111,217,0.4);
  transform: translateY(-2px);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.step-tool {
  font-size: 0.8rem;
  color: #7EB3FF;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.8rem;
  color: #8899BB;
  line-height: 1.5;
}

/* ── CERTIFICATIONS SECTION ──────────────────────────────── */
#certifications {
  background: var(--light-gray);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--white);
  border-radius: 10px;
  padding: 20px 24px;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.cert-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(46,111,217,0.1);
}

.cert-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cert-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.cert-issuer {
  font-size: 0.8rem;
  color: var(--gray);
}

.cert-date {
  font-size: 0.75rem;
  color: var(--blue);
  font-weight: 600;
  margin-top: 4px;
}

/* ── CONTACT SECTION ─────────────────────────────────────── */
#contact {
  background: var(--white);
  text-align: center;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.contact-link.email {
  background: var(--navy);
  color: var(--white);
}

.contact-link.email:hover {
  background: #0D2347;
  transform: translateY(-2px);
}

.contact-link.github {
  background: #24292E;
  color: var(--white);
}

.contact-link.github:hover {
  background: #000;
  transform: translateY(-2px);
}

.contact-link.linkedin {
  background: #0A66C2;
  color: var(--white);
}

.contact-link.linkedin:hover {
  background: #004182;
  transform: translateY(-2px);
}

/* ── AVAILABILITY BADGE ──────────────────────────────────── */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--light-green);
  color: var(--green);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 32px;
}

.availability::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: #6677AA;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

footer span {
  color: #AACCFF;
}

/* ── RESPONSIVE — MOBILE ─────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  section { padding: 60px 20px; }
  .hero-stats { gap: 24px; }
  .workflow-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .workflow-steps { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
}
