/* Global styles */
:root {
  --color-base: #ffffff;
  --color-accent: #1F3A93;
  /* navy */
  --color-secondary: #E8DCC3;
  /* warm beige */
  --color-highlight: #6AA7C3;
  /* muted teal */
  --color-ink: #0f172a;
  --color-muted: #6b7280;
  --color-key: #EDEAE3;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-tooltip: 0 4px 10px rgba(0, 0, 0, .1);
  --tooltip-padding: 0.35rem 0.6rem;
  --tooltip-font-size: 0.8rem;
  --timeline-cert-gap: 50px;
}

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

body {
  font-family: var(--font-body);
  color: #333;
  background-color: var(--color-base);
  line-height: 1.6;
}

/* Hero section */
.hero {
  background-color: var(--color-secondary);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.hero .logo {
  width: 120px;
  height: auto;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.tagline {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.cta-button {
  background-color: var(--color-accent);
  color: var(--color-base);
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s;
}

.cta-button:hover {
  background-color: var(--color-highlight);
}

/* Navigation */

/* Container to align logo + links */
.navbar .nav-container {
  display: flex;
  align-items: center;
  /* vertically center */
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.navbar {
  background-color: var(--color-base);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  /* spacing between items */
  margin: 0;
  /* remove default margins */
  padding: 0;
  /* remove default padding */
}

.nav-links a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--color-highlight);
}

/* Logo */
.nav-logo img {
  width: 60px;
  /* 60–80px keeps bar compact */
  height: auto;
  display: block;
  /* removes inline gap */
}

/* Sections */
.section {
  padding: 4rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
  position: relative;
}

.section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--color-highlight);
  margin-top: 0.5rem;
}

.section p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background-color: var(--color-secondary);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Responsive layout */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }

  .tagline {
    font-size: 1.4rem;
  }

  .section h2 {
    font-size: 2.4rem;
  }
}

.headshot {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem auto;
}
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  overflow: visible; /* allow tooltips to escape the grid cells */
}

/* Uniform, edge-to-edge cards with light shadow */
.logo-item {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(31,58,147,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  padding: 16px;
  aspect-ratio: 5 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;          /* keep tooltips visible */
  transition: box-shadow .2s ease, transform .15s ease;
  z-index: 0;                 /* baseline for stacking */
}

.logo-item:hover,
.logo-item:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  z-index: 100;               /* lift above neighbors so tooltip sits on top */
}

/* Logos fill the cell; unify colors toward grey */
.logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* shows full logo, no squish */
  display: block;

  /* desaturate + normalize brightness/contrast */
  filter: grayscale(90%) brightness(0.9) contrast(110%);
  transition: filter .2s ease, opacity .2s ease;
}

/* Optional: reveal brand colour on hover/focus (remove if you want constant grey) */
.logo-item:hover img,
.logo-item:focus-within img {
  filter: grayscale(30%) brightness(1) contrast(105%);
}

/* Tooltip */
.logo-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: var(--color-accent);
  color: var(--color-base);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 200;               /* inside the card’s stacking context */
}

/* Show tooltip on hover and keyboard focus */
.logo-item:hover::after,
.logo-item:focus::after,
.logo-item:focus-within::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Optional accessible focus ring for keyboard users */
.logo-item:focus {
  outline: 2px sol
}

/* Contact actions row */
.contact-actions{
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
  align-items:center;
}

/* Icon buttons */
.contact-btn{
  --btn-size: 56px;
  width:var(--btn-size);
  height:var(--btn-size);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--color-base);
  color:var(--color-accent);
  border:1px solid rgba(31,58,147,0.08);
  border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition:transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  position:relative;
}

.contact-btn .icon{
  width:24px; height:24px;
  fill:currentColor;
  transition:transform .15s ease;
}

.contact-btn:hover,
.contact-btn:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  background:var(--color-accent);
  color:var(--color-base);
}

/* Tooltip */
.contact-btn::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  transform:translateX(-50%) translateY(4px);
  background:var(--color-accent);
  color:var(--color-base);
  font-size:.85rem; line-height:1;
  padding:.35rem .6rem;
  border-radius:6px;
  white-space:nowrap;
  box-shadow:0 4px 10px rgba(0,0,0,.1);
  opacity:0; pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  z-index:10;
}

.contact-btn:hover::after,
.contact-btn:focus-visible::after{
  opacity:1; transform:translateX(-50%) translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .contact-btn{ transition:none; }
  .contact-btn:hover, .contact-btn:focus-visible{ transform:none; }
}

/* Space below the grid so tooltips/cards don’t crowd the CTA */
.experience .logo-grid {
  margin-bottom: 1.5rem;
}

/* Center the CTA and add top padding */
.experience-cta {
  display: flex;
  justify-content: center;
  padding-top: 1rem;          /* increase if you want more separation */
}

/* Button styling consistent with your palette */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(31,58,147,.12);
  background: var(--color-base);
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  background: var(--color-accent);
  color: var(--color-base);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cta-button { transition: none; }
}
