/* ============================================
   Jerry W. Lambert Sr. - Personal Site
   ============================================ */

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

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #0f1523;
  --bg-card: #151d2e;
  --bg-card-hover: #1a2540;
  --accent: #6366f1;
  --accent-bright: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.12);
  --accent-warm: #f59e0b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-accent: rgba(99, 102, 241, 0.25);
  --gradient-main: linear-gradient(135deg, #6366f1, #a855f7);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --section-pad: 96px;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

a { color: var(--accent-bright); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-primary); }

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 5px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  background: var(--accent-glow);
}

.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }

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

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s;
}

.nav.scrolled {
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

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

.nav-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  padding: 8px 20px !important;
  background: var(--accent) !important;
  color: white !important;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-bright) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 var(--section-pad);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 { margin-bottom: 20px; }
.hero h1 small {
  display: block;
  font-size: 0.4em;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-top: 8px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  color: white;
}

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

.hero-quick-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.quick-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.quick-stat-value span { color: var(--accent); }
.quick-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.hero-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.headshot {
  width: 280px;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  border: 3px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(99, 102, 241, 0.08);
}

.hero-card-roles-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 280px;
}

.hero-card-roles-mini span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-bright);
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
}

/* --- Avatar --- */
.avatar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.avatar-img {
  width: 100%;
  border-radius: 12px;
}

/* --- Career Timeline --- */
.timeline {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

.timeline-list {
  position: relative;
  padding-left: 32px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 24px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
  z-index: 1;
}

.timeline-item.current::before {
  background: var(--accent-warm);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.timeline-dates {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.timeline-item.current .timeline-dates { color: var(--accent-warm); }

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.timeline-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-highlights li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.timeline-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--border);
  border-radius: 50%;
}

/* --- Competencies --- */
.competencies {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
}

.competency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.competency-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  transition: all 0.3s;
}

.competency-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.competency-icon { font-size: 1.5rem; margin-bottom: 16px; }

.competency-card h3 { margin-bottom: 12px; font-size: 1.05rem; }

.competency-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.competency-tags li {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  color: var(--accent-bright);
  font-weight: 500;
}

/* --- Achievements --- */
.achievements {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.achievement {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
}

.achievement:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.achievement-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.achievement-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

/* --- Testimonials --- */
.testimonials {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.testimonials::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Featured testimonial */
.testimonial-featured {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.testimonial-featured-quote {
  background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.06));
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  padding: 48px 56px;
  position: relative;
}

.quote-mark {
  font-size: 5rem;
  line-height: 1;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: absolute;
  top: 20px;
  left: 40px;
  opacity: 0.3;
}

.testimonial-featured-quote p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.testimonial-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.testimonial-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Testimonial grid */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.testimonial-card-quote {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  flex: 1;
  margin-bottom: 20px;
}

.testimonial-card .testimonial-author {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testimonial-card .testimonial-name { font-size: 0.88rem; }
.testimonial-card .testimonial-title { font-size: 0.75rem; }

/* --- Inline Testimonial Callouts --- */
.inline-testimonial {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.04));
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 32px 0;
  position: relative;
}

.inline-testimonial p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.inline-testimonial .inline-testimonial-attr {
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
  color: var(--accent-bright);
  margin-top: 12px;
}

.inline-testimonial .inline-testimonial-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: normal;
}

/* --- Education --- */
.education {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 560px;
  margin: 0 auto;
}

.education-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.education-card h3 {
  margin-bottom: 4px;
}

.education-field {
  font-size: 0.95rem;
  color: var(--accent-bright);
  font-weight: 500;
  margin-bottom: 4px;
}

.education-school {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.education-years {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Patents --- */
.patents {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
}

.patents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.patent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.patent-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.patent-card h3 { margin-bottom: 4px; }
.patent-card .patent-number {
  font-size: 0.82rem;
  color: var(--accent-bright);
  font-weight: 600;
  font-family: monospace;
}
.patent-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

/* --- Contact --- */
.contact {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

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

.contact-items { display: flex; flex-direction: column; gap: 24px; }

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

.contact-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-item h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.contact-item p { font-size: 0.88rem; color: var(--text-secondary); }

.download-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  text-align: center;
}

.download-section h3 { margin-bottom: 8px; }
.download-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

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

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

.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text-primary); }

/* --- Referral More Link --- */
.ref-more {
  color: var(--accent-bright);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85em;
  cursor: pointer;
  white-space: nowrap;
}
.ref-more:hover { color: var(--text-primary); text-decoration: underline; }

/* --- Referral Modal --- */
.ref-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ref-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ref-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  padding: 48px;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(99, 102, 241, 0.08);
}

.ref-modal-overlay.active .ref-modal {
  transform: translateY(0) scale(1);
}

.ref-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 4px 8px;
}
.ref-modal-close:hover { color: var(--text-primary); }

.ref-modal-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.ref-modal-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ref-modal-title {
  font-size: 0.9rem;
  color: var(--accent-bright);
  margin-top: 4px;
  line-height: 1.5;
}

.ref-modal-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.ref-modal-quote {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  font-style: italic;
}

@media (max-width: 768px) {
  .ref-modal { padding: 32px 24px; }
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-photo { flex-direction: row; align-items: center; gap: 24px; }
  .headshot { width: 180px; height: 180px; }
  .competency-grid { grid-template-columns: repeat(2, 1fr); }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-featured-quote { padding: 36px 32px; }
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(11, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }

  .competency-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial-featured-quote { padding: 28px 24px; }
  .quote-mark { font-size: 3rem; top: 10px; left: 20px; }
  .patents-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-quick-stats { flex-wrap: wrap; gap: 24px; }

  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .achievements-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
