/* ==========================================================================
   Credentials: education, certifications, languages  (section.creds)
   Self-contained; uses the Navy & Electric Blue tokens from theme.css.
   ========================================================================== */

.creds {
  position: relative;
  width: 100%;
  padding: 0 1.25rem 6rem;
  font-family: var(--read);
  color: var(--ink);
}
.creds *, .creds *::before, .creds *::after { box-sizing: border-box; }
.creds-inner { max-width: 1100px; margin: 0 auto; display: grid; gap: 2.5rem; }

/* group label: "Education  ———— 02" */
.creds-group { display: grid; gap: 1rem; }
.creds-label {
  display: flex; align-items: center; gap: .9rem;
  margin: 0; font-size: .78rem; font-weight: 600; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.creds-label::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 1; }
.creds-label .creds-count { order: 2; font-variant-numeric: tabular-nums; color: var(--accent1); letter-spacing: .06em; }

/* grids */
.creds-edu  { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.creds-cert { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.creds-edu, .creds-cert { list-style: none; margin: 0; padding: 0; }

/* card */
.cred {
  position: relative;
  display: flex; gap: 1rem; align-items: flex-start;
  height: 100%;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.cred::before { /* hairline accent that draws in on hover */
  content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: -1px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent1), var(--accent4));
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.creds-cert .cred { flex-direction: column; gap: .9rem; }

/* logo tile */
.cred-logo {
  flex: none;
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem;
  border-radius: .8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cred-logo img { display: block; width: 78%; height: 78%; object-fit: contain; transition: filter .35s ease, opacity .35s ease; }
.cred-logo--wide { width: 4.75rem; }
.cred-logo--wide img { width: 84%; }
.creds-edu .cred-logo { width: 4.25rem; height: 4.25rem; }
.creds-edu .cred-logo--wide { width: 5.5rem; }
/* two marks in one tile (e.g. OpenAI + LangChain) */
.cred-logo--pair { width: 4.75rem; display: flex; align-items: center; justify-content: center; gap: .55rem; }
.cred-logo--pair img { width: 1.35rem; height: 1.35rem; }
.cred-logo--wide img[src$="sap.svg"] { width: 70%; }
/* neutral glyph when no entity logo applies */
.cred-logo--glyph { background: var(--accent2); border-color: #D3E1FC; color: var(--accent1); }
.cred-logo--glyph svg { width: 1.45rem; height: 1.45rem; }

.cred-body { min-width: 0; display: grid; gap: .3rem; }
.creds .cred-title {
  margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.35;
  letter-spacing: -.01em; color: var(--ink);
}
.creds-edu .cred-title { font-size: 1.075rem; }
.creds .cred-meta { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--ink-3); }
.creds .cred-meta b { font-weight: 600; color: var(--ink-2); }

/* footer row of the card: tag + link */
.cred-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.creds-cert .cred-body { flex: 1; align-content: start; }
.cred-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; line-height: 1; letter-spacing: .02em;
  background: var(--bg2); color: var(--ink-2);
}
.cred-tag--live { background: var(--accent3); color: #0F6B61; }
.cred-tag--live::before {
  content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: var(--accent4);
  box-shadow: 0 0 0 0 rgba(20,184,166,.55); animation: cred-pulse 2.4s ease-out infinite;
}
@keyframes cred-pulse { 0% { box-shadow: 0 0 0 0 rgba(20,184,166,.5); } 70%, 100% { box-shadow: 0 0 0 .4rem rgba(20,184,166,0); } }

/* stretched link (whole card clickable when a credential URL exists) */
.cred-link { font-size: .8rem; font-weight: 600; color: var(--accent1); text-decoration: none; }
.cred-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cred-link:focus-visible { outline: none; }
.cred:has(.cred-link:focus-visible) { outline: 2px solid var(--accent1); outline-offset: 3px; }

/* bottom bar: languages + LinkedIn */
.creds-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.creds-langs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.creds-langs .creds-label { margin-right: .35rem; }
.creds-langs .creds-label::after { display: none; }
.creds-lang {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  font-size: .875rem; font-weight: 600; color: var(--ink);
}
.creds-lang span { font-weight: 500; color: var(--ink-3); }
.creds-more {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 999px;
  font-size: .875rem; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--fg);
  transition: background .25s ease, transform .25s ease;
}
.creds-more svg { width: 1rem; height: 1rem; transition: transform .25s ease; }
.creds-more:hover { background: var(--accent1); }
.creds-more:hover svg { transform: translate(2px, -2px); }
.creds-more:focus-visible { outline: 2px solid var(--accent1); outline-offset: 3px; }

/* hover: lift + accent line (pointer devices only); logos stay in full brand color */
@media (hover: hover) {
  .cred:hover, .cred:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
  .cred:hover::before, .cred:focus-within::before { transform: scaleX(1); }
}

/* responsive */
@media (max-width: 1000px) {
  .creds-cert { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .creds { padding: 0 1rem 4.5rem; }
  .creds-inner { gap: 2rem; }
  .creds-edu { grid-template-columns: 1fr; }
  .creds-cert { grid-template-columns: 1fr; gap: .75rem; }
  .creds-cert .cred { flex-direction: row; gap: 1rem; padding: 1rem; }
  .creds-cert .cred-logo { width: 3rem; height: 3rem; }
  .creds-cert .cred-logo--wide, .creds-cert .cred-logo--pair { width: 3.75rem; }
  .creds-cert .cred-logo--pair { gap: .4rem; }
  .creds-cert .cred-logo--pair img { width: 1.15rem; height: 1.15rem; }
  .creds-edu .cred { padding: 1rem; }
  .creds-edu .cred-logo { width: 3.5rem; height: 3.5rem; }
  .creds-edu .cred-logo--wide { width: 4.5rem; }
  .creds-bar { flex-direction: column; align-items: stretch; padding: 1rem; }
  .creds-more { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cred, .cred::before, .cred-logo img, .creds-more, .creds-more svg { transition: none; }
  .cred-tag--live::before { animation: none; }
  .cred:hover, .cred:focus-within { transform: none; }
}
