@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  color-scheme: light;
  --paper: #f6f7f5;
  --paper-bright: #ffffff;
  --paper-shadow: #e8ecef;
  --ink: #25303a;
  --ink-soft: #4f5d68;
  --ink-muted: #63717c;
  --pine: #243e59;
  --pine-deep: #1b3045;
  --pine-light: #e5ebf0;
  --signal: #c96b47;
  --signal-dark: #a85032;
  --rule: #d9e0e5;
  --rule-dark: rgba(255, 255, 255, .24);
  --glass-surface: rgba(255, 255, 255, .76);
  --rail: clamp(278px, 23.5vw, 338px);
  --topbar: 76px;
  --gutter: clamp(1.4rem, 3vw, 3.5rem);
  --ease: cubic-bezier(.2, .75, .25, 1);
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--paper); color: var(--ink); scroll-behavior: auto; scrollbar-color: #b9c6d0 var(--paper); scrollbar-width: thin; }
body { height: 100%; min-height: 0; margin: 0; overflow: hidden; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.62; }
body, button, input, textarea { font-family: 'DM Sans', sans-serif; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--pine); color: var(--paper-bright); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

/* The left rail is the persistent identity and contact anchor. */
body.nav-panels-ready > #home.hero {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail);
  height: 100dvh;
  min-height: 0;
  padding: clamp(1.4rem, 3.1vh, 2.7rem) clamp(1.35rem, 2.2vw, 2.35rem) 1.25rem;
  overflow: hidden;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--pine);
  color: var(--paper-bright);
  border: 0;
  box-shadow: none;
}
.hero-grid { display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; align-items: flex-start; gap: clamp(.9rem, 2vh, 1.5rem); padding: 0; text-align: left; }
.hero-image-wrapper { display: flex; width: 100%; justify-content: flex-start; }
.profile-circle { position: relative; width: clamp(84px, 7.2vw, 112px); height: clamp(84px, 7.2vw, 112px); overflow: hidden; border-radius: 4px; background: #dce4ea; }
.profile-circle::after { display: none; }
.profile-image { display: block; width: 100%; height: 100%; border-radius: 0 !important; object-fit: cover; object-position: center 34%; }
.hero-content { display: flex; min-height: 0; width: 100%; flex-direction: column; align-items: flex-start; }
.profile-name { margin: 0 0 .55rem !important; color: #f0c2ad !important; font-size: .82rem !important; font-weight: 700; letter-spacing: .055em; }
.hero h1 { max-width: 10ch; margin: 0; color: var(--paper-bright); font-family: 'DM Serif Display', Georgia, serif; font-size: clamp(1.7rem, 2.15vw, 2.45rem); font-weight: 400; line-height: 1.06; letter-spacing: -.025em; }
.hero h1 .text-gradient { color: #f0c2ad; background: none; -webkit-text-fill-color: currentColor; }
.hero p { max-width: 31ch; margin: .9rem 0 0; color: #dce5ec; font-size: .92rem; line-height: 1.65; }
.hero .tagline { display: none; }

/* Compact editorial navigation lives above the changing content. */
header {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto var(--rail);
  height: var(--topbar);
  background: var(--glass-surface);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(36, 62, 89, .025);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
header .container { display: flex; width: 100%; height: 100%; max-width: none; align-items: center; justify-content: flex-end; gap: 1rem; padding: 0 var(--gutter); }
.logo { display: none; }
nav { display: block; max-width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav ul { display: flex; width: max-content; min-width: 100%; align-items: center; justify-content: flex-end; gap: clamp(.7rem, 1.35vw, 1.45rem); margin: 0; padding: 0; list-style: none; }
nav a { position: relative; display: inline-flex; min-height: 44px; align-items: center; padding: .25rem 0; color: var(--ink-muted); font-size: .77rem; font-weight: 600; letter-spacing: .015em; white-space: nowrap; text-decoration: none; transition: color .2s ease; }
nav a::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border: 0; border-radius: 0; background: var(--signal); content: ''; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
nav a:hover, nav a.active { color: var(--pine); }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* One section at a time; only a long section gets an internal scroll area. */
body.nav-panels-ready > section:not(#home), body.nav-panels-ready > footer { display: none !important; }
body.nav-panels-ready > section.is-active:not(#home) {
  position: fixed;
  z-index: 1;
  inset: var(--topbar) 0 0 var(--rail);
  display: block !important;
  width: auto;
  height: auto;
  margin: 0;
  padding: clamp(1.6rem, 3.2vh, 2.8rem) var(--gutter) 2rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b9c6d0 var(--paper);
  scrollbar-width: thin;
  background: var(--paper) !important;
  border: 0 !important;
  scroll-behavior: smooth;
  animation: panel-arrive .52s cubic-bezier(.16, 1, .3, 1) both;
}
body.nav-panels-ready > section[hidden] { display: none !important; }
body.nav-panels-ready > section.is-active:not(#home) > .container { width: min(100%, 1120px); min-height: 100%; margin: 0 auto; padding: 0; }
@keyframes panel-arrive { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.section-padding { padding-top: 0; padding-bottom: 2rem; }
.section-header { margin: 0 0 clamp(1.3rem, 3vh, 2.1rem); text-align: left; }
.section-label { display: none; }
.section-header h2 { max-width: 18ch; margin: 0; color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: clamp(2.2rem, 4.4vw, 4.35rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.section-header > p { color: var(--ink-muted) !important; font-size: .95rem !important; }
.overview-profile { display: none !important; }
.text-gradient { color: inherit; background: none; -webkit-text-fill-color: currentColor; }

/* Consistent editorial rhythm and mostly open layouts. */
.container { width: min(100% - 2rem, 1120px); margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr); gap: clamp(1.8rem, 4vw, 4.5rem); align-items: start; }
.about-text p { max-width: 68ch; margin: 0 0 1rem; color: var(--ink-soft); font-size: clamp(.96rem, 1.13vw, 1.08rem); }
.about-text p:last-child { margin-bottom: 0; }
.metrics-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--rule); }
.metric-card { padding: .9rem 0 1rem; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.metric-card:hover { transform: none; border-color: var(--signal); background: transparent; }
.metric-num { color: var(--signal-dark); font-family: 'DM Serif Display', Georgia, serif; font-size: clamp(1.8rem, 2.8vw, 2.6rem); font-weight: 400; line-height: 1.1; }
.metric-label { color: var(--ink-muted); font-size: .82rem; }

.competency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 3.2rem); border-top: 1px solid var(--rule); }
.competency-card { display: grid; grid-template-columns: minmax(9rem, .7fr) 1.3fr; align-items: baseline; gap: 1rem; padding: 1.15rem 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.competency-card:hover { transform: none; border-color: var(--signal); background: transparent; }
.competency-card h3, .support-card h3, .why-card h3 { margin: 0; color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: 1.2rem; font-weight: 400; line-height: 1.2; }
.competency-card p, .support-card p, .why-card p { margin: 0; color: var(--ink-soft); font-size: .86rem; }

.education-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 clamp(1.5rem, 3vw, 3rem) !important; margin-top: 0 !important; border-top: 1px solid var(--rule); }
.education-grid > .competency-card { display: block; padding: 1.2rem 0 1.4rem; border-bottom: 1px solid var(--rule); }
.education-grid > .competency-card h3 { font-size: 1.25rem !important; margin-bottom: .65rem !important; }
.education-grid > .competency-card p { max-width: 58ch; margin-bottom: .9rem !important; font-size: .9rem !important; }
.tech-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-tag, .task-tag { padding: .22rem .55rem; border: 1px solid var(--rule); border-radius: 2px; background: transparent; color: var(--ink-soft); font-size: .7rem; }

.toolkit-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.toolkit-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem clamp(1rem, 2.2vw, 2.1rem); }
.toolkit-category { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.category-title { margin: 0 0 .5rem; padding: 0 0 .55rem; border-bottom: 1px solid var(--pine); color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.toolkit-table { width: 100%; border-collapse: collapse; }
.toolkit-table tbody tr, .toolkit-table tbody tr:last-child { border: 0; border-bottom: 1px solid var(--rule); background: transparent; }
.toolkit-table tbody tr:hover { background: rgba(36, 62, 89, .045); }
.toolkit-table td { padding: .58rem .2rem; border: 0; color: var(--ink); vertical-align: middle; }
.toolkit-table td:last-child { text-align: right; white-space: nowrap; }
.toolkit-table strong { display: block; font-size: .82rem; font-weight: 700; }
.tool-detail { display: block; margin-top: .08rem; color: var(--ink-muted); font-size: .72rem; line-height: 1.35; }
.skill-badge { display: inline-flex; min-height: 23px; align-items: center; padding: .16rem .5rem; border: 1px solid #bdcbd6; border-radius: 999px; background: var(--pine-light); color: var(--pine); font-size: .7rem; font-weight: 700; letter-spacing: .025em; }
.skill-familiar { border-color: #dfc4a1; background: #f6ede1; color: #684927; }
.skill-intermediate { border-color: #bdcbd6; background: #e5edf3; color: #243e59; }
.skill-advanced { border-color: #e0b6a4; background: #f6e6df; color: #78412c; }
.toolkit-legend { position: sticky; top: 0; padding: 1rem 0 0 1.1rem; border-left: 1px solid var(--rule); background: transparent; }
.toolkit-legend h3 { margin: 0 0 .8rem; color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: 1.2rem; font-weight: 400; }
.legend-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.legend-list li { display: grid; gap: .22rem; }
.legend-list p { margin: 0; color: var(--ink-muted); font-size: .72rem; line-height: 1.4; }
.toolkit-note { max-width: 70ch; margin: 1.6rem 0 0 !important; color: var(--ink-muted) !important; font-size: .8rem !important; text-align: left !important; }

.certificates-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.certificate-card { overflow: hidden; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-bright); box-shadow: none; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.certificate-card:hover { transform: translateY(-3px); border-color: #aebfcd; box-shadow: 0 8px 22px rgba(36, 62, 89, .09); }
.certificate-img-container { overflow: hidden; aspect-ratio: 1.42; background: var(--paper-shadow); }
.certificate-img-container img { width: 100%; height: 100%; object-fit: cover; }
.certificate-body { padding: .75rem .85rem .9rem; }
.certificate-body h3 { margin: 0 0 .25rem; color: var(--pine); font-size: .88rem; }
.certificate-body p { margin: 0; color: var(--ink-muted); font-size: .75rem; }
.certificate-tasks { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.task-tag { font-size: .7rem; }
.certificate-placeholder { padding: 1rem; color: var(--ink-muted); text-align: center; }
.certificate-card.others-card .certificate-img-container { aspect-ratio: 1.4; }
.collage-stack { display: grid; height: 100%; place-items: center; padding: .8rem; }
.related-credential-mark { display: grid; gap: .35rem; color: var(--signal-dark); font: 600 .9rem/1.1 'DM Sans', sans-serif; letter-spacing: .18em; text-align: center; }
.related-credential-mark span { color: var(--ink-muted); font-size: .58rem; letter-spacing: .24em; }
.certificate-card.others-card .certificate-body p { margin: 0; }

.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 3.2rem); border-top: 1px solid var(--rule); }
.portfolio-card { padding: 1.1rem 0 1.3rem; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.portfolio-card:hover { transform: none; border-color: var(--signal); background: transparent; box-shadow: none; }
.portfolio-body { padding: 0; }
.portfolio-body h3 { margin: 0 0 .35rem; color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.portfolio-body p { margin: 0; color: var(--ink-soft); font-size: .83rem; }

.support-grid, .why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.3rem, 3vw, 3.1rem); border-top: 1px solid var(--rule); }
.support-card, .why-card { padding: 1.1rem 0 1.3rem; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.support-card:hover, .why-card:hover { transform: none; border-color: var(--signal); background: transparent; }
.support-card h3, .why-card h3 { margin-bottom: .45rem; }
.why-grid__footer { grid-column: 1 / -1; padding: 1rem 0; border: 0; background: transparent; }
.why-grid__footer .tagline { color: var(--signal-dark); font-size: .84rem; font-weight: 700; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(300px, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.contact-category-label { margin: 0 0 .55rem; color: var(--signal-dark); font-size: .7rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.contact-method { display: grid; grid-template-columns: 130px 1fr; gap: .6rem; align-items: baseline; margin: 0 0 .6rem !important; padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.contact-method span { color: var(--ink-muted); font-size: .76rem; }
.contact-method a, .contact-method p { margin: 0; color: var(--ink); font-size: .86rem; }
.contact-method a { text-decoration-color: #9aa89c; text-underline-offset: 3px; }
.contact-method a:hover { color: var(--signal-dark); }
.social-icons { display: flex; gap: .5rem; margin: 1rem 0 1.4rem; }
.social-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper-bright); color: var(--pine); transition: background .2s ease, color .2s ease; }
.social-icon svg { width: 17px; height: 17px; }
.social-icon:hover { background: var(--pine); color: var(--paper-bright); }
.contact-card { padding: clamp(1rem, 2vw, 1.6rem); border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-bright); box-shadow: none; }
.form-group { margin-bottom: .9rem; }
.form-group label { display: block; margin-bottom: .3rem; color: var(--ink); font-size: .78rem; font-weight: 700; }
.form-control { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #cbd5dc; border-radius: 8px; background: #fff; color: var(--ink); font-size: .9rem; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-control:focus { border-color: var(--pine); outline: 3px solid rgba(36, 62, 89, .16); }
.form-status { margin-top: .7rem; font-size: .82rem; }
.form-status.success { color: #1e6a46; }
.form-status.error { color: #a33f2c; }

.btn { position: relative; isolation: isolate; display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1rem; overflow: hidden; border: 1px solid rgba(36, 62, 89, .15); border-radius: 999px; background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .68)); color: var(--pine); font-size: .82rem; font-weight: 700; letter-spacing: .015em; text-align: center; text-decoration: none; -webkit-backdrop-filter: blur(18px) saturate(145%); backdrop-filter: blur(18px) saturate(145%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(36, 62, 89, .05), 0 5px 14px rgba(36, 62, 89, .1); cursor: pointer; transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s ease, border-color .24s ease, background .24s ease; }
.btn-primary { border-color: rgba(201, 107, 71, .26); background: linear-gradient(135deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .6)), var(--signal); color: var(--pine-deep); }
.btn-primary:hover { transform: translateY(-2px); border-color: rgba(201, 107, 71, .5); box-shadow: inset 0 1px 0 #fff, 0 9px 18px rgba(36, 62, 89, .15); }
.btn-secondary { border-color: rgba(255, 255, 255, .34); background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .09)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 5px 14px rgba(11, 27, 42, .13); }
.btn-secondary:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .62); background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .13)); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline-offset: 4px; }
.persistent-cta { display: none; }
body.nav-panels-ready .persistent-cta { position: fixed; z-index: 40; right: auto; bottom: max(1.1rem, env(safe-area-inset-bottom)); left: 0; display: flex; width: var(--rail); flex-direction: column; gap: .55rem; padding: 0 clamp(1.35rem, 2.2vw, 2.35rem); border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
body.nav-panels-ready .persistent-cta .btn { width: 100%; min-height: 46px; }

.certificates-modal, .others-modal { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 1rem; background: rgba(12, 28, 43, .76); }
.certificates-modal.active, .others-modal.active { display: grid; }
.modal-content { position: relative; width: min(100%, 900px); max-height: min(90dvh, 760px); overflow: auto; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-bright); color: var(--ink); }
.modal-close { position: sticky; z-index: 1; top: .5rem; float: right; width: 40px; height: 40px; margin: .5rem .5rem -40px 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper-bright); color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); gap: 1rem; padding: 1.5rem; }
.modal-body > img { width: 100%; max-height: 70dvh; object-fit: contain; }
.modal-info h3 { margin: 0 0 .5rem; color: var(--pine); font-family: 'DM Serif Display', Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.modal-info p { color: var(--ink-soft); }
.others-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.footer-copy, .footer-meta { display: none; }

@media (max-width: 1080px) {
  :root { --rail: 282px; --topbar: 70px; }
  nav ul { justify-content: flex-start; gap: .9rem; }
  nav a { font-size: .72rem; }
  .competency-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --rail: 0px; --topbar: 58px; --profile-height: 128px; }
  body.nav-panels-ready > #home.hero { inset: 0 0 auto; width: 100%; height: var(--profile-height); padding: .75rem 1rem; }
  .hero-grid { flex-direction: row; align-items: center; gap: .85rem; }
  .hero-image-wrapper { width: auto; flex: 0 0 auto; }
  .profile-circle { width: 62px; height: 62px; }
  .hero-content { min-width: 0; }
  .profile-name { margin-bottom: .12rem !important; font-size: .7rem !important; }
  .hero h1 { max-width: none; font-size: clamp(1.25rem, 5vw, 1.75rem); }
  .hero p { max-width: 50ch; margin-top: .28rem; font-size: .75rem; line-height: 1.4; }
  header { inset: var(--profile-height) 0 auto; height: var(--topbar); }
  header .container { justify-content: flex-start; padding: 0 1rem; }
  nav { width: 100%; }
  nav ul { width: max-content; min-width: 100%; justify-content: flex-start; gap: 1.05rem; }
  nav a { min-height: 42px; font-size: .75rem; }
  body.nav-panels-ready > section.is-active:not(#home) { inset: calc(var(--profile-height) + var(--topbar)) 0 0; padding: 1.35rem clamp(1rem, 4vw, 2rem) 1.5rem; }
  .section-header h2 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(170px, .7fr); gap: 1.4rem; }
  .toolkit-wrapper { grid-template-columns: 1fr; }
  .toolkit-legend { position: static; display: grid; grid-template-columns: 170px 1fr; gap: .75rem; padding: .8rem 0 0; border-top: 1px solid var(--rule); border-left: 0; }
  .legend-list { grid-template-columns: repeat(3, 1fr); }
  body.nav-panels-ready .persistent-cta { right: 0; bottom: 0; left: 0; width: 100%; flex-direction: row; gap: .55rem; padding: .55rem .75rem max(.55rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(18px) saturate(145%); backdrop-filter: blur(18px) saturate(145%); }
  body.nav-panels-ready .persistent-cta .btn { flex: 1; min-height: 44px; }
  body.nav-panels-ready > section.is-active:not(#home) { padding-bottom: 7.5rem; }
  body.nav-panels-ready .persistent-cta .btn { width: auto; }
  body.nav-panels-ready .persistent-cta .btn-secondary { border-color: rgba(36, 62, 89, .16); background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .72)); color: var(--pine); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(36, 62, 89, .08); }
  body.nav-panels-ready .persistent-cta .btn-secondary:hover { border-color: rgba(36, 62, 89, .28); background: #fff; }
  nav { mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.3rem), transparent 100%); }
}

@media (max-width: 560px) {
  :root { --topbar: 54px; --profile-height: 128px; }
  body.nav-panels-ready > #home.hero { height: var(--profile-height); padding: .7rem .85rem; }
  .hero-grid { gap: .7rem; }
  .profile-circle { width: 54px; height: 54px; }
  .hero h1 { font-size: 1.22rem; }
  .hero p { margin-top: .2rem; font-size: .7rem; }
  header { top: var(--profile-height); }
  header .container { padding: 0 .85rem; }
  nav ul { gap: .9rem; }
  nav a { font-size: .71rem; }
  body.nav-panels-ready > section.is-active:not(#home) { inset: calc(var(--profile-height) + var(--topbar)) 0 0; padding: 1.15rem .95rem 1.2rem; }
  .section-header { margin-bottom: 1.15rem; }
  .section-header h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .about-grid, .education-grid, .toolkit-content, .contact-grid { grid-template-columns: 1fr !important; }
  .about-grid { gap: 1.2rem; }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); gap: .65rem; border-top: 1px solid var(--rule); }
  .metric-card { padding: .6rem 0; }
  .metric-num { font-size: 1.55rem; }
  .metric-label { font-size: .67rem; line-height: 1.35; }
  .competency-grid, .education-grid, .support-grid, .why-grid { grid-template-columns: 1fr; }
  .competency-card { grid-template-columns: 1fr; gap: .25rem; padding: .8rem 0; }
  .competency-card h3 { font-size: 1.1rem; }
  .toolkit-content { gap: 1.25rem; }
  .toolkit-legend { display: block; }
  .legend-list { grid-template-columns: 1fr; }
  .certificates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .certificate-body { padding: .6rem; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .support-grid, .why-grid { gap: 0; }
  .contact-method { grid-template-columns: 104px 1fr; }
  .modal-body { grid-template-columns: 1fr; padding: .9rem; }
  .modal-body > img { max-height: 48dvh; }
  .others-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
  :root { --profile-height: 144px; }
}

@media (max-height: 650px) and (min-width: 821px) {
  body.nav-panels-ready > #home.hero { padding-top: 1rem; }
  .hero-grid { gap: .7rem; }
  .profile-circle { width: 76px; height: 76px; }
  .hero h1 { font-size: 1.55rem; }
  .hero p { margin-top: .55rem; font-size: .82rem; }
  body.nav-panels-ready .persistent-cta { bottom: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Porcelain + ink navy: translucent controls, small moments of motion, and legible fallbacks. */
html { scrollbar-color: #b9c6d0 var(--paper); }
header { background: var(--glass-surface); }
nav a { min-height: 40px; padding: .25rem .42rem; border: 1px solid transparent; border-radius: 999px; transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
nav a::after { display: none; }
nav a:hover { background: rgba(36, 62, 89, .045); }
nav a.active { border-color: rgba(36, 62, 89, .11); background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .68)); box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(36, 62, 89, .07); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
body.nav-panels-ready .persistent-cta .btn-primary { border-color: rgba(255, 255, 255, .72); }
body.nav-panels-ready .persistent-cta .btn-primary:hover { border-color: rgba(255, 255, 255, .95); }
.modal-close, .social-icon { border-radius: 999px; -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 4px 12px rgba(36, 62, 89, .08); transition: transform .22s var(--ease), background .22s ease, border-color .22s ease, box-shadow .22s ease; }
.modal-close:hover, .social-icon:hover { transform: translateY(-1px); }
@media (max-width: 820px) {
  header { background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(18px) saturate(145%); backdrop-filter: blur(18px) saturate(145%); }
}
@media (prefers-reduced-transparency: reduce) {
  header, body.nav-panels-ready .persistent-cta, nav a.active, .btn, .modal-close, .social-icon { -webkit-backdrop-filter: none; backdrop-filter: none; }
  header { background: #fff; }
  nav a.active, .btn, .modal-close, .social-icon { box-shadow: 0 4px 12px rgba(36, 62, 89, .08); }
}
@media (max-width: 820px) and (prefers-reduced-transparency: reduce) {
  body.nav-panels-ready .persistent-cta { background: #fff; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header { background: rgba(255, 255, 255, .96); }
  nav a.active, .btn { background-color: #fff; }
}
@media (prefers-reduced-motion: no-preference) {
  body.nav-panels-ready > #home.hero .hero-image-wrapper { animation: profile-arrive .62s cubic-bezier(.16, 1, .3, 1) both; }
  body.nav-panels-ready > #home.hero .hero-content { animation: profile-arrive .62s .08s cubic-bezier(.16, 1, .3, 1) both; }
  body.nav-panels-ready .persistent-cta .btn:first-child { animation: profile-arrive .58s .14s cubic-bezier(.16, 1, .3, 1) both; }
  body.nav-panels-ready .persistent-cta .btn:last-child { animation: profile-arrive .58s .22s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes profile-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}
