:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #454545;
  --line: #ccd2de;
  --soft: #f4f6fb;
  --accent: #4d72ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
  --radius-sm: 16px;
  --card-border: #dce4f3;
  --card-bg: linear-gradient(180deg, #ffffff, #fbfcff);
  --card-shadow: 0 10px 28px rgba(15, 31, 74, 0.05);
  --max: 1160px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
body.is-loading {
  overflow: hidden;
}
body.is-loading .site-header,
body.is-loading main,
body.is-loading .site-footer {
  opacity: 0;
  visibility: hidden;
}
body.is-ready .site-header,
body.is-ready main,
body.is-ready .site-footer {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease;
}
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f7f9ff;
}
body.is-loading .app-loader {
  display: flex;
}
body.is-ready .app-loader {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.app-loader-shell {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
}
.app-loader-avatar {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #d6dff3;
  box-shadow: 0 10px 28px rgba(20, 36, 75, 0.12);
}
.app-loader-name {
  margin: 0;
  font-size: clamp(1.35rem, 4.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #121b2f;
}
.app-loader-note {
  margin: 0;
  color: #4f5f86;
  font-size: 0.9rem;
  font-weight: 600;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
code { background: #f1f1f1; padding: 0.15rem 0.35rem; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.9); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.brand-dot { width: 12px; height: 12px; background: #111; border-radius: 999px; }
.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #d8deeb;
}
.main-nav { display: inline-flex; align-items: center; gap: 1.25rem; }
.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 0.18s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.34rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d72ff, #6b8cff);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  color: var(--text);
}
.main-nav a.is-active {
  font-weight: 700;
}
.main-nav a.is-active::after {
  transform: scaleX(1);
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-toggle {
  display: none;
  border-color: #cad6f1;
  color: #1f2f53;
  padding-inline: 0.95rem;
}
.mobile-section-indicator {
  display: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); }
.btn-primary { background: #111; color: #fff; }
.btn-secondary { background: #fff; color: #111; text-decoration: none; }
.btn.nav-toggle { display: none; }
.hero { padding: 4.5rem 0 2rem; background: #fff; border-bottom: 1px solid #edf1f7; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 2.5rem; }
.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}
.eyebrow-underline {
  text-decoration: underline;
  text-decoration-color: rgba(77, 114, 255, 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: auto;
}
.eyebrow-circle {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(140, 162, 219, 0.42);
  border-radius: 999px;
  background: rgba(236, 243, 255, 0.48);
  color: #35486f;
  font-weight: 700;
  line-height: 1;
  padding: 0.17rem 0.54rem;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.36rem 0.76rem;
  border-radius: 999px;
  border: 1px solid #ccd8f4;
  background: #eef3ff;
  box-shadow: 0 8px 20px rgba(77, 114, 255, 0.08);
  color: #20335f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}
.section-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5f86ff, #4368e7);
  box-shadow: 0 0 0 4px rgba(77, 114, 255, 0.16);
}
.hero h1 { margin: 0; font-size: clamp(2.6rem, 5vw, 5rem); line-height: 0.95; letter-spacing: -0.055em; }
.hero-role { margin: 0.85rem 0 1rem; font-size: clamp(1.25rem, 2vw, 1.85rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 700; }
.hero-lead { max-width: 66ch; margin: 0; color: #424242; font-size: 1.07rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }
.cta-text-link {
  display: inline-flex;
  align-items: center;
  color: #243b6e;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.78rem 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.cta-text-link:hover,
.cta-text-link:focus-visible {
  color: #1a2f5d;
  border-bottom-color: rgba(77, 114, 255, 0.55);
}
.meta-list, .social-row { display: flex; flex-wrap: wrap; gap: 0.85rem; list-style: none; padding: 0; }
.meta-list { margin: 1.5rem 0 0; }
.meta-pill, .social-link, .fact-pill, .tag { border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.meta-pill, .social-link, .fact-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.95rem; color: #1d1d1d; text-decoration: none; font-size: 0.93rem; }
.pill-icon { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.pill-text { line-height: 1.2; }
.social-row { margin: 0.95rem 0 0; }
.social-link:hover, .meta-pill:hover { border-color: #1f1f1f; }
.hero-card { background: linear-gradient(180deg, #fafcff, #f1f4fd); border: 1px solid #e5eaf8; border-radius: 28px; padding: 1.5rem; box-shadow: var(--shadow); }
.portrait-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin-left: auto;
}
.portrait-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}
.hero-facts { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fact-pill { background: rgba(255,255,255,0.93); border-color: #d7dff5; font-weight: 600; }
.section { padding: 2rem 0 4rem; }
.section[id] { scroll-margin-top: 108px; }
.section + .section { border-top: 1px solid #edf1f7; }
.section-muted { background: var(--soft); border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.section-grid { display: grid; gap: 2rem; }
.section-grid--about { grid-template-columns: 1fr 4fr; align-items: start; gap: 2.2rem; }
.section-title { margin: 0; font-size: clamp(1.65rem, 2vw, 2.4rem); line-height: 1.12; letter-spacing: -0.04em; }
.section-heading { margin-bottom: 1.6rem; }
.section-heading--compact { margin-bottom: 1.15rem; }
.section-heading--cert { display: grid; gap: 0.45rem; }
.section-heading--cert .section-label {
  justify-self: start;
  width: fit-content;
}
.section-grid--about > .section-heading,
.contact-card > .section-heading { margin-bottom: 0; }
body.js-enhanced .section-heading {
  opacity: 0.14;
  transform: translateY(34px) scale(0.95);
  filter: blur(4px);
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform, filter;
}
body.js-enhanced .section-heading.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.section-brand-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.2rem; }
.section-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.58rem;
  border: 1px solid #d8e1f2;
  border-radius: 999px;
  background: #f7faff;
  color: #2b3a59;
  font-size: 0.76rem;
  font-weight: 700;
}
.section-brand-pill img { width: 14px; height: 14px; object-fit: contain; }
.about-panel {
  padding: 1.3rem;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.about-copy { display: grid; gap: 0.9rem; color: #262626; font-size: 1.03rem; line-height: 1.72; }
.about-copy p { margin: 0; }
.about-highlights {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.about-highlight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  border: 1px solid #d8e1f6;
  background: #f7faff;
  border-radius: 12px;
  padding: 0.58rem 0.72rem;
  color: #23314e;
  font-size: 0.85rem;
  font-weight: 600;
}
.about-highlight::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex: 0 0 auto;
}
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.focus-card, .project-card, .skill-card, .stack-item, .contact-action {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
}
.focus-card {
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
  border-color: #e3e8f4;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.focus-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #111111, #4d72ff);
}
.focus-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(16, 34, 84, 0.08); }
.focus-card h4, .project-card h4, .skill-card h4, .stack-item h4 { margin: 0; font-size: 1.02rem; letter-spacing: -0.03em; }
.focus-card p, .project-card p, .skill-card p, .stack-item p { margin: 0.65rem 0 0; color: #3d465b; }
.timeline { display: grid; gap: 1rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.3rem;
  padding: 1.35rem;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.timeline-item:hover {
  transform: translateY(-2px);
  border-color: #cad7f3;
  box-shadow: 0 17px 34px rgba(17, 35, 82, 0.08);
}
.timeline-meta { color: var(--muted); font-size: 0.94rem; }
.timeline-company-head {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
}
.timeline-company-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid #d5ddf2;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.2rem;
  flex: 0 0 auto;
}
.timeline-company-text { min-width: 0; }
.timeline-company {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.timeline-company-summary {
  margin-top: 0.44rem;
  display: inline-flex;
  align-items: center;
}
.timeline-company-period {
  color: #3a496e;
  font-size: 0.9rem;
  font-weight: 700;
}
.timeline-duration {
  margin-top: 0.46rem;
  color: #3a496e;
  font-size: 0.88rem;
  font-weight: 600;
}
.timeline-location { margin-top: 0.4rem; }
.timeline-role-stack { display: grid; gap: 1rem; min-width: 0; }
.timeline-role-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.85rem;
  align-items: start;
}
.timeline-role-connector {
  position: relative;
  width: 22px;
  min-height: 100%;
}
.timeline-role-connector::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.42rem;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #557cfe, #3f67ea);
  box-shadow: 0 0 0 4px #ecf2ff;
}
.timeline-role-item:not(:last-child) .timeline-role-connector::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 1.16rem;
  width: 2px;
  height: calc(100% + 0.9rem);
  border-radius: 2px;
  background: #d6e0f6;
}
.timeline-role-main { min-width: 0; padding-bottom: 0.2rem; }
.timeline-role-title {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #151a28;
}
.timeline-role-meta {
  margin-top: 0.26rem;
  color: #4b5878;
  font-size: 0.9rem;
  font-weight: 600;
}
.timeline-role-intro {
  margin: 0.62rem 0 0.35rem;
  color: #1e2a42;
  line-height: 1.62;
}
.timeline-role-main .bullet-list { margin: 0.65rem 0 0; }
.timeline-role-main .bullet-list li { margin-bottom: 0.5rem; color: #1e273e; }
.timeline-role-stack--single .timeline-role-item { grid-template-columns: 1fr; gap: 0; }
.timeline-role-stack--single .timeline-role-connector { display: none; }
.bullet-list { margin: 0.8rem 0 0; padding-left: 1rem; }
.bullet-list li { margin-bottom: 0.55rem; }
.link-inline { color: #111; text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
.about-copy,
.timeline-role-intro,
.project-description,
.contact-value,
.micro-cert-id,
.stack-item p {
  overflow-wrap: anywhere;
}
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
/* When the project count is odd, center the lone last card in its row. */
.projects-grid > .project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 0.5rem);
}
.project-card { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.95rem; border-color: #dce5f5; }
.project-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.project-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 40px;
  min-width: 0;
}
.project-title-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid #d4def4;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.25rem;
  flex: 0 0 auto;
}
.project-title { margin: 0; font-size: 1.48rem; line-height: 1.06; letter-spacing: -0.03em; }
.project-top .link-inline {
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
}
.project-description {
  margin: 0;
  color: #222;
  line-height: 1.65;
}
.project-gallery {
  display: grid;
  gap: 0.45rem;
  margin: 0.25rem 0 0.15rem;
  /* Pin the gallery toward the bottom so galleries align across a row of cards. */
  margin-top: auto;
}
.project-gallery-main {
  position: relative;
  border: 1px solid #d6e0f2;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff, #eef3fb);
  padding: 0;
  cursor: pointer;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.project-gallery-main-image,
.project-gallery-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-gallery-count {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  border: 1px solid #c8d4ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #27385f;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.22rem 0.58rem;
}
.project-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.project-gallery-thumb {
  position: relative;
  border: 1px solid #d6e0f2;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fbff, #eef2fa);
  padding: 0;
  cursor: pointer;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.project-gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f6f8ff;
  font-size: 1.1rem;
  font-weight: 800;
  background: rgba(25, 37, 67, 0.62);
}
.project-gallery-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid #cedaf0;
  border-radius: 999px;
  background: #f8fbff;
  color: #2a3d68;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.36rem 0.72rem;
  cursor: pointer;
}
.project-gallery-view-all:hover,
.project-gallery-main:hover,
.project-gallery-thumb:hover {
  border-color: #9eb5ec;
}
body.project-gallery-open { overflow: hidden; }
.project-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.project-gallery-modal[hidden] { display: none; }
.project-gallery-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 14, 23, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.project-gallery-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  border: 1px solid #25324f;
  border-radius: 18px;
  background: #0f1628;
  box-shadow: 0 26px 70px rgba(2, 8, 20, 0.55);
  overflow: hidden;
}
.project-gallery-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  border: 1px solid #4a5c87;
  border-radius: 999px;
  background: rgba(19, 31, 56, 0.86);
  color: #d9e4ff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.project-gallery-stage {
  position: relative;
  background: #0d1424;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
}
.project-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid #41527f;
  border-radius: 999px;
  background: rgba(14, 25, 46, 0.82);
  color: #dbe6ff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.project-gallery-nav[disabled] {
  opacity: 0.45;
  cursor: default;
}
.project-gallery-nav--prev { left: 0.8rem; }
.project-gallery-nav--next { right: 0.8rem; }
.project-gallery-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.95rem;
  color: #d6e1fe;
  font-size: 0.9rem;
}
.project-gallery-title { font-weight: 700; }
.project-gallery-counter { color: #aebee5; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tag { padding: 0.42rem 0.7rem; font-size: 0.82rem; color: #333; }
.skill-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.skill-card { padding: 1.35rem; }
.skill-summary {
  margin: 0.65rem 0 0;
  color: #3b4864;
  font-size: 0.94rem;
  line-height: 1.58;
}
.skill-list { margin: 0.9rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.skill-list li { padding: 0.42rem 0.7rem; border-radius: 999px; background: #f4f4f4; font-size: 0.86rem; color: #333; }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stack-list { display: grid; gap: 1rem; }
.stack-item { padding: 1.2rem; }
.stack-item .meta-row { margin-top: 0.45rem; color: var(--muted); font-size: 0.95rem; }
#certificationsList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cert-card { border-color: #dfe5f2; background: #fff; }
.cert-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.85rem; }
.cert-brand { display: inline-flex; align-items: center; gap: 0.45rem; }
.cert-brand-icon { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.cert-brand-text { color: #2e3a57; font-size: 0.84rem; font-weight: 700; letter-spacing: 0.01em; }
.cert-top-right {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.34rem;
  min-width: 170px;
  min-height: 34px;
}
.cert-status {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}
.cert-status--achieved { color: #176641; background: #ebf9f1; border-color: #c6e7d5; }
.cert-status--in-progress { color: #936200; background: #fff8e7; border-color: #eed79f; }
.cert-body { display: grid; grid-template-columns: 98px 1fr; gap: 0.9rem; align-items: start; }
.cert-badge {
  width: 98px;
  height: 98px;
  object-fit: contain;
  border: 1px solid #d8e1f2;
  border-radius: 14px;
  background: #f7f9ff;
  padding: 0.35rem;
}
.cert-info { display: flex; flex-direction: column; }
.cert-info h4 { margin: 0; font-size: 1.02rem; letter-spacing: -0.02em; line-height: 1.25; }
.cert-info .meta-row { margin-top: 0.45rem; }
.cert-note {
  margin: 0.34rem 0 0;
  color: #3a445c;
  line-height: 1.5;
}
.cert-credential-id {
  margin-top: 0.38rem;
  color: #4a5675;
  font-size: 0.8rem;
  font-weight: 600;
}
.cert-info p { margin: 0.65rem 0 0; color: #3a445c; }
.cert-action {
  margin-top: 0.85rem;
  align-self: flex-start;
  padding: 0.28rem 0.68rem;
  border-color: #cfdbf4;
  background: #f8fbff;
  color: #2a3b5f;
  font-size: 0.76rem;
  font-weight: 700;
}
.cert-action--top {
  margin-top: 0;
  align-self: auto;
}
.cert-action:hover, .cert-action:focus-visible { border-color: #4d72ff; color: #1f4ebe; }
.cert-subsection { margin-top: 1.15rem; }
.micro-cert-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.72rem; }
.micro-cert-card {
  padding: 0.85rem 0.92rem;
  border: 1px solid #dbe4f6;
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 0.42rem;
}
.micro-cert-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.6rem;
  align-items: center;
}
.micro-cert-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 1px solid #d8e2f5;
  border-radius: 10px;
  background: #f7f9ff;
  padding: 0.18rem;
}
.micro-cert-card h4 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.micro-cert-card .meta-row { margin-top: 0.12rem; font-size: 0.84rem; }
.micro-cert-id { color: #4a5675; font-size: 0.8rem; }
.micro-cert-action {
  display: inline-flex;
  align-items: center;
  margin-top: 0.28rem;
  border: 1px solid #cfdbf4;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  width: fit-content;
  text-decoration: none;
  color: #2a3b5f;
  font-size: 0.76rem;
  font-weight: 700;
  background: #f8fbff;
}
.micro-cert-action:hover, .micro-cert-action:focus-visible { border-color: #4d72ff; color: #1f4ebe; }
.micro-cert-action--disabled {
  opacity: 0.65;
  pointer-events: none;
}
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 2rem;
  padding: 1.6rem;
  border: 1px solid #dee6f6;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: var(--shadow);
}
.contact-actions {
  display: grid;
  gap: 0.9rem;
}
.contact-action {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 0.78rem;
  padding: 0.95rem 1.02rem;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  border: 1px solid #dfe7f8;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-action:hover,
.contact-action:focus-visible {
  transform: translateY(-2px);
  border-color: #b5c8ef;
  box-shadow: 0 12px 26px rgba(33, 58, 120, 0.11);
}
.contact-icon-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e2f5;
  border-radius: 14px;
  background: #f2f6ff;
}
.contact-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.contact-text-wrap {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.contact-action strong {
  display: block;
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.contact-value {
  display: block;
  font-size: 0.98rem;
  color: #222f4e;
  white-space: normal;
  word-break: break-word;
}
.contact-note {
  display: block;
  font-size: 0.78rem;
  color: #5b6a8e;
}
.site-footer { border-top: 1px solid #efefef; padding: 1.5rem 0 2.5rem; }
.footer-shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-copy {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  margin: 0;
}
.footer-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #415074;
  font-weight: 600;
}
.footer-separator {
  color: #8e99b5;
}
.footer-source-link {
  color: #2a3f72;
  text-decoration: none;
  border-bottom: 1px solid rgba(77, 114, 255, 0.36);
}
.footer-source-link:hover,
.footer-source-link:focus-visible {
  border-bottom-color: rgba(77, 114, 255, 0.72);
}
.resume-canvas-wrap { position: fixed; left: -200vw; top: 0; width: 210mm; opacity: 0; pointer-events: none; }
.resume-canvas { width: 210mm; min-height: 297mm; padding: 11.5mm; background: #fff; color: #111; font-family: "Inter", system-ui, sans-serif; }
.resume-shell {
  position: relative;
  padding-bottom: 14mm;
  font-size: 10.85px;
  line-height: 1.48;
  color: #171717;
}
.resume-generated-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 6px;
  color: #4a5778;
  font-size: 9px;
  font-weight: 700;
  width: 100%;
  text-align: right;
}
.resume-generated-bar a {
  color: #2c426f;
  text-decoration: none;
  border-bottom: 1px solid #c7d5f3;
}
.resume-generated-bar a:hover,
.resume-generated-bar a:focus-visible {
  border-bottom-color: #7f9be4;
}
.resume-header {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid #1f1f1f;
}
.resume-photo { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; background: #111; }
.resume-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.04) contrast(1.02); }
.resume-name { font-size: 24px; line-height: 1; margin: 0; letter-spacing: -0.04em; }
.resume-role { margin: 5px 0 0; color: #2f3f60; font-size: 12.5px; font-weight: 700; }
.resume-tagline { margin: 6px 0 0; color: #2b2b2b; font-size: 10.2px; line-height: 1.42; }
.resume-contact, .resume-profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 7px;
  color: #2f2f2f;
}
.resume-contact a, .resume-profile-row a { color: #111; text-decoration: none; }
.resume-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.resume-contact-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
  opacity: 0.88;
}
.resume-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d5def2;
  border-radius: 999px;
  padding: 1px 7px;
  background: #f8faff;
  color: #2d426d !important;
}
.resume-link-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
}
.resume-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.resume-fact {
  border: 1px solid #d3dff7;
  border-radius: 999px;
  padding: 1px 7px;
  color: #253d6c;
  background: #f8faff;
  font-size: 9.5px;
  font-weight: 700;
}
.resume-section { margin-top: 10px; page-break-inside: auto; break-inside: auto; }
.resume-section--projects {
  margin-top: 10px;
}
.resume-section--primary-education {
  margin-top: 7px;
}
.resume-title {
  margin: 0 0 6px;
  padding-top: 8px;
  border-top: 1px solid #1f1f1f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.resume-summary p { margin: 0 0 6px; }
.resume-summary--compact { margin-top: 5px; }
.resume-keyline {
  margin-top: 5px;
  color: #2a406f;
  font-size: 9.8px;
  font-weight: 700;
}
.resume-entry, .resume-project, .resume-skill-group, .resume-cert-row, .resume-edu-row {
  margin-bottom: 7px;
  page-break-inside: avoid;
  break-inside: avoid;
}
.resume-entry, .resume-project, .resume-cert-row, .resume-edu-row {
  border: 1px solid #dde4f4;
  border-radius: 10px;
  background: #fbfcff;
  padding: 7px 8px;
}
.resume-entry-head, .resume-project-head, .resume-cert-head, .resume-edu-head {
  display: flex;
  gap: 9px;
  justify-content: space-between;
  align-items: start;
}
.resume-entry-head strong, .resume-project-head strong, .resume-cert-head strong, .resume-edu-head strong { font-size: 11.2px; }
.resume-heading-brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.resume-inline-logo {
  border-radius: 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dce4f4;
}
.resume-inline-logo--company,
.resume-inline-logo--project {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.resume-inline-logo--badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.resume-inline-logo--mini {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.resume-cert-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.resume-cert-core {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
}
.resume-cert-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.resume-cert-title-row strong {
  font-size: 11.2px;
  line-height: 1.2;
}
.resume-cert-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
  color: #30456e;
  font-size: 9.2px;
  font-weight: 700;
  white-space: nowrap;
}
.resume-subline { color: #3d4a63; }
.resume-small { color: #4d5972; font-size: 9.45px; }
.resume-right { text-align: right; }
.resume-cert-side {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 110px;
  min-height: 20px;
}
.resume-role-block {
  margin-top: 5px;
  border-top: 1px dashed #d6def1;
  padding-top: 5px;
}
.resume-role-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.resume-role-block p { margin: 3px 0 0; }
.resume-entry ul, .resume-project ul {
  margin: 4px 0 0;
  padding-left: 15px;
}
.resume-entry li, .resume-project li { margin-bottom: 3px; }
.resume-tags { color: #394766; font-size: 9.5px; margin-top: 4px; }
.resume-cert-subtitle {
  margin: 5px 0 4px;
  color: #2d3f66;
  font-size: 10px;
  font-weight: 700;
}
.resume-extra-certs {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.resume-extra-cert-item {
  margin-bottom: 3px;
  color: #2c2c2c;
  font-size: 9.8px;
}
.resume-extra-cert-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.resume-cert-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d4def3;
  padding: 1px 7px;
  font-size: 8.9px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.resume-cert-status--achieved {
  color: #2b6d4a;
  border-color: #b7e5c6;
  background: #effaf3;
}
.resume-cert-status--in-progress {
  color: #7f5b07;
  border-color: #f1d49c;
  background: #fff7e7;
}
.resume-cert-note {
  margin-top: 4px;
}
.resume-credential-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  border: 1px solid #cdd9f1;
  border-radius: 999px;
  padding: 2px 9px;
  color: #2d4575;
  background: #f7faff;
  text-decoration: none;
  font-size: 9px;
  font-weight: 700;
}
.resume-credential-link--small {
  margin-top: 2px;
  margin-left: 2px;
  padding: 1px 8px;
  font-size: 8.7px;
}
.resume-credential-link--top {
  margin-top: 0;
  padding-inline: 8px;
  font-size: 8.8px;
}
.resume-skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 6px;
}
.resume-skill-group {
  border: 1px solid #dde4f4;
  border-radius: 10px;
  background: #fbfcff;
  padding: 5px 6px;
}
.resume-skills-list { margin-top: 1px; color: #2f2f2f; font-size: 9.3px; line-height: 1.4; }
.resume-site-footer-note {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 78%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #3a4a70;
  font-size: 8.9px;
  line-height: 1.42;
  font-weight: 600;
  text-align: right;
}
.resume-site-footer-note a {
  color: #2b4477;
  text-decoration: none;
  border-bottom: 1px solid #c5d4f3;
  font-weight: 800;
}
@media (prefers-reduced-motion: reduce) {
  body.js-enhanced .section-heading {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
@media (max-width: 980px) {
  html { scroll-padding-top: 122px; }
  .section[id] { scroll-margin-top: 122px; }

  .hero-grid, .section-grid--about, .split-grid, .cards-grid, .projects-grid, .skill-groups, .contact-card { grid-template-columns: 1fr; }
  /* Single-column: the odd-card centering must not shrink the last card. */
  .projects-grid > .project-card:last-child:nth-child(odd) { grid-column: auto; width: auto; justify-self: stretch; }
  .hero {
    padding-top: 2.6rem;
    padding-bottom: 1.8rem;
  }
  #certificationsList { grid-template-columns: 1fr; }
  .micro-cert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .nav-shell {
    min-height: 72px;
    align-items: center;
  }
  .nav-actions {
    margin-left: auto;
    gap: 0.45rem;
  }
  .btn.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
  }
  .mobile-section-indicator {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0.46rem 0.02rem 0.56rem;
    border-top: 1px solid #e5eaf7;
    background: rgba(246, 250, 255, 0.98);
    backdrop-filter: blur(8px);
  }
  .mobile-section-indicator.is-empty { display: none; }
  .mobile-section-indicator__label {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    color: #2b3d67;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
  }
  .mobile-section-indicator__label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, #5f86ff, #4368e7);
    box-shadow: 0 0 0 4px rgba(77, 114, 255, 0.15);
  }
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    border-bottom: 1px solid #dfe7f6;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .site-header.nav-open .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #dce4f4;
    background: #fff;
    font-size: 0.94rem;
  }
  .main-nav a::after { display: none; }
  .main-nav a.is-active {
    background: #eef3ff;
    border-color: #c7d6f3;
  }
  .site-header.nav-open .mobile-section-indicator {
    opacity: 0.15;
  }

  .timeline-item { grid-template-columns: 1fr; }
  .timeline-meta { padding-bottom: 0.7rem; border-bottom: 1px dashed #d8e2f5; }
  .timeline-company-logo { width: 42px; height: 42px; }
  .timeline-role-title { font-size: 1.06rem; }
  .contact-actions { max-width: 100%; }
  .portrait-shell {
    margin-left: 0;
    max-width: 100%;
  }
  .hero-card { padding: 1.2rem; }
  .cta-row .btn {
    min-height: 46px;
    padding-block: 0.82rem;
  }
}
@media (max-width: 768px) {
  .container { width: min(calc(100% - 1.35rem), var(--max)); }
  .section {
    padding-top: 1.65rem;
    padding-bottom: 3.2rem;
  }
  .section-heading { margin-bottom: 1.25rem; }
  .section-title { font-size: clamp(1.5rem, 6.8vw, 2rem); }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3.1rem); }
  .hero-role { font-size: 1.2rem; }
  .hero-lead { font-size: 1rem; line-height: 1.6; }
  .meta-list, .social-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .meta-pill, .social-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0.72rem 0.9rem;
  }
  .hero-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .fact-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.65rem 0.7rem;
  }
  .about-panel { padding: 1.05rem; border-radius: 16px; }
  .about-copy { gap: 0.75rem; font-size: 0.98rem; line-height: 1.63; }
  .about-highlights { gap: 0.55rem; }
  .focus-card,
  .project-card,
  .skill-card,
  .stack-item {
    border-radius: 14px;
    padding: 1rem;
  }
  .project-top {
    align-items: flex-start;
    gap: 0.65rem;
  }
  .project-title-wrap { min-height: 34px; }
  .project-title-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .project-title { font-size: 1.3rem; }
  .project-top .link-inline {
    font-size: 0.96rem;
    padding-top: 0.2rem;
  }
  .tags { gap: 0.48rem; }
  .tag {
    font-size: 0.8rem;
    padding: 0.35rem 0.62rem;
  }
  .timeline-item {
    padding: 1rem;
    border-radius: 16px;
    gap: 0.95rem;
  }
  .timeline-role-item {
    grid-template-columns: 18px 1fr;
    gap: 0.62rem;
  }
  .timeline-role-connector { width: 18px; }
  .timeline-role-connector::after {
    left: 3px;
    width: 10px;
    height: 10px;
  }
  .timeline-role-item:not(:last-child) .timeline-role-connector::before {
    left: 7px;
  }
  .cert-body { grid-template-columns: 82px 1fr; gap: 0.7rem; }
  .cert-badge {
    width: 82px;
    height: 82px;
    border-radius: 12px;
  }
  .cert-info h4 { font-size: 0.99rem; }
  .cert-action,
  .micro-cert-action {
    min-height: 42px;
    align-items: center;
    justify-content: center;
  }
  .micro-cert-card {
    padding: 0.8rem;
    border-radius: 12px;
  }
  .micro-cert-head {
    grid-template-columns: 36px 1fr;
    gap: 0.52rem;
  }
  .micro-cert-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .contact-card {
    padding: 1.12rem;
    border-radius: 18px;
    gap: 1.15rem;
  }
  .contact-action {
    grid-template-columns: 40px 1fr;
    gap: 0.62rem;
    border-radius: 14px;
    padding: 0.82rem 0.85rem;
  }
  .contact-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .contact-icon {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 1rem), var(--max)); }
  html { scroll-padding-top: 108px; }
  .section[id] { scroll-margin-top: 108px; }
  .nav-shell { min-height: 66px; }
  .brand { min-height: 44px; }
  .brand-avatar { width: 30px; height: 30px; }
  #downloadPdfHeader { display: none; }
  .nav-toggle {
    min-width: 82px;
    padding: 0.7rem 0.82rem;
  }
  .main-nav { padding-inline: 0.75rem; }
  .mobile-section-indicator {
    min-height: 36px;
    padding-top: 0.42rem;
    padding-bottom: 0.48rem;
  }
  .mobile-section-indicator__label {
    font-size: 0.7rem;
    letter-spacing: 0.13em;
  }
  .hero { padding-top: 2.2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-role { font-size: 1.15rem; }
  .eyebrow { font-size: 0.7rem; line-height: 1.45; }
  .eyebrow-circle { margin-top: 0.24rem; }
  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }
  .cta-row .btn { width: 100%; justify-content: center; }
  .cta-row .cta-text-link {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding-top: 0.1rem;
    padding-bottom: 0.2rem;
  }
  .about-highlights { grid-template-columns: 1fr; }
  .micro-cert-list { grid-template-columns: 1fr; }
  .project-gallery-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-gallery-thumbs,
  .project-gallery-view-all { display: none; }
  .project-gallery {
    margin: 0.25rem 0 0.05rem;
    gap: 0;
  }
  .project-gallery-main { aspect-ratio: 16 / 10; }
  .project-gallery-main-image {
    object-fit: cover;
    object-position: center top;
  }
  .project-gallery-count {
    font-size: 0;
    padding: 0.28rem 0.58rem;
    min-width: 48px;
    justify-content: center;
  }
  .project-gallery-count::before {
    content: attr(data-mobile-label);
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 800;
    color: #2b3d67;
    letter-spacing: 0.01em;
  }
  .project-gallery-dialog { border-radius: 14px; }
  .project-gallery-stage { aspect-ratio: 4 / 3; }
  .project-gallery-nav { width: 34px; height: 34px; font-size: 1.2rem; }
  .project-gallery-footer { padding: 0.65rem 0.75rem; font-size: 0.82rem; }
  .timeline-item { padding: 0.9rem; }
  .timeline-item, .projects-grid, .cards-grid, .skill-groups, .split-grid { gap: 0.8rem; }
  .contact-card { padding: 0.98rem; }
  .contact-value { font-size: 0.93rem; }
  .section-label { font-size: 0.74rem; letter-spacing: 0.12em; padding: 0.34rem 0.68rem; }
  .footer-shell { flex-direction: column; align-items: flex-start; }
  .site-footer .btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 2rem; }
  .hero-facts { grid-template-columns: 1fr; }
  .project-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.36rem;
  }
  .project-top .link-inline { font-size: 0.92rem; }
  .project-gallery-thumbs { grid-template-columns: 1fr; }
  .contact-action {
    grid-template-columns: 36px 1fr;
    gap: 0.55rem;
  }
  .contact-icon-wrap {
    width: 36px;
    height: 36px;
  }
}
@page { size: A4 portrait; margin: 11.5mm 0; }
@media print {
  .app-loader,
  .site-header,
  main,
  .site-footer,
  .project-gallery-modal {
    display: none !important;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.js-enhanced .section-heading {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .resume-canvas-wrap {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
  }

  #resumePdfRoot {
    display: block !important;
    width: 210mm !important;
    max-width: 210mm !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-sizing: border-box !important;
    /* Vertical breathing room is provided per-page by @page margin; keep only
       the horizontal inset here so top-of-page content is not flush to the edge. */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .resume-shell {
    padding-bottom: 0 !important;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .resume-entry,
  .resume-project,
  .resume-skill-group,
  .resume-cert-row,
  .resume-edu-row {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .resume-role-block {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .resume-header {
    break-inside: avoid !important;
    break-after: avoid !important;
  }

  .resume-title,
  .resume-cert-subtitle {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  .resume-site-footer-note {
    position: static !important;
    text-align: right !important;
    align-items: flex-end !important;
    max-width: 100% !important;
    margin-top: 3mm !important;
    margin-left: auto !important;
  }
}
