/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ink:        #101C34;  /* deep navy — primary text, dark fills */
  --ink-soft:   #4A5468;  /* secondary text */
  --vellum:     #F1EFE7;  /* page background — cool paper, not warm cream */
  --vellum-deep:#E7E3D7;  /* card / row background */
  --brass:      #A8843E;  /* decorative accent, icons, seals */
  --brass-text: #8A6A2C;  /* darkened brass — meets contrast for text/links */
  --rule:       #CBC4B3;  /* hairline borders */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --measure: 760px;
  --nav-w: 220px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brass-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass-text);
  outline-offset: 3px;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

/* ============================================================
   FRAME / LAYOUT
   ============================================================ */
.frame {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

main {
  padding: clamp(32px, 6vw, 72px) clamp(24px, 7vw, 96px) clamp(48px, 8vw, 96px);
  max-width: 1180px;
}

/* ============================================================
   INDEX NAV (binder-tab concept)
   ============================================================ */
.index {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--rule);
  padding: 32px 0 32px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.index__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.04em;
  padding-left: 8px;
}
.index__mark:hover { text-decoration: none; color: var(--brass-text); }

.index__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 48px;
}

.index__list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px 10px 8px;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-left: 2px solid transparent;
}
.index__list a:hover {
  color: var(--ink);
  text-decoration: none;
  border-left-color: var(--brass);
}
.index__list a.is-active {
  color: var(--ink);
  border-left-color: var(--brass);
}
.index__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass-text);
}

.index__toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
}

.hero__seal {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--brass);
  opacity: 0.55;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 18px;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 6px;
  max-width: 14ch;
}

.hero__title {
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.hero__thesis {
  max-width: 52ch;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 32px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid var(--ink);
}
.btn--primary { background: var(--ink); color: var(--vellum); }
.btn--primary:hover { background: #1E2E50; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); text-decoration: none; }

/* ============================================================
   SECTIONS — shared heading style
   ============================================================ */
.section { margin-bottom: 72px; }

.section__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-text);
  order: -1;
}
.section__lede {
  color: var(--ink-soft);
  margin: 14px 0 32px;
  max-width: 52ch;
}

/* ============================================================
   LEDGER (skills / education)
   ============================================================ */
.ledger { border-top: 1px solid var(--rule); }
.ledger__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger__cat {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  padding-top: 2px;
}
.ledger__items { font-size: 16px; }

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.cert-card {
  background: var(--vellum);
  padding: 28px;
  transition: background 0.15s ease;
}
.cert-card:hover { background: var(--vellum-deep); }

.cert-card__badge {
  display: block;
  width: 150px;
  height: 150px;
  margin-bottom: 16px;
  overflow: hidden;
}
.cert-card__badge img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}
/* Microsoft's badge has no Credly iframe, so build an equivalent 150x150
   box by hand: the 105x105 SVG sits centered with transparent padding
   around it, then the whole box gets scaled down 0.4267x exactly like the
   Credly iframes, so the final on-card size and proportions match. */
.cert-card__badge--framed {
  position: relative;
}
.cert-card__badge--framed .cert-card__badge-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* transform: scale(0.4267); */
  transform-origin: top left;
}
.cert-card__badge--framed .cert-card__badge-frame img {
  width: 105px;
  height: 105px;
  display: block;
}
/* Credly's iframe embed includes badge name + link text below the image by
   default; clip the box to just the image area (top-left of the iframe)
   so it sits in the same compact slot as the old SVG seal. */
.cert-card__badge--embed {
  position: relative;
}
.cert-card__badge--embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;   /* matches data-iframe-width so Credly's layout doesn't squish */
  height: 150px;  /* crop to the badge image; name/link text below gets clipped */
  border: 0;
  transform: scale(0.4267); /* 64/150, scales the 150x150 image area down to 64x64 */
  transform-origin: top left;
}

.cert-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.3;
}
.cert-card__issuer { color: var(--ink-soft); margin-bottom: 10px; }
.cert-card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.cert-card__id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass-text);
}

/* ============================================================
   TIMELINE (experience)
   ============================================================ */
.timeline__item {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  row-gap: 14px;
}
.timeline__item:last-child { border-bottom: 1px solid var(--rule); }

.timeline__date {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brass-text);
  padding-top: 4px;
}
.timeline__role {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 14px;
}
.timeline__points {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline__points li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
}
.timeline__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--brass-text);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.project-card {
  background: var(--vellum);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s ease;
}
.project-card:hover { background: var(--vellum-deep); }

.project-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
}

.project-card__gh {
  flex-shrink: 0;
  color: var(--ink-soft);
  padding-top: 2px;
}
.project-card__gh:hover { color: var(--brass-text); }

.project-card__desc {
  color: var(--ink);
  margin-bottom: 16px;
  flex-grow: 1;
}

.project-card__stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass-text);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.project-card__links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.project-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 14px;
  align-self: flex-start;
}

/* ============================================================
   CONTACT FOOTER
   ============================================================ */
/* .contact { border-top: 1px solid var(--rule); padding-top: 56px; } */
.contact__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 24px 0 32px;
}
.contact__link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
.contact__link:hover { color: var(--brass-text); border-color: var(--brass-text); text-decoration: none; }
.contact__link--static { color: var(--ink-soft); }
.contact__footnote {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; }

  .index {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    background: var(--vellum);
    padding: 16px 20px;
    z-index: 10;
  }
  .index__list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--vellum);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    margin-top: 0;
    padding: 8px 12px 16px;
    display: none;
  }
  .index.is-open .index__list { display: flex; }

  .index__toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
  }
  .index__toggle span {
    width: 20px; height: 1.5px;
    background: var(--ink);
  }

  main { padding: 32px 6vw 64px; }
  .hero__seal { display: none; }
  .ledger__row { grid-template-columns: 1fr; gap: 6px; }
  .cert-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
}
