/* ============================================
   Portfolio — Jeremiah Brian Ngige
   Premium Dark Glassmorphism Theme
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* colours */
  --bg-primary:    #06060f;
  --bg-secondary:  #0d0d1f;
  --bg-card:       rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --accent:        #4f7df5;
  --accent-light:  #7da1ff;
  --accent-glow:   rgba(79, 125, 245, 0.35);
  --purple:        #6c63ff;
  --purple-glow:   rgba(108, 99, 255, 0.30);
  --gradient:      linear-gradient(135deg, var(--accent), var(--purple));
  --text-primary:  #eaeaff;
  --text-secondary:#8e90a6;
  --text-muted:    #5a5c72;
  --border:        rgba(255, 255, 255, 0.06);
  --border-hover:  rgba(255, 255, 255, 0.12);

  /* typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* spacing */
  --section-pad: 120px 0;
  --container:   1140px;

  /* transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-primary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Utility ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* reveal animation base */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Ambient Background ---------- */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.ambient-bg .orb-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -150px;
  animation: float-orb 18s ease-in-out infinite alternate;
}

.ambient-bg .orb-2 {
  width: 500px; height: 500px;
  background: var(--purple);
  bottom: -100px; right: -100px;
  animation: float-orb 22s ease-in-out infinite alternate-reverse;
}

.ambient-bg .orb-3 {
  width: 350px; height: 350px;
  background: #a855f7;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: float-orb 15s ease-in-out infinite alternate;
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: 36px;
}

.navbar-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 2.4em;
}

.hero-title .typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.85s step-end infinite;
}

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

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* hero image */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient);
  animation: rotate-border 6s linear infinite;
  z-index: -1;
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-primary);
  z-index: -1;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* floating badges around image */
.floating-badge {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 2;
  animation: float-badge 4s ease-in-out infinite;
  white-space: nowrap;
}

.floating-badge .badge-icon {
  font-size: 1.3rem;
}

.floating-badge:nth-child(2) { top: 10%; right: -30px; animation-delay: 0s; }
.floating-badge:nth-child(3) { bottom: 15%; left: -50px; animation-delay: 1.2s; }
.floating-badge:nth-child(4) { bottom: -10px; right: 20px; animation-delay: 2.4s; }

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- About Section ---------- */
.about {
  padding: var(--section-pad);
  position: relative;
  z-index: 1;
}

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

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 1.85;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.35s var(--ease);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ---------- Skills Section ---------- */
.skills {
  padding: var(--section-pad);
  position: relative;
  z-index: 1;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 50px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.35s;
}

.skill-category:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.skill-category:hover::before {
  opacity: 1;
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.skill-category-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.skill-category-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

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

.skill-tag {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(79, 125, 245, 0.08);
  color: var(--accent-light);
  border: 1px solid rgba(79, 125, 245, 0.15);
  transition: all 0.3s;
}

.skill-tag:hover {
  background: rgba(79, 125, 245, 0.18);
  border-color: var(--accent);
}

/* ---------- Experience Section ---------- */
.experience {
  padding: var(--section-pad);
  position: relative;
  z-index: 1;
}

.timeline {
  margin-top: 50px;
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--purple), transparent);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -46px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.35s var(--ease);
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateX(8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-company {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.timeline-role {
  font-size: 0.95rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: nowrap;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.75;
}

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

.timeline-tag {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(108, 99, 255, 0.1);
  color: #a89eff;
  border: 1px solid rgba(108, 99, 255, 0.15);
}

/* ---------- Projects Section ---------- */
.projects {
  padding: var(--section-pad);
  position: relative;
  z-index: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 50px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.project-card-header {
  padding: 32px 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.project-company {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-card-body {
  padding: 20px 28px;
  flex: 1;
}

.project-card-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.project-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.15);
  font-size: 0.82rem;
  font-weight: 600;
  color: #facc15;
}

.project-card-footer {
  padding: 0 28px 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.project-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(79, 125, 245, 0.08);
}

/* ---------- Contact Section ---------- */
.contact {
  padding: var(--section-pad);
  position: relative;
  z-index: 1;
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 18px;
}

.contact-info-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.contact-info-item:hover .contact-info-icon {
  background: rgba(79, 125, 245, 0.1);
  border-color: var(--accent);
}

.contact-info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.contact-info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.contact-info-value a {
  transition: color 0.3s;
}

.contact-info-value a:hover {
  color: var(--accent-light);
}

/* contact form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(79, 125, 245, 0.08);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .hero-image-wrapper { width: 300px; height: 300px; }

  .about .container { grid-template-columns: 1fr; }
  .contact .container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px 0;
  }

  .navbar-links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(6, 6, 15, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 100px 36px 40px;
    gap: 28px;
    transition: right 0.4s var(--ease);
    border-left: 1px solid var(--border);
  }

  .navbar-links.open {
    right: 0;
  }

  .navbar-links a {
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-image-wrapper { width: 250px; height: 250px; }
  .floating-badge { display: none; }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-card { padding: 20px 12px; }
  .stat-number { font-size: 1.6rem; }

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .timeline { padding-left: 30px; }
  .timeline-item::before { left: -36px; width: 10px; height: 10px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
