:root {
  --bg: #f3f4f7;
  --card: #ffffff;
  --text: #1c1f26;
  --muted: #5b6270;
  --nav: #2b4c8c;
  --accent: #2b6fd6;
  --line: #dfe2e8;
  --cream: #fbf1dc;
  --cream-line: #e8cf9c;
  --hex-w: 104px;
  --radius: 22px;
  --shadow: 0 10px 40px rgba(20, 30, 60, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h, 60px); }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; font-size: 1.25rem; text-decoration: none; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 32px); }
.nav-links a {
  text-decoration: none; color: var(--nav); font-weight: 500; letter-spacing: .02em;
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--nav); cursor: pointer; }

/* ---------- HERO ---------- */
.hero { padding: clamp(16px, 4vw, 40px); }
.hero-card {
  max-width: 1100px; margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 64px);
}
.hello { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; margin: 0; }
.aka { font-style: italic; color: var(--muted); margin: 2px 0 12px; font-size: .95rem; }
h1 {
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.08; margin: 0 0 20px; max-width: 14ch; font-weight: 600;
}
.accent { color: var(--accent); }
.bio { max-width: 60ch; color: #333a46; margin: 0 0 24px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions.center { justify-content: center; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  text-decoration: none; font-weight: 500; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.btn-primary { background: var(--cream); border-color: var(--cream-line); }

.stats {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stats li {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column;
}
.stats strong { font-size: 1.7rem; color: var(--nav); line-height: 1.1; }
.stats span { color: var(--muted); font-size: .88rem; }

.certs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }
.certs-label {
  font-family: "IBM Plex Mono", monospace; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-right: 4px;
}
.cert {
  font-size: .82rem; padding: 4px 10px; border-radius: 999px;
  background: #eef3fc; color: var(--nav); border: 1px solid #d5e1f6;
}

/* ---------- SECTIONS ---------- */
.section-head { text-align: center; max-width: 700px; margin: 0 auto 24px; padding: 0 16px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 6px; }
.section-head p { margin: 0; color: var(--muted); }
.skills, .projects { padding: 64px clamp(16px, 4vw, 40px); }

/* ---------- SKILL MAP ---------- */
.skill-tools {
  display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px;
}
#skill-search {
  width: min(440px, 100%); padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid #333; background: #fff; font: inherit; font-size: .95rem;
}
#skill-search:focus { outline: 3px solid #c9dbf8; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  font: inherit; font-size: .8rem; font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
}
.chip.active { background: var(--nav); border-color: var(--nav); color: #fff; }

.hex-map {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 40px 48px; max-width: 1300px; margin: 0 auto;
}
.hex-group { display: flex; flex-direction: column; align-items: center; }
.hex-group.hidden { display: none; }
.group-label {
  font-family: "IBM Plex Mono", monospace; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; margin: 0 0 10px;
  color: var(--g);
}
.hex-cluster { position: relative; }

.hex {
  position: absolute;
  width: var(--hex-w); height: calc(var(--hex-w) * 1.1547);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--g);
  border: 0; padding: 0; cursor: pointer;
  transition: transform .2s, opacity .25s, filter .25s;
}
.hex::before {
  content: ""; position: absolute; inset: 3px;
  clip-path: inherit;
  background: radial-gradient(circle at 50% 35%, var(--g-in2), var(--g-in) 70%);
}
.hex span {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: 100%; padding: 0 12px;
  color: #fff; font: 500 0.78rem/1.2 "IBM Plex Sans", sans-serif;
}
.hex:hover, .hex:focus-visible, .hex.selected { transform: scale(1.08); z-index: 2; outline: none; }
.hex.selected::before { background: var(--g); }
.hex-map.searching .hex { opacity: .18; filter: grayscale(.7); }
.hex-map.searching .hex.match { opacity: 1; filter: none; transform: scale(1.06); }

.skill-detail {
  text-align: center; max-width: 640px; margin: 28px auto 0; min-height: 3em;
  color: var(--muted); padding: 0 16px;
}
.skill-detail strong { color: var(--text); }

/* ---------- PROJECTS ---------- */
.project-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.project {
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  border-top: 5px solid var(--g);
  transition: transform .2s;
}
.project:hover { transform: translateY(-4px); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.metric {
  flex-shrink: 0; font-weight: 700; color: var(--g); font-size: 1.05rem; text-align: right;
}
.metric small { display: block; font-weight: 500; font-size: .7rem; color: var(--muted); }
.where { margin: 0; font-size: .85rem; color: var(--muted); }
.project p.desc { margin: 0; color: #333a46; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag { font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: #f1f2f5; color: #444b58; }

/* ---------- CONTACT ---------- */
.contact {
  text-align: center; padding: 64px 16px 80px;
  max-width: 700px; margin: 0 auto;
}
.contact h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 8px; }
.contact p { color: var(--muted); margin: 0 0 24px; }
.footer { text-align: center; padding: 24px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  :root { --hex-w: 92px; }
  .hex span { font-size: .7rem; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   PORTFOLIO GRID (portfolio.html)
   ========================================================= */
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.portfolio-page { padding: 48px clamp(16px, 4vw, 40px) 72px; }
.portfolio-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 22px;
}
.tile {
  position: relative; display: block; aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden; text-decoration: none;
  background: #0f1724; box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);
}
.tile-preview { position: absolute; inset: 0; transition: transform .5s ease; }
.tile:hover .tile-preview, .tile:focus-visible .tile-preview { transform: scale(1.04); }
.tile-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,12,20,.92) 0%, rgba(8,12,20,.55) 30%, rgba(8,12,20,0) 58%);
}
.tile-info { position: absolute; left: 20px; right: 70px; bottom: 16px; color: #fff; }
.tile-info h2 { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.tile-info p { margin: 4px 0 0; font-size: .8rem; color: rgba(255,255,255,.72); font-family: "IBM Plex Mono", monospace; }
.tile-arrow {
  position: absolute; right: 16px; bottom: 16px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  transition: background .2s, transform .2s;
}
.tile:hover .tile-arrow { background: var(--g); border-color: var(--g); transform: rotate(45deg); }
.tile::after { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--g); }

/* ---------- Previews ---------- */
.pv {
  position: absolute; inset: 0; padding: 18px 20px; overflow: hidden;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #c9d4e5;
  background: #0f1724;
}
.pv-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; color: #8a97ab; font-size: 11px; }
.pv-bar span:first-child { color: #e6edf7; font-weight: 500; }
.pv-branch { padding: 1px 8px; border-radius: 99px; background: #1d2a3e; color: #9fb7dc; }
.pv-ok { margin-left: auto; color: #4fd18b; }

/* pipeline */
.pv-pipeline { background: radial-gradient(circle at 80% 0%, #1b2b45, #0f1724 60%); }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.pl-stage {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px;
  background: #16233a; border: 1px solid #263a5a; color: #dbe6f5; white-space: nowrap;
}
.pl-stage i { font-style: normal; color: #4fd18b; font-weight: 700; }
.pl-stage.run { border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 25%, transparent); }
.pl-stage.run i { color: var(--g); animation: pulse 1.4s infinite; }
.pl-link { width: 14px; height: 2px; background: #2f4568; }
.pl-log { margin-top: 20px; display: grid; gap: 7px; }
.pl-log span { height: 7px; border-radius: 4px; background: #1c2a40; }
.pl-log span:nth-child(1) { width: 80%; } .pl-log span:nth-child(2) { width: 62%; } .pl-log span:nth-child(3) { width: 72%; }
@keyframes pulse { 50% { opacity: .3; } }

/* terminal */
.pv-term { background: #0c111a; line-height: 1.75; }
.pv-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.pv-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.pv-dots i:nth-child(2) { background: #febc2e; } .pv-dots i:nth-child(3) { background: #28c840; }
.pv-term div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cmd { color: #e6edf7; } .t-cmd span { color: var(--g); }
.t-add, .t-ok { color: #4fd18b; } .t-chg { color: #f0c05a; }
.t-add b, .t-ok b, .t-chg b { font-weight: 500; }
.t-sum { color: #fff; font-weight: 500; margin-top: 4px; }

/* flow diagram */
.pv-flow { background: #0f1724; display: flex; align-items: flex-start; padding-top: 28px; }
.fl-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(#1a263a 1px, transparent 1px), linear-gradient(90deg, #1a263a 1px, transparent 1px);
  background-size: 22px 22px;
}
.fl-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; }
.fl-node {
  padding: 10px 12px; border-radius: 10px; background: #16233a; color: #e6edf7;
  border: 1px solid color-mix(in srgb, var(--g) 60%, #263a5a); white-space: nowrap;
}
.fl-arrow { width: 22px; height: 2px; background: var(--g); position: relative; }
.fl-arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px;
  border-left: 6px solid var(--g); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}

/* dashboard */
.pv-dash { background: #111217; }
.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-stats div { background: #181b22; border: 1px solid #23262e; border-radius: 6px; padding: 8px 10px; }
.d-stats small { display: block; color: #8a8f9c; font-size: 10px; }
.d-stats b { font-size: 20px; color: #73bf69; font-weight: 500; }
.d-stats b.warn { color: #f2cc0c; }
.d-line { width: 100%; height: 60px; margin-top: 10px; }
.d-line polyline { fill: none; stroke: var(--g); stroke-width: 2; vector-effect: non-scaling-stroke; }
.d-bars { display: flex; align-items: flex-end; gap: 4px; height: 50px; margin-top: 6px; }
.d-bars i { flex: 1; background: color-mix(in srgb, #5794f2 70%, transparent); border-radius: 2px 2px 0 0; }

/* =========================================================
   PROJECT DETAIL (project.html)
   ========================================================= */
.project-detail { max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 72px; }
.pd-back { display: inline-block; color: var(--nav); text-decoration: none; font-weight: 500; margin-bottom: 18px; }
.pd-back:hover { text-decoration: underline; }
.pd-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 44px); border-top: 6px solid var(--g);
}
.pd-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.1; margin: 0 0 12px; max-width: none; }
.pd-tagline { color: #333a46; font-size: 1.08rem; margin: 0 0 18px; }
.pd-hero .tags { margin-bottom: 20px; }
.pd-hero-preview { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; }
.pd-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.pd-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; min-width: 0; }
.pd-card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.pd-card p { margin: 0; color: #333a46; }
.pd-code-card { grid-column: 1 / -1; }
.pd-list { margin: 0; padding-left: 20px; color: #333a46; display: grid; gap: 8px; }
.pd-checks { list-style: none; padding: 0; }
.pd-checks li { padding-left: 28px; position: relative; }
.pd-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--g); font-weight: 700; }
.pd-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pd-flow li { display: flex; align-items: center; gap: 12px; position: relative; padding: 8px 0; font-weight: 500; }
.pd-flow li span {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--g); color: #fff; font-size: .8rem; position: relative; z-index: 1;
}
.pd-flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px;
  background: color-mix(in srgb, var(--g) 35%, transparent);
}
.pd-code-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pd-code-head h2 { margin: 0; }
.pd-lang {
  font-family: "IBM Plex Mono", monospace; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 99px; background: #f1f2f5; color: var(--muted);
}
.pd-copy {
  margin-left: auto; font: inherit; font-size: .85rem; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.pd-copy:hover { background: #f5f6f8; }
.pd-code {
  margin: 0; padding: 20px; border-radius: 12px; background: #0f1724; color: #dbe6f5;
  font: 13px/1.6 "IBM Plex Mono", monospace; overflow-x: auto; tab-size: 2;
}
.c-com { color: #7d8ba1; font-style: italic; }
.c-str { color: #9ad48a; }
.pd-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.pd-nav a {
  background: var(--card); border-radius: 14px; padding: 16px 20px; text-decoration: none;
  border: 1px solid var(--line); font-weight: 600;
}
.pd-nav a:hover { border-color: var(--nav); }
.pd-nav a.right { text-align: right; }
.pd-nav small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pd-missing { text-align: center; padding: 80px 0; }

@media (max-width: 860px) {
  .pd-hero, .pd-body { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pv { font-size: 10.5px; padding: 14px; }
  .pv-bar { margin-bottom: 12px; }
  .pl-stage { padding: 5px 7px; }
  .fl-node { padding: 7px 9px; }
  .tile-info h2 { font-size: 1.05rem; }
  .pd-nav { grid-template-columns: 1fr; }
  .pd-nav a.right { text-align: left; }
}

/* =========================================================
   APPLE-STYLE MOTION (motion.js)
   ========================================================= */
/* Full-screen slides that snap into place */
html.snap { scroll-snap-type: y mandatory; }
.slide {
  min-height: calc(100svh - var(--nav-h, 60px));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center;
}
.hero.slide { padding-top: clamp(12px, 2.5vh, 32px); padding-bottom: clamp(12px, 2.5vh, 32px); }
.hero.slide .hero-card { width: 100%; }
.contact-slide { padding: 0 16px; }
.footer { scroll-snap-align: end; }
.slide > * { width: 100%; }  /* keep content inside the screen width */

/* Fade + rise in when a block scrolls into view */
html.motion .reveal {
  opacity: 0;
  transform: translateY(32px) scale(.985);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1) var(--d, 0ms),
              transform .9s cubic-bezier(.2,.7,.2,1) var(--d, 0ms);
}
html.motion .reveal.in { opacity: 1; transform: none; }

/* Hero gently shrinks and fades as you scroll past it (Chrome, Edge, Safari 26+) */
@supports (animation-timeline: view()) {
  html.motion .hero-card {
    animation: hero-out linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 90%;
  }
  @keyframes hero-out {
    to { transform: scale(.9) translateY(-24px); opacity: .25; filter: blur(2px); }
  }
}

/* Dot navigator on the right */
.slide-dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: column; gap: 14px;
}
.slide-dots a {
  position: relative; display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #c3c9d4; transition: background .3s, transform .3s;
}
.slide-dots a.on { background: var(--nav); transform: scale(1.35); }
.slide-dots a span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px);
  white-space: nowrap; font-size: .78rem; font-weight: 500; color: var(--nav);
  background: #fff; padding: 3px 10px; border-radius: 99px; box-shadow: 0 4px 14px rgba(0,0,0,.08);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.slide-dots a:hover span, .slide-dots a:focus-visible span { opacity: 1; transform: translateY(-50%); }
@media (max-width: 900px) { .slide-dots { display: none; } }

/* Fit the hero slide inside one screen on desktop */
@media (min-width: 761px) {
  .hero.slide .hero-card { padding: clamp(22px, 4.5vh, 56px) clamp(24px, 5vw, 64px); }
  .hero.slide h1 { font-size: clamp(2.1rem, min(5.5vw, 7.5vh), 4rem); margin-bottom: clamp(10px, 2vh, 20px); }
  .hero.slide .bio { margin-bottom: clamp(14px, 2.5vh, 24px); }
  .hero.slide .stats { margin-top: clamp(16px, 3.5vh, 36px); }
  .hero.slide .certs { margin-top: clamp(12px, 2.5vh, 24px); }
}

/* =========================================================
   CERTIFICATIONS SLIDE
   ========================================================= */
.certs-slide { padding: 48px clamp(16px, 4vw, 40px); }
.cert-grid {
  max-width: 1150px; margin: 8px auto 0; width: 100%;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px;
}
.cert-card {
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
  padding: 26px 20px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-bottom: 4px solid var(--c);
  transition: transform .25s, box-shadow .25s;
}
.cert-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(20, 30, 60, .14); }
.cert-badge {
  width: 84px; height: 97px; margin-bottom: 10px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--c); display: grid; place-items: center; position: relative;
}
.cert-badge::before {
  content: ""; position: absolute; inset: 4px; clip-path: inherit;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 35%, #1b2232), #121722 75%);
}
.cert-badge span {
  position: relative; color: #fff; font: 600 1rem "IBM Plex Mono", monospace; letter-spacing: .04em;
}
.cert-area {
  margin: 0; font-family: "IBM Plex Mono", monospace; font-size: .7rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c); filter: brightness(.85);
}
.cert-card h3 { margin: 0; font-size: 1rem; line-height: 1.35; font-weight: 600; }
.cert-issuer { margin: 0; color: var(--muted); font-size: .85rem; }
.cert-verify {
  margin-top: auto; padding-top: 10px; font-size: .85rem; font-weight: 500;
  color: var(--nav); text-decoration: none;
}
.cert-verify:hover { text-decoration: underline; }
.edu-line {
  text-align: center; margin: 32px auto 0; color: var(--muted); font-size: .95rem;
}
.edu-line span {
  font-family: "IBM Plex Mono", monospace; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em;
  margin-right: 8px; padding: 3px 8px; border-radius: 99px; background: #e9ecf2; color: var(--muted);
}
@media (max-width: 520px) {
  .cert-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cert-card { padding: 18px 12px; }
  .cert-badge { width: 64px; height: 74px; }
  .cert-badge span { font-size: .8rem; }
  .cert-card h3 { font-size: .86rem; }
}

/* =========================================================
   FLOATING LOOK — layered shadows + dotted backdrop
   ========================================================= */
:root {
  --shadow: 0 1px 2px rgba(16, 24, 40, .05),
            0 8px 24px rgba(16, 24, 40, .07),
            0 28px 60px rgba(16, 24, 40, .10);
  --shadow-lift: 0 2px 4px rgba(16, 24, 40, .06),
                 0 16px 36px rgba(16, 24, 40, .12),
                 0 40px 80px rgba(16, 24, 40, .16);
}
body {
  background:
    radial-gradient(circle, #d3d8e1 1px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f5f6f9, #eceff4);
}
.hero-card, .pd-hero { border: 1px solid rgba(255,255,255,.8); }
.project:hover, .cert-card:hover, .tile:hover { box-shadow: var(--shadow-lift); }
.tile { transition: box-shadow .3s, transform .3s; }
.tile:hover { transform: translateY(-4px); }

/* =========================================================
   SLIDE-OUT SIDEBAR (sidebar.js)
   ========================================================= */
.sb-toggle {
  position: fixed; left: 0; top: 50%; z-index: 62;
  width: 28px; height: 60px; transform: translateY(-50%);
  border: 0; border-radius: 0 14px 14px 0; cursor: pointer;
  background: linear-gradient(180deg, #6f9df0, #3f74d8); color: #fff;
  box-shadow: 0 6px 18px rgba(43, 76, 140, .35);
  display: grid; place-items: center;
  transition: left .45s cubic-bezier(.2,.8,.2,1), width .2s;
}
.sb-toggle:hover { width: 32px; }
.sb-toggle span { font-size: 1.4rem; line-height: 1; transition: transform .45s; }
.sb-open .sb-toggle { left: 302px; }
.sb-open .sb-toggle span { transform: rotate(180deg); }

.sidebar {
  position: fixed; z-index: 61;
  left: 12px; top: calc(var(--nav-h, 60px) + 12px); bottom: 12px; width: 290px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: 20px;
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(-100% - 24px));
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.sb-open .sidebar { transform: none; }
.sb-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 20, 30, .18);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.sb-open .sb-scrim { opacity: 1; pointer-events: auto; }

.sb-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 14px 14px 6px;
  padding: 4px; border-radius: 999px; background: #eef1f6;
}
.sb-tabs button {
  font: 600 .85rem "IBM Plex Sans", sans-serif; border: 0; border-radius: 999px;
  padding: 7px 0; background: transparent; color: var(--muted); cursor: pointer;
}
.sb-tabs button[aria-selected="true"] { background: #fff; color: var(--nav); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.sb-body { overflow-y: auto; padding: 6px 18px 20px; }
.sb-body h3 {
  margin: 16px 0 6px; font: 600 .72rem "IBM Plex Mono", monospace;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text);
}
.sb-body ul { list-style: none; margin: 0; padding: 0; }
.sb-body li a {
  display: block; padding: 6px 10px 6px 14px; margin-left: 2px; border-radius: 8px;
  font-size: .9rem; color: #3b4352; text-decoration: none; position: relative;
}
.sb-body li a::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: var(--g, #c3c9d4); opacity: .55;
}
.sb-body li a:hover { background: #f1f4f9; color: var(--nav); }
.sb-body li a[aria-current="page"] { background: #eaf1fd; color: var(--nav); font-weight: 600; }
.sb-body li a[aria-current="page"]::before { opacity: 1; }
.sb-all {
  display: block; margin-top: 18px; padding: 10px 12px; border-radius: 10px; text-align: center;
  background: var(--cream); border: 1px solid var(--cream-line); color: var(--text);
  text-decoration: none; font-weight: 500; font-size: .9rem;
}

@media (max-width: 520px) {
  .sidebar { width: calc(100vw - 64px); left: 8px; }
  .sb-open .sb-toggle { left: calc(100vw - 52px); }
  .sb-toggle { width: 22px; height: 52px; }
  .sb-toggle span { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .sb-toggle, .sb-scrim { transition: none; }
}

/* =========================================================
   CONTACT CARD (last slide)
   ========================================================= */
.contact-slide { padding: 32px clamp(16px, 4vw, 40px); }
.cta-card {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 5vw, 60px);
  border-radius: 28px; color: #e8edf6;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(63, 116, 216, .35), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(143, 107, 209, .25), transparent 60%),
    #111827;
  box-shadow: 0 2px 4px rgba(16,24,40,.08), 0 24px 60px rgba(16,24,40,.25), 0 60px 120px rgba(16,24,40,.18);
  border: 1px solid rgba(255,255,255,.06);
}
.cta-status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  padding: 6px 14px 6px 12px; border-radius: 99px; font-size: .85rem; font-weight: 500;
  background: rgba(74, 222, 128, .12); color: #86efac; border: 1px solid rgba(74, 222, 128, .25);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ade80;
  animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.cta-left h2 { margin: 0 0 18px; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; color: #fff; font-weight: 600; }
.cta-left h2 span { color: #7fb0ff; }
.cta-sub { margin: 0 0 10px; color: #a9b4c6; }
.cta-roles { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cta-roles li {
  padding: 5px 12px; border-radius: 99px; font-size: .85rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #dbe3f0;
}
.cta-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #a9b4c6; font-size: .9rem; }
.cta-facts li { display: flex; align-items: center; gap: 10px; }
.cta-facts svg, .cta-icon svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.cta-right { display: grid; gap: 12px; }
.cta-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #fff; text-decoration: none; transition: background .2s, transform .2s, border-color .2s;
}
a.cta-link:hover, .cta-email:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.cta-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(127, 176, 255, .15); color: #9cc2ff;
}
.cta-icon svg { width: 20px; height: 20px; }
.cta-in { font: 700 1.05rem "IBM Plex Sans", sans-serif; background: #0a66c2; color: #fff; }
.cta-text { flex: 1; min-width: 0; color: #fff; text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.cta-text small { display: block; font-weight: 400; font-size: .75rem; color: #a9b4c6; letter-spacing: .04em; }
.cta-arrow { color: #a9b4c6; font-size: 1.1rem; }
.cta-copy {
  flex-shrink: 0; font: 500 .8rem "IBM Plex Sans", sans-serif; padding: 7px 12px; border-radius: 9px; cursor: pointer;
  background: #fff; color: #111827; border: 0;
}
.cta-copy:hover { background: #e8edf6; }

.footer { font-size: .8rem; }

@media (max-width: 860px) {
  .cta-card { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cta-card { border-radius: 22px; padding: 24px 18px; }
  .cta-link { padding: 12px; gap: 10px; }
  .cta-icon { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }
@media (max-width: 520px) { .cta-email .cta-text { font-size: .86rem; } }
.cta-card { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 860px) { .cta-card { grid-template-columns: minmax(0, 1fr); } }
