/* CSS Custom Properties (Variables) */
:root {
  --accent: #0066cc;
  --accent-light: #4da6ff;
  --muted: #5a6c7d;
  --bg: #f8faff;
  --card: #ffffff;
  --radius: 12px;
  --max-width: 1100px;
  --container-pad: 24px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #111;
  line-height: 1.5;
}

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

/* Header and Navigation */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(90deg, #ffffff, #f8faff);
  box-shadow: 0 1px 4px rgba(12, 12, 12, 0.05);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 12px;
}

.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
}

.mainnav a {
  text-decoration: none;
  color: inherit;
  padding: 6px 10px;
  border-radius: 8px;
}

.mainnav li.active a,
.mainnav a:hover {
  background: rgba(0, 102, 204, 0.1);
  color: var(--accent);
}

/* Card component */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0));
}

.card-icon {
  font-size: 1.25rem;
}

.card-title {
  margin: 0;
  font-size: 1.5rem;
}

.card-body {
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.advocacy-card {
  max-width: 980px; /* slightly wider */
  margin: 0 auto;
}

/* Bigger typography for Advocacy page */
.advocacy-card .card-header { padding: 1.25rem 1.5rem; }
.advocacy-card .card-title { font-size: 1.9rem; }
.advocacy-card .card-body { padding: 1.5rem; }
.advocacy-card .card-body p { font-size: 1.05rem; line-height: 1.8; }

@media (max-width: 640px) {
  .advocacy-card .card-title { font-size: 1.6rem; }
  .advocacy-card .card-body p { font-size: 1rem; line-height: 1.7; }
}

/* Certifications grid */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  gap: 1.25rem;
  margin-top: 1rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem; /* slightly bigger card */
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: default;
}

/* Show pointer when the certificate card is clickable */
.cert-card[data-pdf] { cursor: pointer; }

.cert-logo {
  width: 104px; /* larger logo */
  height: 104px;
  border-radius: 50%;
  background: #f5f7fb;
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: transform .25s ease;
}

.cert-logo img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.cert-name {
  font-size: 1.1rem; /* larger title */
  margin: 0.3rem 0 0.15rem;
  font-weight: 600;
}

.cert-meta {
  margin: 0;
  color: rgba(0,0,0,0.6);
  font-size: 1rem;
}

/* Certs grid responsiveness */
@media (max-width: 900px) {
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .certs-grid { grid-template-columns: 1fr; }
}

/* Skills logos grid */
.skills-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
  gap: 1.25rem;
  margin-top: 1rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem; /* slightly bigger card */
  transition: transform .2s ease, box-shadow .2s ease;
}

.skill-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #f5f7fb;
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 0.6rem;
  transition: transform .25s ease;
}

/* Hover/focus lift for skill and cert cards */
.skill-card:hover,
.skill-card:focus-within,
.cert-card:hover,
.cert-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.skill-card:hover .skill-logo,
.skill-card:focus-within .skill-logo,
.cert-card:hover .cert-logo,
.cert-card:focus-within .cert-logo {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .skill-card,
  .cert-card,
  .skill-logo,
  .cert-logo { transition: none !important; }
}

.skill-logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.skill-initials {
  display: none; /* shown as fallback inline via onerror or inline style */
  font-weight: 700;
  color: #334155; /* slate-700 */
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

.skill-name {
  font-size: 1.05rem; /* larger label */
  font-weight: 600;
}

/* Skills grid responsiveness */
@media (max-width: 900px) {
  .skills-logos { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .skills-logos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .skills-logos { grid-template-columns: 1fr; }
}

/* General notices */
.notice {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px dashed #f0c36d;
  background: #fff7e6;
  color: #8a6d3b;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

.u-upcase { text-transform: uppercase; }

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
  font-size: 1.1rem; /* enlarge overall table text */
  line-height: 1.6;
}
.table th,
.table td {
  padding: 1rem 1.25rem; /* increase cell padding */
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
}
.table thead th {
  background: rgba(0,0,0,0.03);
  text-align: left;
  font-size: 1.2rem; /* larger header text */
}
.table tbody tr:nth-child(even) td,
.table tbody tr:nth-child(even) th {
  background: rgba(0,0,0,0.015);
}

/* Table: logo column */
.table .col-logo { width: 45%; }
.table .table-logo {
  width: 72px;
}
.table .table-logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto;
  filter: saturate(0.9);
}

/* Education table: combined school column */
.table .school-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
  text-align: left;
}
.table .school-logo {
  width: 56px; /* larger school logos */
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}
.table .school-name {
  font-weight: 700;
  font-size: 1.05rem; /* slightly larger school name */
}

/* Reduce sizes a bit on smaller screens to avoid excessive scrolling */
@media (max-width: 640px) {
  .table { font-size: 1rem; }
  .table th, .table td { padding: 0.875rem 1rem; }
  .table thead th { font-size: 1.1rem; }
  .table .school-logo { width: 48px; height: 48px; }
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--accent);
  padding: 8px;
  border-radius: 8px;
}

.menu-toggle:hover {
  background: rgba(0, 102, 204, 0.1);
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 12px;
  top: 80px;
  width: 180px;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(15, 15, 15, 0.06);
  display: none;
  transition: all 0.3s ease;
  z-index: 40;
}

.sidebar.active {
  display: block;
}

.sidebar h3 {
  margin: 0 0 8px 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar a {
  display: block;
  padding: 6px 8px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 8px;
}

.sidebar a:hover {
  background: #e6f3ff;
  color: var(--accent);
}

/* Hero Section */
.hero {
  padding: 64px 0; /* a bit more breathing room */
  min-height: clamp(380px, 62vh, 700px); /* show more background image */
  background-size: cover;
  background-position: center;
  /* remove forced white text to allow natural contrast */
  color: inherit;
  /* make hero span the full width/top area */
  border-radius: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  /* remove dark overlay; use a light, subtle panel for readability */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(1.2) blur(2px);
  -webkit-backdrop-filter: saturate(1.2) blur(2px);
  color: #111;
  padding: 36px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 160px 1fr; /* widened for larger avatar */
  align-items: center;
  gap: 18px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1; /* sit above blur overlays */
}

/* Bottom fade overlay so the hero image appears to disappear into the page */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(80px, 18vh, 220px); /* only a band near the bottom */
  background: linear-gradient(to bottom, rgba(248,250,255,0) 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  border: 4px solid #ffffff;
  object-fit: cover;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

.subtitle {
  opacity: 0.95;
  margin-top: 4px;
}

/* Arrange hero content with CTA on the right */
.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: min-content;
  gap: 10px 16px;
  align-items: start;
}

.hero-content h1 { margin: 0; }

.hero-content .cta {
  grid-column: 2;
  grid-row: 1 / span 3; /* sit to the right of title/snippets/subtitle */
  align-self: start;
  justify-self: end;
  margin: 0;
  display: grid; /* stack buttons vertically */
  gap: 8px;
}

.hero-content .cta .btn { margin: 0; display: inline-block; }
.hero-content .cta .btn + .btn { margin-left: 0; }

/* Small descriptive chips under the name */
.snippets {
  list-style: none;
  padding: 0;
  margin: 6px 0 2px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.snippets li {
  font-size: 0.85rem;
  color: #0f172a; /* slate-900 */
  background: #eef6ff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 6px 10px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  margin: 6px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--accent-light);
}

/* Ghost button tuned for light panel inside hero */
.hero .btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid rgba(0, 102, 204, 0.5);
}

.hero .btn.ghost:hover {
  background: rgba(0, 102, 204, 0.08);
  border-color: var(--accent);
}

/* Bio and Cards */
.bio {
  margin-top: 18px;
}

.quick-info {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  gap: 24px;
}

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

.card {
  background: var(--card);
  padding: 14px;
  border-radius: 12px;
  flex: 1;
  box-shadow: 0 6px 20px rgba(12, 12, 12, 0.04);
}

.page {
  margin: 20px auto;
  max-width: var(--max-width);
  padding: 20px;
  background: transparent;
}

.timeline-item {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(12, 12, 12, 0.04);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.meter {
  background: #e6f3ff;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 999px;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.project {
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(12, 12, 12, 0.04);
  text-align: center;
}

.project img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* Footer */
.footer {
  margin-top: 30px;
  padding: 12px 0;
  background: transparent;
  text-align: center;
  color: var(--muted);
}

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 100; }
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; background: #fff; color: #111; width: min(520px, 92vw); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; }
.modal-header { display:flex; align-items:center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.modal-body { padding: 16px; }
.modal-close { background: transparent; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* Responsive Design */
@media (max-width: 900px) {
  .hero-inner {
    padding: 24px;
  }
  
  .sidebar {
    left: 8px;
    width: 200px;
  }

  .mainnav ul {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
}

/* Extra-small screens readability for hero */
@media (max-width: 640px) {
  .hero { padding: 48px 0; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .avatar { margin: 0 auto 12px; width: 140px; height: 140px; }
  .hero-content { display: block; }
  .hero-content .cta { margin-top: 12px; text-align: center; }
}
