/* ============================================================
   RUBÉN RUMIPAMBA – Professional Portfolio
   Design: Corporate Minimalist | Light Mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --navy:       #0f2557;
  --navy-mid:   #1a3a7a;
  --accent:     #1e50d2;
  --accent-lt:  #d0deff;
  --bg:         #f7f8fc;
  --white:      #ffffff;
  --gray-50:    #f1f3f8;
  --gray-100:   #e4e8f2;
  --gray-300:   #bec7db;
  --gray-500:   #6b7a9b;
  --gray-700:   #374160;
  --gray-900:   #111827;
  --border:     #dde2ef;
  --shadow-sm:  0 1px 4px rgba(15,37,87,.07);
  --shadow-md:  0 4px 18px rgba(15,37,87,.10);
  --shadow-lg:  0 12px 40px rgba(15,37,87,.14);
  --radius:     10px;
  --radius-lg:  18px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --transition:  0.28s cubic-bezier(.4,0,.2,1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--gray-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* ── TYPOGRAPHY ── */
.display-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
}
h1.display-title { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}
h3.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
p.lead {
  font-size: 1.1rem;
  color: var(--gray-700);
  font-weight: 300;
  line-height: 1.75;
}
.label-sm {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── LAYOUT ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── NAVIGATION ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
  letter-spacing: -.01em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-size: .86rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--gray-700);
  padding: 7px 13px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy);
  background: var(--accent-lt);
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  font-size: .78rem;
}
.lang-btn button {
  padding: 4px 11px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-500);
  transition: background var(--transition), color var(--transition);
}
.lang-btn button.active {
  background: var(--navy);
  color: #fff;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .92rem;
  transition: all var(--transition);
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-mid); box-shadow: 0 6px 20px rgba(15,37,87,.25); transform: translateY(-1px); }
.btn-outline {
  border: 1.5px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: .82rem; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--navy); box-shadow: 0 6px 20px rgba(30,80,210,.3); transform: translateY(-1px); }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--gray-300);
}

/* ── TAGS / BADGES ── */
.tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tag-navy   { background: var(--navy); color: #fff; }
.tag-accent { background: var(--accent-lt); color: var(--accent); }
.tag-gray   { background: var(--gray-50); color: var(--gray-700); border: 1px solid var(--border); }
.tag-q1     { background: #e6f4ea; color: #1a7340; }
.tag-q2     { background: #fff3e0; color: #b36800; }

/* ── SECTION HEADER ── */
.section-header {
  margin-bottom: 52px;
}
.section-header .label-sm { margin-bottom: 10px; display: block; }
.section-header p {
  margin-top: 14px;
  color: var(--gray-500);
  max-width: 560px;
  font-size: .97rem;
}
.divider {
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 14px;
}

/* ── HERO STRIP ── */
.hero-strip {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a7a 100%);
  color: white;
  padding: 20px 0;
}
.hero-strip-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-strip span { font-size: .82rem; opacity: .7; }
.hero-strip strong { font-size: .85rem; }

/* ── TIMELINE ── */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 36px;
  position: relative;
}
.timeline-dot {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.timeline-body { flex: 1; padding-top: 8px; }
.timeline-date {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-company {
  font-size: .85rem;
  color: var(--gray-500);
  margin-top: 2px;
  font-style: italic;
}
.timeline-desc {
  margin-top: 10px;
  color: var(--gray-700);
  font-size: .93rem;
}
.timeline-desc li { padding: 3px 0 3px 14px; position: relative; }
.timeline-desc li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── SKILLS BAR ── */
.skill-bar-wrap { margin-bottom: 18px; }
.skill-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: .9rem;
  font-weight: 500;
}
.skill-bar-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  width: 0%;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ── TABLE ── */
.pub-table-wrap { overflow-x: auto; }
.pub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}
.pub-table th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pub-table th:first-child { border-radius: 8px 0 0 0; }
.pub-table th:last-child  { border-radius: 0 8px 0 0; }
.pub-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--gray-700);
}
.pub-table tr:hover td { background: var(--gray-50); }
.pub-table td a { color: var(--accent); font-weight: 500; }
.pub-table td a:hover { color: var(--navy); text-decoration: underline; }

/* ── BLOG CARDS ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.blog-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.blog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.blog-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card-category { font-size: .73rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 10px;
}
.blog-card-excerpt { font-size: .88rem; color: var(--gray-500); flex: 1; margin-bottom: 18px; line-height: 1.6; }
.blog-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--gray-500); border-top: 1px solid var(--border); padding-top: 14px; }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all var(--transition);
  background: var(--white);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── CONTACT ── */
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-size: .86rem; font-weight: 500; color: var(--gray-700); margin-bottom: 7px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .93rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,80,210,.1); }
textarea.form-control { resize: vertical; min-height: 130px; }

/* ── FOOTER ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding: 40px 0 28px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.footer-copy {
  font-size: .8rem;
  margin-top: 6px;
  color: rgba(255,255,255,.5);
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; }
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.social-icon:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3d8a 100%);
  color: white;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.025);
}
.page-hero .label-sm { color: rgba(255,255,255,.6); margin-bottom: 12px; display: block; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { color: rgba(255,255,255,.75); margin-top: 14px; font-size: 1.05rem; max-width: 520px; }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform .3s;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 1.2rem;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}
.modal-close:hover { background: var(--gray-50); color: var(--gray-900); }
.modal-body { padding: 24px 28px; }

/* ── STATS ROW ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-number span { color: var(--accent); }
.stat-label { font-size: .82rem; color: var(--gray-500); margin-top: 6px; }

/* ── CERT GRID ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cert-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.cert-item:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.cert-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.cert-name { font-size: .9rem; font-weight: 500; color: var(--navy); }
.cert-org  { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }

/* ── PUB ILLUSTRATION ── */
.pub-illustration {
  height: 90px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

/* ── MOBILE NAV DRAWER ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 850;
  background: rgba(10,20,50,.5);
}
.mobile-menu.open { display: block; }
.mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--white);
  padding: 80px 28px 28px;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up  { animation: fadeInUp .65s ease both; }
.animate-fade     { animation: fadeIn .65s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .22s; }
.delay-3 { animation-delay: .34s; }
.delay-4 { animation-delay: .46s; }
.delay-5 { animation-delay: .58s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 56px 0; }
  .timeline::before { left: 18px; }
  .timeline-dot { width: 38px; height: 38px; font-size: 1rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
}
