/* ===========================
   James Iwuanyanwu — Portfolio
   Dark + Gold theme
   =========================== */

:root {
  --bg: #0b0b0f;
  --bg-alt: #111118;
  --surface: #16161f;
  --surface-2: #1c1c27;
  --text: #ececf1;
  --muted: #a0a0ad;
  --border: rgba(255, 255, 255, 0.08);
  --gold: #d4af37;
  --gold-light: #f3d27a;
  --gold-dark: #a8862b;
  --shadow-gold: 0 10px 30px -10px rgba(212, 175, 55, 0.35);
  --radius: 14px;
  --container: 1200px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: .5rem; }
h3 { font-size: 1.25rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .75rem;
  color: var(--gold);
  font-weight: 600;
}
.accent { color: var(--gold); }
.muted { color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm { padding: .6rem 1.1rem; font-size: .85rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); color: #1a1a1a; box-shadow: 0 15px 35px -10px rgba(212, 175, 55, 0.5); }
.btn-outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: #1a1a1a; }
.btn-ghost { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.navbar.scrolled { 
   background: rgba(11, 11, 15, 0.95);
   border-bottom-color: var(--border); 
}
.nav-container {
   display: flex;
   align-items: center; 
   justify-content: space-between;
   height: 72px;
}

.logo {
  width: 90px;
  cursor: pointer;
  margin-top: 1%;
  margin-left: -2%;
}   
.logo span {
   color: var(--gold); 
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: .95rem; font-weight: 500;
  position: relative; padding: .25rem 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--gold); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .5rem;
}
.hamburger span {
  width: 26px; height: 2px; background: var(--text);
  transition: all var(--transition); border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--gold); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 60px;
  background:
    radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.12), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(212, 175, 55, 0.06), transparent 50%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 3rem; align-items: center;
}
.hero-text h1 { margin: .5rem 0 1rem; }
.role { font-family: 'Poppins', sans-serif; font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 500; color: var(--muted); margin-bottom: 1.25rem; }
.cursor { color: var(--gold); animation: blink 1s infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--muted); max-width: 540px; margin-bottom: 2rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-image { display: flex; justify-content: center; }
.image-frame {
  position: relative;
  width: min(380px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--gold), transparent 60%, var(--gold));
  box-shadow: var(--shadow-gold);
}
.image-frame img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
}

/* ===== Sections ===== */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-sub { color: var(--muted); margin-top: .75rem; }

/* ===== About ===== */
.about-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.about-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.about-card:hover { transform: translateY(-5px); border-color: var(--gold); }
.about-card i { font-size: 2rem; color: var(--gold); margin-bottom: 1rem; }
.about-card h3 { margin-bottom: .5rem; }
.about-card p { color: var(--muted); font-size: .95rem; }

/* ===== Skills ===== */
.skills-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.skill-card {
  background: var(--surface);
  padding: 2rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.skill-card:hover { transform: translateY(-5px); border-color: var(--gold); background: var(--surface-2); }
.skill-card i { font-size: 2.5rem; color: var(--gold); margin-bottom: .75rem; }
.skill-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.skill-card p { font-size: .85rem; color: var(--muted); }

/* ===== Projects ===== */
.projects-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-8px); border-color: var(--gold); box-shadow: var(--shadow-gold); }
.project-image { aspect-ratio: 16/10; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-image img { transform: scale(1.05); }
.project-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.project-body p { color: var(--muted); font-size: .9rem; flex: 1; }
.tech-stack { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-stack span {
  font-size: .75rem; padding: .25rem .65rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; color: var(--gold-light);
}
.project-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }

/* ===== Services ===== */
.services-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.service-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
}
.service-card:hover { transform: translateY(-5px); border-color: var(--gold); background: var(--surface-2); }
.service-card i {
  font-size: 2rem; color: var(--gold);
  width: 64px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(212, 175, 55, 0.1);
  margin-bottom: 1rem;
}
.service-card h3 { margin-bottom: .5rem; }
.service-card p { font-size: .9rem; color: var(--muted); }

/* ===== Contact ===== */
.contact-wrap { text-align: center; }
.contact-actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem; margin: 2rem 0;
}
.socials { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.socials a {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.socials a:hover { background: var(--gold); color: #1a1a1a; transform: translateY(-3px); border-color: var(--gold); }
.socials.small a { width: 40px; height: 40px; font-size: 1rem; }

/* ===== Footer ===== */
.footer { background: var(--bg-alt); padding: 3rem 0 1.5rem; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}
.footer h4 { font-family: 'Poppins', sans-serif; font-size: 1rem; margin-bottom: 1rem; color: var(--gold); }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a; border: none;
  cursor: pointer; font-size: 1rem;
  box-shadow: var(--shadow-gold);
  opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 99;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: all .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { padding-top: 100px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text .lead { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-image { order: -1; }
  .image-frame { width: 240px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column;
    background: rgba(11, 11, 15, 0.98);
    backdrop-filter: blur(12px);
    padding: 2rem;
    gap: 1.25rem;
    transform: translateY(-150%);
    transition: transform var(--transition);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
