/* ============================================================
   RESET & ROOT
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Blue palette */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  /* Neutrals */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white:    #ffffff;

  /* Semantic */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted:     var(--gray-400);
  --border:         var(--gray-200);
  --bg:             var(--gray-50);

  /* Type */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 880px;
}

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

body {
  font-family: var(--sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   NAV
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-brand {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-700);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue-600);
  font-weight: 500;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  color: var(--blue-600);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 2rem;
  font-weight: 400;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--border);
}

.pill.blue {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--blue-200);
}

@keyframes pillGlow {
  0%   { box-shadow: 0 0 0px rgba(37, 99, 235, 0); border-color: var(--blue-200); }
  50%  { box-shadow: 0 0 8px rgba(37, 99, 235, 0.18), 0 0 2px rgba(37, 99, 235, 0.08); border-color: var(--blue-400); }
  100% { box-shadow: 0 0 0px rgba(37, 99, 235, 0); border-color: var(--blue-200); }
}

.pill.glowing {
  animation: pillGlow 2.8s ease forwards;
}


/* ============================================================
   DIVIDER
   ============================================================ */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}


/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem;
}


.cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.cert-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.cert-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cert {
  font-size: 0.78rem;
  font-weight: 400;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  cursor: default;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cert:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--blue-200);
}


/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 2rem;
}

.section-number {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.section-heading {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.section-lead {
  font-size: 0.975rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}


/* ============================================================
   CARDS
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--blue-200);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.07);
  transform: translateY(-2px);
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue-600);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-700);
  letter-spacing: 0.01em;
}

.card-badge.gray {
  background: var(--gray-100);
  color: var(--gray-700);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.chip {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

/* Full-width card */
.card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  background: var(--blue-50);
  border-color: var(--blue-100);
}

.card-wide:hover {
  border-color: var(--blue-300);
}

.card-wide h3 {
  font-size: 1.05rem;
}


/* ============================================================
   WHY IEM BAND
   ============================================================ */
.iem-band {
  background: var(--blue-800);
  padding: 5rem 2rem;
  margin-top: 1rem;
}

.iem-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.iem-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.iem-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.75rem;
  line-height: 1.2;
}

.iem-body {
  font-size: 0.975rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 600px;
  line-height: 1.9;
  margin-bottom: 1rem;
}

.iem-body strong {
  color: var(--white);
  font-weight: 600;
}

.iem-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  min-width: 130px;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}


/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--blue-100);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 2rem;
}

.t-item {
  position: relative;
}

.t-item::before {
  content: '';
  position: absolute;
  left: -1.625rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--blue-500);
}

.t-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-500);
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
}

.t-org {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--gray-900);
}

.t-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.t-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
}


/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.skill-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skill-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-item {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  cursor: default;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.skill-item:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--blue-200);
}


/* ============================================================
   CLOSING / CONTACT
   ============================================================ */
.closing-band {
  background: var(--blue-800);
  padding: 5rem 2rem;
  max-width: 100%;
}

.closing-band .section-number {
  color: rgba(255, 255, 255, 0.5);
}

.closing-band .section-heading {
  color: var(--white);
}

.closing-band .section-lead {
  color: rgba(255, 255, 255, 0.72);
  max-width: 540px;
}

.closing-band .contact-grid {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.closing-band .contact-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.closing-band .contact-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.closing-band .contact-label {
  color: rgba(255, 255, 255, 0.5);
}

.closing-band .contact-value {
  color: var(--white);
}

.closing-band .card-icon {
  background: rgba(255, 255, 255, 0.1);
}

.closing-band .card-icon svg {
  stroke: rgba(255, 255, 255, 0.8);
}

.closing-band .section-number,
.closing-band .section-heading,
.closing-band .section-lead {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.contact-card:hover {
  border-color: var(--blue-200);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.07);
  transform: translateY(-2px);
}

.contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blue-600);
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--white);
}

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

footer a {
  color: var(--blue-600);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Fade-up on scroll */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
}

.fade-up.visible {
  animation: fadeUp 0.5s ease forwards;
}

/* Staggered hero entrance */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-kicker {
  animation: fadeIn 0.4s ease 0.1s both;
}

.hero h1 {
  animation: fadeIn 0.4s ease 0.2s both;
}

.hero-lead {
  animation: fadeIn 0.4s ease 0.3s both;
}

.hero .pill-row {
  animation: fadeIn 0.4s ease 0.4s both;
}

/* Nav link underline slide */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-500);
  border-radius: 2px;
  transition: width 0.2s ease;
}

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

/* Card icon subtle scale on card hover */
.card:hover .card-icon {
  background: var(--blue-100);
  transition: background 0.2s ease;
}

.card-icon {
  transition: background 0.2s ease;
}

/* Card icon svg color transition */
.card:hover .card-icon svg {
  stroke: var(--blue-700);
  transition: stroke 0.2s ease;
}

.card-icon svg {
  transition: stroke 0.2s ease;
}

/* Timeline item hover */
.t-item {
  transition: padding-left 0.2s ease;
  cursor: default;
}

.t-item:hover {
  padding-left: 0.75rem;
}

.t-item:hover .t-org {
  color: var(--blue-700);
  transition: color 0.2s ease;
}

.t-org {
  transition: color 0.2s ease;
}

/* Cert group hover */
.cert-group {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cert-group:hover {
  border-color: var(--blue-200);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

/* Skill group hover */
.skill-group {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.skill-group:hover {
  border-color: var(--blue-200);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}


/* ============================================================
   MOBILE NAV
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0 1.25rem;
  }

  .nav-brand {
    height: 60px;
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid var(--border);
  }

  nav.open .nav-links {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.65rem 0.25rem;
    font-size: 0.9rem;
  }

  .nav-links a::after {
    display: none;
  }

  .card-wide { grid-template-columns: 1fr; gap: 1.5rem; }
}
