/* =========================================================
   PORTFOLIO — Estate-Link-inspired dark theme
   Ejeh Kaodilichi Emmanuel (Odili)
   ========================================================= */

:root {
  --bg: #0d1217;
  --bg-alt: #10171d;
  --bg-card: #141b22;
  --bg-card-hover: #182029;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6ecef;
  --text-muted: #94a3ab;
  --text-dim: #64748b;
  --accent: #14b8a6;
  --accent-light: #4dd6c7;
  --accent-glow: rgba(20, 184, 166, 0.18);
  --orange: #e36414;
  --orange-light: #f97316;
  --gold: #c9a86a;
  --green: #34d399;
  --red: #f87171;
  --blue: #60a5fa;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1200px;
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

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

.section-pad { padding: 96px 0; }

.accent { color: var(--accent); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2d2d3f; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--sans);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- Section Head ---------- */
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-sub { color: var(--text-muted); max-width: 560px; margin: 12px auto 0; }

/* =========================================================
   NAVIGATION
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo { font-size: 22px; font-weight: 800; color: var(--text); }
.nav-menu { display: flex; list-style: none; gap: 28px; }
.nav-link {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}
.hero-glow::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -40%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.15), transparent 60%);
  filter: blur(60px);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  position: relative;
}
.hero-greeting { color: var(--accent-light); font-size: 18px; margin-bottom: 12px; }
.hero-name {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.hero-role {
  font-family: var(--mono);
  font-size: clamp(16px, 2vw, 21px);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 22px;
  min-height: 30px;
}
.cursor { animation: blink 0.8s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-tagline {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-tagline strong { color: var(--text); }
.hero-buttons { display: flex; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-social { display: flex; gap: 18px; }
.hero-social a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.hero-social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.hero-right { display: flex; justify-content: center; }
.avatar-frame { position: relative; width: 280px; height: 280px; }
.avatar-frame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--orange));
  opacity: 0.9;
}
.avatar {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about { background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p { color: var(--text-muted); margin-bottom: 18px; }
.about-text strong { color: var(--text); }
.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.fact {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.fact-icon { font-size: 22px; }
.fact strong { font-size: 14px; color: var(--text); }
.fact div { font-size: 13.5px; color: var(--text-muted); }

.about-stack { position: sticky; top: 90px; }
.stack-title {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text);
}
.stack-group { margin-bottom: 20px; }
.stack-cat {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--mono);
  transition: var(--transition);
}
.badge:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* =========================================================
   PROJECTS
   ========================================================= */
.projects { background: var(--bg); }
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: none;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
@keyframes cardIn { to { opacity: 1; transform: none; } }
.project-card.visible { animation: cardIn 0.6s ease forwards; }
.project-card.animate-out { opacity: 0; transform: scale(0.95); transition: all 0.3s ease; }

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.project-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
}
.project-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  background: rgba(52, 211, 153, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.project-title { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.project-desc { color: var(--text-muted); font-size: 14.5px; margin-bottom: 18px; flex-grow: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
  color: var(--text-dim);
}
.project-links { display: flex; gap: 14px; font-size: 14px; font-weight: 600; }
.project-link { color: var(--accent-light); }
.project-link:hover { color: var(--accent); }
.project-link span { font-size: 15px; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 16px;
}

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: var(--bg-alt); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-6px); }
.service-icon {
  font-size: 30px;
  margin-bottom: 16px;
  display: inline-block;
}
.service-card h3 { font-size: 18px; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; }

/* =========================================================
   BLOG
   ========================================================= */
.blog { background: var(--bg); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.blog-meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.blog-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 20px;
}
.blog-date { font-size: 13px; color: var(--text-dim); }
.blog-title { font-size: 18px; line-height: 1.35; margin-bottom: 12px; }
.blog-excerpt { color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; }
.read-more { font-size: 14px; font-weight: 600; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials { background: var(--bg-alt); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
}
.testimonial-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.stars { color: #fbbf24; letter-spacing: 2px; margin-bottom: 14px; font-size: 16px; }
.testimonial-quote {
  color: var(--text-muted);
  font-size: 15px;
  font-style: italic;
  margin-bottom: 22px;
}
.testimonial-author {
  display: flex; align-items: center; gap: 14px;
}
.author-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.author-name { font-weight: 600; font-size: 14.5px; }
.author-role { font-size: 13px; color: var(--text-dim); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-intro { color: var(--text-muted); margin-bottom: 28px; }
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-icon { font-size: 20px; }
.contact-method strong { font-size: 14px; }
.contact-method div { font-size: 14px; color: var(--text-muted); }
.contact-method a { font-size: 14px; }
.resume-link { color: var(--accent-light); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  transition: var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input.invalid,
.form-group textarea.invalid { border-color: var(--red); }
.form-error {
  color: var(--red);
  font-size: 12.5px;
  margin-top: 5px;
  display: none;
}
.form-group.error .form-error { display: block; }
.form-success {
  color: var(--green);
  margin-top: 16px;
  text-align: center;
  font-weight: 500;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer p { color: var(--text-dim); font-size: 14px; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { font-size: 14px; color: var(--text-muted); }
.footer-social a:hover { color: var(--accent); }

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--accent-light); }

/* =========================================================
   MODALS
   ========================================================= */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  padding: 36px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal h3 { font-size: 22px; margin-bottom: 16px; padding-right: 30px; }
.modal p { color: var(--text-muted); font-size: 15px; }

/* =========================================================
   SCROLL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .projects-grid, .services-grid { grid-template-columns: repeat(2, 1fr); }
  .section-pad { padding: 72px 0; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
    transform: translateY(-130%);
    transition: var(--transition);
  }
  .nav-menu.open { transform: none; }
  .nav-menu li { padding: 6px 0; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; padding-top: 80px; }
  .hero-buttons, .hero-social { justify-content: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-right { order: -1; }
  .avatar-frame { width: 200px; height: 200px; margin: 0 auto; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-stack { position: static; }
  .about-facts { grid-template-columns: 1fr; }

  .projects-grid, .services-grid, .blog-grid, .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .section-head { margin-bottom: 40px; }
  .hero-name { font-size: 40px; }
}
