/* ==========================================================================
   JOSUE CATARINO SEBASTIAO MARTINS — EXECUTIVE PORTFOLIO
   Strict Monochromatic Palette: Dark Grey, Light Grey, White
   ========================================================================== */

:root {
  /* Dark Grey Shades (Backgrounds & Surfaces) */
  --bg-deep: #090a0c;
  --bg-base: #0f1114;
  --bg-surface: #15181c;
  --bg-card: #191c21;
  --bg-card-hover: #22262d;
  --bg-elevated: #282d36;
  --bg-subtle: #1c2026;
  
  /* Light Grey & Mid Grey Shades */
  --grey-900: #1a1e24;
  --grey-800: #2b313a;
  --grey-700: #3f4754;
  --grey-600: #596373;
  --grey-500: #7b8698;
  --grey-400: #9da7b7;
  --grey-300: #c1c8d4;
  --grey-200: #dde2ea;
  --grey-100: #eef1f5;
  --grey-50:  #f8f9fa;
  
  /* Text Tokens */
  --text-white: #ffffff;
  --text-light: #eef1f5;
  --text-secondary: #c1c8d4;
  --text-muted: #8e98a8;
  --text-dark: #0f1114;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.16);
  --border-highlight: rgba(255, 255, 255, 0.32);
  --border-strong: rgba(255, 255, 255, 0.6);
  --border-solid-light: #474f5c;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 24px rgba(255, 255, 255, 0.06);

  /* Transitions & Radii */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  background-color: var(--bg-deep);
  color: var(--text-light);
  overflow-x: hidden;
  position: relative;
}

/* Subtle Greyscale Background Ambient Grid */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

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

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

button, input, textarea, select {
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
.title-lg {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-white);
}

.title-md {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
}

.title-sm {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-white);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   TOP ANNOUNCEMENT BAR
   ========================================================================== */
.top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 101;
}

.top-bar-ticker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
  white-space: nowrap;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--text-white);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  display: inline-block;
}

.top-bar-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.top-bar-links a {
  color: var(--grey-300);
  font-weight: 500;
}

.top-bar-links a:hover {
  color: var(--text-white);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(15, 17, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: all var(--transition-fast);
}

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

.brand-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-white);
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--grey-400);
  letter-spacing: 0.12em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--grey-300);
  padding: 0.35rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-white);
  transition: width var(--transition-normal);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--text-white);
  color: var(--bg-deep);
  border-color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--grey-200);
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-white);
  border-color: var(--border-mid);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-highlight);
  color: var(--text-white);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--border-mid);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-white);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.85rem 1.65rem;
  font-size: 0.95rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-white);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--grey-200);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.hero-name {
  margin-bottom: 0.85rem;
}

.hero-subtitle-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--grey-300);
}

.hero-subtitle-bar span.role-tag {
  color: var(--text-white);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--grey-300);
  margin-bottom: 2rem;
  max-width: 650px;
}

.hero-metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1.5rem;
  margin-bottom: 2.25rem;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--grey-300);
}

.meta-icon {
  width: 16px;
  height: 16px;
  stroke: var(--grey-400);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Hero Portrait Card */
.hero-portrait-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: center;
}

.portrait-image-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.portrait-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
}

.portrait-badge-overlay {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 10, 12, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-mid);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-white);
  white-space: nowrap;
}

.portrait-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.2rem;
}

.portrait-title {
  font-size: 0.8rem;
  color: var(--grey-400);
  margin-bottom: 1.25rem;
}

.verified-certs-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.cert-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-white);
}

.portrait-contact-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--grey-300);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--grey-200);
  color: var(--bg-deep);
  border-color: var(--text-white);
}

/* ==========================================================================
   METRICS & KPI STRIP
   ========================================================================== */
.metrics-section {
  padding: 3rem 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  padding-right: 1.25rem;
}

.metric-item:last-child {
  border-right: none;
  padding-right: 0;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-white);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.metric-label {
  font-size: 0.76rem;
  color: var(--grey-400);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   SECTION COMMON HEADERS
   ========================================================================== */
.section {
  padding: 5rem 0;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-bottom: 0.65rem;
  display: block;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--grey-300);
  margin-top: 0.85rem;
  max-width: 720px;
  line-height: 1.7;
}

/* ==========================================================================
   THE 3 STRATEGIC PILLARS (MAPPED DIRECTLY TO 3 WORKSPACE FOLDERS)
   ========================================================================== */
.pillars-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.pillar-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--grey-400);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pillar-tab-btn:hover {
  color: var(--text-white);
  background: var(--bg-card);
}

.pillar-tab-btn.active {
  color: var(--bg-deep);
  background: var(--text-white);
  border-color: var(--text-white);
}

.pillar-tab-btn .tab-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.8;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card);
}

.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--text-white), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-header {
  margin-bottom: 1.5rem;
}

.pillar-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grey-400);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.pillar-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.75rem;
}

.pillar-lead {
  font-size: 0.9rem;
  color: var(--grey-300);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pillar-spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.pillar-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--grey-300);
  line-height: 1.5;
}

.spec-bullet {
  width: 5px;
  height: 5px;
  background-color: var(--grey-300);
  border-radius: 50%;
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.mono-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--grey-300);
}

.pillar-footer {
  margin-top: auto;
}

/* ==========================================================================
   FLAGSHIP PROJECT SHOWCASE (18+ PROJECTS, FILTERABLE)
   ========================================================================== */
.projects-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  align-items: center;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--grey-300);
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text-white);
  background: var(--bg-card);
}

.filter-btn.active {
  background: var(--text-white);
  color: var(--bg-deep);
  border-color: var(--text-white);
  font-weight: 700;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.project-card.hidden {
  display: none !important;
}

.project-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--grey-400);
}

.project-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-role-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.72rem;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--grey-300);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.stack-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--grey-300);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.project-impact {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   PROFESSIONAL EXPERIENCE TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-entry {
  position: relative;
  padding-left: 55px;
  margin-bottom: 3.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--text-white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-300);
}

.timeline-date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--grey-300);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--grey-400);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timeline-bullet {
  font-size: 0.88rem;
  color: var(--grey-300);
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullet::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--grey-400);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* ==========================================================================
   SKILLS, PROTOCOLS & GOVERNANCE MATRIX
   ========================================================================== */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.matrix-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.matrix-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card);
}

.matrix-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matrix-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.matrix-item {
  font-size: 0.82rem;
  color: var(--grey-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.matrix-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  color: var(--grey-300);
}

/* ==========================================================================
   PUBLICATIONS, RESEARCH & DISCOVERY
   ========================================================================== */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.pub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.pub-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card);
}

.pub-type {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.pub-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.pub-desc {
  font-size: 0.88rem;
  color: var(--grey-300);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.pub-badge-special {
  background: var(--text-white);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   CREDENTIALS & CERTIFICATION VERIFICATION
   ========================================================================== */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.credential-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.credential-card:hover {
  border-color: var(--text-white);
  background: var(--bg-card);
}

.credential-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.credential-issuer {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--grey-400);
}

.verified-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-white);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.credential-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.credential-id {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--grey-300);
  margin-bottom: 0.25rem;
}

.credential-cycle {
  font-size: 0.75rem;
  color: var(--grey-400);
  margin-bottom: 1rem;
}

/* ==========================================================================
   ACADEMIC & LANGUAGES
   ========================================================================== */
.edu-lang-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.edu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.edu-item {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.edu-degree {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.edu-institution {
  font-size: 0.88rem;
  color: var(--grey-300);
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.lang-name {
  font-weight: 600;
  color: var(--text-white);
  font-size: 0.9rem;
}

.lang-level {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--grey-300);
}

/* ==========================================================================
   EXECUTIVE DOSSIER / DOWNLOADS STRIP
   ========================================================================== */
.dossier-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin: 3rem auto;
  box-shadow: var(--shadow-lg);
}

.dossier-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.dossier-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.75rem;
}

.dossier-desc {
  font-size: 0.95rem;
  color: var(--grey-300);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.dossier-files-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dossier-file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.dossier-file-link:hover {
  background: var(--text-white);
  color: var(--bg-deep);
  border-color: var(--text-white);
  transform: translateX(4px);
}

.dossier-file-link span.file-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.75;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
}

.contact-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-channel:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.channel-icon {
  width: 22px;
  height: 22px;
  stroke: var(--grey-300);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.channel-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  margin-bottom: 0.25rem;
}

.channel-val {
  font-size: 0.95rem;
  color: var(--text-white);
  font-weight: 600;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--grey-300);
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: 0.75rem;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--text-white);
  color: var(--bg-deep);
}

.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-300);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--text-white);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  padding: 1.5rem;
}

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

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--grey-300);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--text-white);
  color: var(--bg-deep);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-white);
  color: var(--bg-deep);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  font-size: 0.85rem;
  color: var(--grey-400);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a:hover {
  color: var(--text-white);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-portrait-card {
    max-width: 480px;
    margin: 0 auto;
  }
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .metric-item:nth-child(3) {
    border-right: none;
  }
  .pillar-grid {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .credentials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .edu-lang-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .dossier-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-mid);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  .credentials-grid {
    grid-template-columns: 1fr;
  }
  .publications-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-item {
    border-right: none;
  }
  .hero-metadata-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PRINT STYLESHEET (For saving as a clean PDF dossier)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #111111 !important;
  }
  body::before, .top-bar, .navbar, .projects-filter-bar, .contact-form, .modal-overlay, .toast, .footer {
    display: none !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .pillar-card, .project-card, .timeline-card, .matrix-card, .credential-card {
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .title-lg, .title-md, .title-sm, .timeline-role, .pillar-card-title, .project-title {
    color: #000000 !important;
  }
  .text-muted, .text-secondary, .timeline-bullet, .project-desc {
    color: #444444 !important;
  }
}
