/* =============================================
   JOSEPH NGIGI KIARIE — PORTFOLIO
   Dark Theme · Syne + Space Mono
   ============================================= */
 
/* --- VARIABLES --- */
:root {
  --bg:          #0a0a0f;
  --bg-2:        #0f0f18;
  --bg-card:     #13131e;
  --border:      rgba(255,255,255,0.07);
  --accent:      #00e5a0;
  --accent-2:    #7b61ff;
  --accent-warm: #ff6b35;
  --text:        #eaeaf2;
  --text-muted:  #7a7a9a;
  --text-dim:    #3a3a55;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'DM Sans', sans-serif;
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.35s cubic-bezier(0.4,0,0.2,1);
}
 
/* --- RESET --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
 
html { scroll-behavior: smooth; }
 
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}
 
/* --- NOISE TEXTURE --- */
.noise {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.6;
}
 
/* --- CUSTOM CURSOR --- */
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top:0; left:0;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, background .2s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(0,229,160,0.4);
  border-radius: 50%;
  position: fixed; top:0; left:0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .12s ease, width .3s, height .3s, border-color .3s;
}
body:has(a:hover) .cursor { background: var(--accent-2); }
body:has(a:hover) .cursor-follower { border-color: var(--accent-2); width: 44px; height: 44px; }
 
/* --- TYPOGRAPHY --- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; }
.mono { font-family: var(--font-mono); }
 
/* --- REVEAL ANIMATION --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
 
/* =============================================
   NAV
   ============================================= */
#desktop-nav {
  position: fixed; top: 0; left:0; right:0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4rem;
  height: 72px;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
#desktop-nav.scrolled { background: rgba(10,10,15,0.97); }
 
.logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}
.logo-bracket { color: var(--accent); }
 
.nav-links {
  display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
 
.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,229,160,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(0,229,160,0); }
}
 
/* HAMBURGER */
#hamburger-nav {
  display: none;
  position: fixed; top:0; left:0; right:0; z-index:100;
  align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 64px;
  background: rgba(10,10,15,0.95);
  border-bottom: 1px solid var(--border);
}
.hamburger-icon {
  display: flex; flex-direction: column; gap: 5px; cursor: pointer;
}
.hamburger-icon span {
  display: block; width: 26px; height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}
.hamburger-icon.open span:first-child  { transform: rotate(45deg) translate(5px,5px); }
.hamburger-icon.open span:nth-child(2) { opacity:0; }
.hamburger-icon.open span:last-child   { transform: rotate(-45deg) translate(5px,-5px); }
 
.menu-links {
  position: absolute; top: 64px; left:0; right:0;
  background: var(--bg-2);
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
  border-bottom: 1px solid var(--border);
  list-style: none;
}
.menu-links.open { max-height: 300px; }
.menu-links a {
  display: block; padding: 1rem 2rem;
  color: var(--text); text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
}
.menu-links a:hover { color: var(--accent); background: rgba(0,229,160,0.05); }
.menu-links li { list-style: none; }
 
/* =============================================
   HERO
   ============================================= */
#profile {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 80px 6rem 4rem;
  gap: 4rem;
  position: relative; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0; z-index:0;
  background-image:
    linear-gradient(rgba(0,229,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
.hero-content { flex: 1; position: relative; z-index:1; }
 
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}
.tag-dot { width:6px; height:6px; background:var(--accent); border-radius:50%; animation: pulse 2s infinite; }
 
.hero-title {
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  display: flex; flex-direction: column;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}
.hero-title .line { display: block; }
.hero-title .accent-line {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  letter-spacing: -2px;
}
 
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
 
.hero-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
 
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent);
  color: #0a0a0f;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-primary:hover { background: #00c48a; transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,229,160,0.25); }
 
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
 
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
 
/* HERO VISUAL */
.hero-visual {
  position: relative; z-index:1;
  flex-shrink:0;
}
.profile-frame {
  position: relative;
  width: 340px; height: 380px;
}
.profile-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  filter: grayscale(15%) contrast(1.05);
}
.frame-corner {
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--accent);
  border-style: solid;
}
.tl { top:-8px; left:-8px; border-width: 2px 0 0 2px; }
.tr { top:-8px; right:-8px; border-width: 2px 2px 0 0; }
.bl { bottom:-8px; left:-8px; border-width: 0 0 2px 2px; }
.br { bottom:-8px; right:-8px; border-width: 0 2px 2px 0; }
 
.floating-tag {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.tag-1 { top: 20px; right: -60px; animation: float 3s ease-in-out infinite; }
.tag-2 { bottom: 80px; right: -50px; animation: float 3.5s ease-in-out infinite 0.5s; }
.tag-3 { bottom: 20px; left: -40px; animation: float 4s ease-in-out infinite 1s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
 
/* =============================================
   MARQUEE
   ============================================= */
.marquee-wrapper {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg-2);
  margin: 0;
}
.marquee-track {
  display: inline-flex; gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 25s; }
.marquee-track .sep { color: var(--accent); }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
 
/* =============================================
   ABOUT
   ============================================= */
#about {
  padding: 8rem 6rem;
}
.section-header { margin-bottom: 4rem; }
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--text);
}
 
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: center;
}
.about-img-frame {
  position: relative;
}
.about-img-frame .about-pic {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  filter: grayscale(10%) contrast(1.05);
}
.img-decoration {
  position: absolute;
  bottom: -16px; right: -16px;
  width: 100%; height: 100%;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  opacity: 0.25;
  z-index: -1;
}
.about-lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.55;
}
.about-body {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.about-body strong { color: var(--text); font-weight: 600; }
 
.about-stats {
  display: flex; gap: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
 
.about-links { display: flex; gap: 1.5rem; }
.inline-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.inline-link:hover { color: var(--accent); }
 
/* =============================================
   SKILLS
   ============================================= */
#experience { padding: 8rem 6rem; background: var(--bg-2); }
.marquee-wrapper { margin-bottom: 0; }
 
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}
.skill-card:hover { border-color: rgba(0,229,160,0.3); transform: translateY(-4px); }
 
.skill-card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1.5rem;
}
.skill-icon { font-size: 1.2rem; color: var(--accent); }
.skill-card-header h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0.5px; }
 
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.skill-list li { display: flex; align-items: center; gap: 10px; }
.skill-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 110px;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.skill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.skill-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.skill-card.visible .skill-bar span { /* triggered by JS */ }
 
/* =============================================
   PROJECTS
   ============================================= */
#projects { padding: 8rem 6rem; }
 
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: rgba(0,229,160,0.25);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.project-card.featured {
  grid-column: span 2;
  border-color: rgba(0,229,160,0.15);
}
.project-card.featured .project-card-inner { display: flex; gap: 0; }
.project-card.featured .project-img-wrap { width: 50%; flex-shrink:0; min-height: 280px; }
.project-card.featured .project-info { padding: 2.5rem; }
 
.project-card-inner { display: flex; flex-direction: column; height: 100%; }
.project-img-wrap {
  position: relative;
  min-height: 200px;
  background: var(--bg-2);
  overflow: hidden;
}
.project-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img { transform: scale(1.04); }
.project-placeholder {
  position: absolute; inset:0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-card));
}
 
.project-info { padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; flex:1; }
.project-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.featured-tag {
  background: rgba(0,229,160,0.1);
  border-color: rgba(0,229,160,0.3);
  color: var(--accent);
}
.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex:1;
}
.project-actions { display: flex; gap: 0.75rem; margin-top: auto; padding-top: 1rem; }
 
.project-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  background: rgba(0,229,160,0.08);
  transition: all var(--transition);
}
.project-btn:hover { background: var(--accent); color: #0a0a0f; }
.project-btn.ghost {
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}
.project-btn.ghost:hover { border-color: var(--text-muted); color: var(--text); }
 
/* =============================================
   CONTACT
   ============================================= */
#contact { padding: 8rem 6rem; background: var(--bg-2); }
 
.contact-wrapper { max-width: 700px; }
.contact-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  transition: all var(--transition);
}
.contact-card:hover {
  border-color: rgba(0,229,160,0.3);
  transform: translateX(4px);
  background: rgba(0,229,160,0.04);
}
.contact-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,229,160,0.1);
  border-radius: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-value {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
 
.big-cta {
  display: inline-flex;
  align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
  position: relative; overflow: hidden;
  margin: 20px;
  
}

.big-cta::before {
  content: '';
  position: absolute; inset:0;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index:0;
}
.big-cta:hover::before { transform: translateX(0); }
.big-cta:hover { color: #0a0a0f; }
.big-cta > * { position: relative; z-index:1; }
 
/* =============================================
   FOOTER
   ============================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 6rem;
  background: var(--bg);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }
 