/*==============================================================
  Lester Chico's Digital Portfolio — main.css
  Version: 1.18.10

  The ONE stylesheet for the site (replaces main.css + style.css +
  accessibility.css from v1.0.0). Vendor libraries keep their own
  files in assets/vendor/.

  TABLE OF CONTENTS
   0. Design tokens  (:root — colors, fonts, effects)  <-- EDIT HERE
   1. General (body, links, headings, selection, scrollbar)
   2. Back to top
   3. Preloader
   4. Header & navigation
   5. Hero
   6. Sections general
   7. About
   8. Facts
   9. Skills
  10. Resume
  11. Certification
  12. Portfolio
  13. Services
  14. Contact
  15. Payment methods
  16. Footer
  17. Buttons & form controls
  18. Light/Dark switch & stars
  19. Dark mode overrides  (body.dark-mode)
==============================================================*/


/*--------------------------------------------------------------
# 0. Design tokens
#
# To re-theme the site, change the values in this block only.
# Layer 1 = palette (raw colors). Layer 2 = roles (what the
# colors are used for). Rules below only use the tokens.
--------------------------------------------------------------*/
:root {
  /* ---- Fonts -------------------------------------------- */
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Raleway", sans-serif;
  --font-accent: "Poppins", sans-serif;
  /* Note: Space Mono is not loaded by index.html, so browsers
     currently fall back to Arial (same as v1.0.0). */
  --font-button: "Space Mono", Arial, serif;

  /* ---- Palette ------------------------------------------ */
  --color-navy: #161B40;
  --color-white: #fff;
  --color-black: #121212;
  --color-slate: #45505b;
  --color-gray: #5A5A5A;
  --color-silver: #A5A5A5;
  --color-cloud: #f2f3f5;
  --color-mist: #f7f8f9;
  --color-fog: #f2f2f2;
  --color-ash: #f5f5f5;
  --color-line: #e6e9ec;
  --color-rule: #ddd;
  --color-corner: #d7dce1;
  --color-text-soft: #666;
  --color-text-blue: #728394;
  --color-payment: #b2bec3;
  --color-red: red;

  /* ---- Accents (service icons) -------------------------- */
  --color-accent-blue: #47aeff;
  --color-accent-orange: #ffa76e;
  --color-accent-pink: #e80368;
  --color-accent-yellow: #ffbb2c;
  --color-accent-red: #ff5828;
  --color-accent-teal: #11dbcf;

  /* ---- Status / feedback -------------------------------- */
  --color-sun: #f39c12;
  --color-moon: #f1c40f;
  --color-link-hover-blue: #0678e3;

  /* ---- Unified Midnight Navy system (v1.18.23) ----------- */
  /* Edit these values to tune all dark-mode surfaces consistently. */
  --theme-dark-page: #0b1220;
  --theme-dark-header: #0d1730;
  --theme-dark-surface: #162238;
  --theme-dark-raised: #192a4b;
  --theme-dark-border: #304466;
  --theme-dark-text: #e5ecfa;
  --theme-dark-muted: #a6b6d2;
  --theme-dark-accent: #8fb5fa;
  --theme-dark-accent-ink: #10203f;
  --theme-dark-focus: #b7caff;
  --theme-dark-journey: #17264c;
  --theme-dark-journey-card: #263d68;
  --theme-dark-journey-hover: #344e7f;
  --theme-dark-journey-border: #49628d;
  --theme-dark-journey-muted: #c8d5ec;
  --theme-dark-assistant-menu: #1b2943;
  --theme-dark-assistant-border: #40516e;
  --theme-dark-assistant-hover: #2a3b58;

  /* ---- Roles (light theme) ------------------------------ */
  --color-primary: var(--color-navy);        /* brand color: headings, buttons, accents */
  --color-on-primary: var(--color-white);    /* text/icons on top of the brand color   */
  --color-bg: var(--color-white);            /* page background                        */
  --color-text: var(--color-black);          /* page text                              */
  --color-text-muted: var(--color-slate);    /* nav, hero text, secondary text         */
  --color-surface: var(--color-cloud);       /* nav pills, progress track              */
  --color-surface-soft: var(--color-mist);   /* small tags, footer, icon circles       */
  --color-hover-muted: var(--color-silver);  /* hover color for subtle links           */
  --color-scroll-track: var(--color-fog);
  --color-scroll-thumb: var(--color-primary);
  --color-scroll-thumb-hover: var(--color-silver);
  --color-selection-bg: var(--color-primary);
  --color-selection-text: var(--color-white);
  --color-input-border: rgba(0, 0, 0, 0.1);
  --color-error-text: var(--color-red);

  /* ---- Roles (dark theme, used under body.dark-mode) ---- */
  --dm-bg: var(--theme-dark-page);
  --dm-text: var(--theme-dark-text);
  --dm-muted: var(--theme-dark-muted);
  --dm-accent: var(--color-white);
  --dm-scroll-thumb: var(--color-fog);
  --dm-scroll-track-webkit: var(--color-gray);
  --dm-scroll-track-firefox: var(--color-navy);

  /* ---- Effects ------------------------------------------ */
  --hero-overlay: rgba(255, 255, 255, 0.8);
  --portfolio-wrap-bg: rgba(69, 80, 91, 0.8);
  --portfolio-hover-overlay: rgba(255, 255, 255, 0.7);
  --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-icon-box: 0px 5px 90px 0px rgba(110, 123, 131, 0.05);
  --shadow-icon-box-hover: 0px 0 35px 0 rgba(0, 0, 0, 0.08);
  --radius-pill: 50px;
}

/* The dark theme re-points the two page-level roles. */
body.dark-mode {
  --color-bg: var(--dm-bg);
  --color-text: var(--dm-text);
  --color-text-muted: var(--theme-dark-muted);
  --color-surface: var(--theme-dark-surface);
  --color-surface-soft: var(--theme-dark-raised);
  --color-input-border: var(--theme-dark-border);
}


/*--------------------------------------------------------------
# 1. General
--------------------------------------------------------------*/
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color 0.3s, color 0.3s;
}

a,
a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

::selection {
  color: var(--color-selection-text);
  background: var(--color-selection-bg);
}

/* Scroll bar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--color-scroll-track);
}

::-webkit-scrollbar-thumb {
  background: var(--color-scroll-thumb);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-scroll-thumb-hover);
}

*,
body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scroll-thumb) var(--color-scroll-track);
}


/*--------------------------------------------------------------
# 2. Back to top button
--------------------------------------------------------------*/
.progress-container {
  position: fixed;
  right: 15px;
  bottom: 15px;
  z-index: 996;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-circle {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-circle circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-dasharray: 113;
  stroke-dashoffset: 113;
  transition: stroke-dashoffset 0.4s;
}

.back-to-top {
  position: relative;
  visibility: hidden;
  opacity: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  transition: all 0.4s;
}

.back-to-top i {
  font-size: 28px;
  color: var(--color-primary);
  line-height: 0;
}

.back-to-top:hover i {
  color: var(--color-on-primary);
}

.back-to-top:hover,
.back-to-top:active {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}


/*--------------------------------------------------------------
# 3. Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader img {
  width: 100px;
  height: auto;
}

#loading-counter {
  position: absolute;
  top: calc(60% + 50px);
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: bold;
  color: var(--color-primary);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Disable AOS animation delay on mobile devices */
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}


/*--------------------------------------------------------------
# 4. Header & navigation
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 9997;
  transition: all 0.5s;
  padding: 15px;
  overflow-y: auto;
}

@media (max-width: 991px) {
  #header {
    width: 300px;
    background: var(--color-white);
    border-right: 1px solid var(--color-line);
    left: -300px;
  }
}

@media (min-width: 991px) {
  #main {
    margin-left: 100px;
  }
}

/* Desktop navigation */
.nav-menu {
  padding: 0;
  display: block;
}

.nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu>ul>li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a,
.nav-menu a:focus {
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  padding: 10px 18px;
  margin-bottom: 8px;
  font-size: 15px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  height: 56px;
  width: 100%;
  overflow: hidden;
  transition: 0.3s;
}

.nav-menu a i,
.nav-menu a:focus i {
  font-size: 20px;
}

.nav-menu a span,
.nav-menu a:focus span {
  padding: 0 5px 0 7px;
  color: var(--color-text-muted);
}

@media (min-width: 992px) {

  .nav-menu a,
  .nav-menu a:focus {
    width: 56px;
  }

  .nav-menu a span,
  .nav-menu a:focus span {
    display: none;
    color: var(--color-on-primary);
  }
}

.nav-menu a:hover,
.nav-menu .active,
.nav-menu .active:focus,
.nav-menu li:hover>a {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.nav-menu a:hover span,
.nav-menu .active span,
.nav-menu .active:focus span,
.nav-menu li:hover>a span {
  color: var(--color-on-primary);
}

.nav-menu a:hover,
.nav-menu li:hover>a {
  width: 100%;
}

.nav-menu a:hover span,
.nav-menu li:hover>a span {
  display: block;
}

/* Mobile navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 10px;
  top: 10px;
  z-index: 9998;
  border: 0;
  background: none;
  font-size: 28px;
  transition: all 0.4s;
  outline: none !important;
  line-height: 0;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 5px;
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active #header {
  left: 0;
}

.mobile-nav-active .mobile-nav-toggle {
  color: var(--color-on-primary);
  background-color: var(--color-primary);
}


/*--------------------------------------------------------------
# 5. Hero
--------------------------------------------------------------*/
#hero {
  width: 100%;
  height: 100vh;
  background: url("../img/hero-bg.jpg") top right no-repeat;
  background-size: cover;
  position: relative;
}

@media (min-width: 992px) {
  #hero {
    padding-left: 160px;
  }
}

#hero:before {
  content: "";
  background: var(--hero-overlay);
  position: absolute;
  bottom: 0;
  top: 0;
  left: 0;
  right: 0;
}

#hero h1 {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  line-height: 56px;
  color: var(--color-primary);
}

#hero p {
  color: var(--color-text-muted);
  margin: 15px 0 0 0;
  font-size: 26px;
  font-family: var(--font-accent);
}

#hero p span {
  color: var(--color-primary);
  letter-spacing: 3px;
}

#hero .social-links {
  margin-top: 30px;
}

#hero .social-links a {
  font-size: 30px;
  display: inline-block;
  color: var(--color-primary);
  line-height: 1;
  margin-right: 20px;
  transition: 0.3s;
}

#hero .social-links a:hover {
  color: var(--color-on-primary);
}

@media (max-width: 992px) {
  #hero {
    text-align: center;
  }

  #hero h1 {
    font-size: 32px;
    line-height: 36px;
  }

  #hero p {
    margin-top: 10px;
    font-size: 20px;
    line-height: 24px;
  }
}


/*--------------------------------------------------------------
# 6. Sections general
--------------------------------------------------------------*/
section {
  padding: 60px 0;
  overflow: hidden;
}

.section-title {
  text-align: center;
  padding-bottom: 30px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
  color: var(--color-primary);
}

.section-title h2::before {
  content: "";
  position: absolute;
  display: block;
  width: 120px;
  height: 1px;
  background: var(--color-rule);
  bottom: 1px;
  left: calc(50% - 60px);
}

.section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  bottom: 0;
  left: calc(50% - 20px);
}

.section-title p {
  margin-bottom: 0;
}


/*--------------------------------------------------------------
# 7. About
--------------------------------------------------------------*/
.about .content h3 {
  font-weight: 700;
  font-size: 26px;
  color: var(--color-primary);
}

.about .content ul {
  list-style: none;
  padding: 0;
}

.about .content ul li {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.about .content ul strong {
  margin-right: 10px;
}

.about .content ul i {
  font-size: 16px;
  margin-right: 5px;
  color: var(--color-primary);
  line-height: 0;
}

.about .content p:last-child {
  margin-bottom: 0;
}


/*--------------------------------------------------------------
# 8. Facts
--------------------------------------------------------------*/
.facts .count-box {
  padding: 30px 30px 25px 30px;
  margin-top: 30px;
  width: 100%;
  position: relative;
  text-align: center;
  background: var(--color-white);
}

.facts .count-box i {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.facts .count-box span {
  font-size: 36px;
  display: block;
  font-weight: 600;
  color: var(--color-primary);
}

.facts .count-box p {
  padding: 0;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 14px;
}


.facts .count-box span[data-suffix]::after {
  content: attr(data-suffix);
}


/*--------------------------------------------------------------
# 9. Skills
--------------------------------------------------------------*/
.skills .progress {
  height: 60px;
  display: block;
  background: none;
  border-radius: 0;
}

.skills .progress .skill {
  padding: 10px 0;
  margin: 0;
  text-transform: uppercase;
  display: block;
  font-weight: 600;
  font-family: var(--font-accent);
  color: var(--color-text-muted);
}

.skills .progress .skill .val {
  float: right;
  font-style: normal;
}

.skills .progress-bar-wrap {
  background: var(--color-surface);
}

.skills .progress-bar {
  width: 1px;
  height: 10px;
  transition: 0.9s;
  background-color: var(--color-primary);
}


.skills .skills-subtitle {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: var(--color-primary);
}

.skills .skill-group-title {
  font-family: var(--font-accent);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 10px 0;
  color: var(--color-text-muted);
}

.skills .skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px 0;
}

.skills .skill-tags li {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  background: var(--color-white);
}


/*--------------------------------------------------------------
# 10. Resume
--------------------------------------------------------------*/
.resume .resume-title {
  font-size: 26px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.download-resume {
  text-align: center;
}

.btn-download {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-download:hover,
.btn-download:active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.resume .resume-item {
  padding: 0 0 20px 20px;
  margin-top: -2px;
  border-left: 2px solid var(--color-primary);
  position: relative;
}

.resume .resume-item h4 {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-accent);
  color: var(--color-primary);
  margin-bottom: 10px;
}

.resume .resume-item h5 {
  font-size: 16px;
  background: var(--color-surface-soft);
  color: var(--color-primary);
  padding: 5px 15px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 10px;
}

.resume .resume-item ul {
  padding-left: 20px;
}

.resume .resume-item ul li {
  padding-bottom: 10px;
}

.resume .resume-item:last-child {
  padding-bottom: 0;
}

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  left: -9px;
  top: 0;
  background: var(--color-white);
  border: 2px solid var(--color-primary);
}

/* Education logos (were inline styles) */
.edu-logo {
  height: 100px;
  width: 100px;
}

.edu-logo--inline {
  display: inline-block;
}


/*--------------------------------------------------------------
# 11. Certification
--------------------------------------------------------------*/
.cert-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
}

.cert-item {
  display: flex;
  min-width: 0;
  height: 100%;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

@media (min-width: 576px) and (max-width: 991px) {
  .cert-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Center the third (last visible) card before Show More is expanded. */
  .cert-container:not(.expanded) > .cert-item:nth-child(3) {
    grid-column: 1 / -1;
    width: calc((100% - 20px) / 2);
    justify-self: center;
  }
}

@media (max-width: 575px) {
  .cert-container { grid-template-columns: minmax(0, 1fr); }
}

.cert-item:hover {
  transform: scale(1.05);
}

.cert-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.cert-img {
  width: 100%;
  border-radius: 8px 8px 0 0;
  height: auto;
}

.cert-content h3 {
  margin: 10px 0 0;
  font-size: 1.25em;
  color: var(--color-primary);
  font-weight: bold;
}

.cert-content p {
  margin: 10px 0;
  color: var(--color-text-soft);
}

.cert-content a {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: bold;
}

.cert-content a:hover {
  color: var(--color-hover-muted);
  text-decoration: none;
}

/* Verified credentials share the same bottom-aligned link position as other cards. */
.cert-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.cert-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  flex-shrink: 0;
}

.cert-content .cert-actions a {
  margin-top: 0;
  padding-top: 0;
}

.cert-content a .bi { font-size: 0.75em; margin-left: 3px; vertical-align: baseline; }

body.dark-mode .cert-verified { color: var(--dm-text); }

.cert-show-more {
  text-align: center;
}


/*--------------------------------------------------------------
# 12. Portfolio
--------------------------------------------------------------*/
.portfolio .portfolio-item {
  margin-bottom: 30px;
}

.portfolio #portfolio-flters {
  margin: 0 auto 25px auto;
  list-style: none;
  text-align: center;
  background: var(--color-white);
  border-radius: var(--radius-pill);
  padding: 2px 15px;
}

.portfolio #portfolio-flters li {
  cursor: pointer;
  display: inline-block;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  margin-bottom: 5px;
  transition: all 0.3s ease-in-out;
}

.portfolio #portfolio-flters li:hover,
.portfolio #portfolio-flters li.filter-active {
  color: var(--color-on-primary);
  background-color: var(--color-primary);
}

.portfolio #portfolio-flters li:last-child {
  margin-right: 0;
}

.portfolio .portfolio-wrap {
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: var(--portfolio-wrap-bg);
}

.portfolio .portfolio-wrap::before {
  content: "";
  background: var(--portfolio-hover-overlay);
  position: absolute;
  left: 30px;
  right: 30px;
  top: 30px;
  bottom: 30px;
  transition: all ease-in-out 0.3s;
  z-index: 2;
  opacity: 0;
}

.portfolio .portfolio-wrap .portfolio-info {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  z-index: 3;
  transition: all ease-in-out 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.portfolio .portfolio-wrap .portfolio-info::before {
  display: block;
  content: "";
  width: 48px;
  height: 48px;
  position: absolute;
  top: 35px;
  left: 35px;
  border-top: 3px solid var(--color-corner);
  border-left: 3px solid var(--color-corner);
  transition: all 0.5s ease 0s;
  z-index: 9994;
}

.portfolio .portfolio-wrap .portfolio-info::after {
  display: block;
  content: "";
  width: 48px;
  height: 48px;
  position: absolute;
  bottom: 35px;
  right: 35px;
  border-bottom: 3px solid var(--color-corner);
  border-right: 3px solid var(--color-corner);
  transition: all 0.5s ease 0s;
  z-index: 9994;
}

.portfolio .portfolio-wrap .portfolio-info h4 {
  font-size: 20px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.portfolio .portfolio-wrap .portfolio-info p {
  color: var(--color-text-muted);
  font-size: 14px;
  text-transform: uppercase;
  padding: 0;
  margin: 0;
}

.portfolio .portfolio-wrap .portfolio-links {
  text-align: center;
  z-index: 4;
}

.portfolio .portfolio-wrap .portfolio-links a {
  color: var(--color-text-muted);
  margin: 0 2px;
  font-size: 28px;
  display: inline-block;
  transition: 0.3s;
}

.portfolio .portfolio-wrap .portfolio-links a:hover {
  color: var(--color-text-muted);
}

.portfolio .portfolio-wrap:hover::before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 1;
}

.portfolio .portfolio-wrap:hover .portfolio-info {
  opacity: 1;
}

.portfolio .portfolio-wrap:hover .portfolio-info::before {
  top: 15px;
  left: 15px;
}

.portfolio .portfolio-wrap:hover .portfolio-info::after {
  bottom: 15px;
  right: 15px;
}


/*--------------------------------------------------------------
# 13. Services
--------------------------------------------------------------*/
.services .icon-box {
  text-align: center;
  padding: 70px 20px 80px 20px;
  transition: all ease-in-out 0.3s;
  background: var(--color-white);
  box-shadow: var(--shadow-icon-box);
}

.services .icon-box .icon {
  margin: 0 auto;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: ease-in-out 0.3s;
  position: relative;
}

.services .icon-box .icon i {
  font-size: 36px;
  transition: 0.5s;
  position: relative;
}

.services .icon-box .icon svg {
  position: absolute;
  top: 0;
  left: 0;
}

.services .icon-box .icon svg path {
  transition: 0.5s;
  fill: var(--color-ash);
}

.services .icon-box h4 {
  font-weight: 600;
  margin: 10px 0 15px 0;
  font-size: 22px;
}

.services .icon-box h4 {
  color: var(--color-primary);
  transition: ease-in-out 0.3s;
}

.services .icon-box p {
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
}

.services .icon-box:hover {
  border-color: var(--color-white);
  box-shadow: var(--shadow-icon-box-hover);
}

/* Icon colors — each variant sets one accent token. */
.services .iconbox-blue   { --icon-accent: var(--color-accent-blue); }
.services .iconbox-orange { --icon-accent: var(--color-accent-orange); }
.services .iconbox-pink   { --icon-accent: var(--color-accent-pink); }
.services .iconbox-yellow { --icon-accent: var(--color-accent-yellow); }
.services .iconbox-red    { --icon-accent: var(--color-accent-red); }
.services .iconbox-teal   { --icon-accent: var(--color-accent-teal); }

.services .iconbox-blue i,
.services .iconbox-orange i,
.services .iconbox-pink i,
.services .iconbox-yellow i,
.services .iconbox-red i,
.services .iconbox-teal i {
  color: var(--icon-accent);
}

.services .iconbox-blue:hover .icon i,
.services .iconbox-orange:hover .icon i,
.services .iconbox-pink:hover .icon i,
.services .iconbox-yellow:hover .icon i,
.services .iconbox-red:hover .icon i,
.services .iconbox-teal:hover .icon i {
  color: var(--color-on-primary);
}

.services .iconbox-blue:hover .icon path,
.services .iconbox-orange:hover .icon path,
.services .iconbox-pink:hover .icon path,
.services .iconbox-yellow:hover .icon path,
.services .iconbox-red:hover .icon path,
.services .iconbox-teal:hover .icon path {
  fill: var(--icon-accent);
}


/*--------------------------------------------------------------
# 14. Contact
--------------------------------------------------------------*/
.contact .info {
  width: 100%;
  background: var(--color-white);
}

.contact .info i {
  font-size: 20px;
  color: var(--color-primary);
  float: left;
  width: 44px;
  height: 44px;
  background: var(--color-surface-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-pill);
  transition: all 0.3s ease-in-out;
}

.contact .info h4 {
  padding: 0 0 0 60px;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--color-text-muted);
}

.contact .info p {
  padding: 0 0 0 60px;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--color-text-blue);
}

.contact .info .email,
.contact .info .phone {
  margin-top: 40px;
}

.contact .info .email:hover i,
.contact .info .address:hover i,
.contact .info .phone:hover i {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* Consistent vertical rhythm across all contact fields, verification and button.
   The name row stays two columns from the Bootstrap sm breakpoint upward. */
.contact .contact-form .form-group {
  margin-bottom: 20px;
}

@media (max-width: 575.98px) {
  .contact .contact-name-fields > div:first-child {
    margin-bottom: 20px;
  }
}

.contact .contact-form textarea {
  height: 150px;
}

/* Form validation + accessible submission statuses.
   main.js shows/hides these by setting style.display. */
.invalid-feedback {
  display: none;
  color: var(--color-error-text);
}

/* Contact submission feedback: inline toast, aligned with form controls. */
.contact .form-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-primary);
  border-left: 4px solid var(--color-primary);
  border-radius: 10px;
  background: var(--color-surface-soft);
  color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(22, 27, 64, .08);
  font: 500 14px/1.55 var(--font-body);
}
.contact .form-toast[hidden] { display: none; }
.contact .form-toast-icon { flex-shrink: 0; font-size: 19px; line-height: 1.2; }
.contact .form-toast-text { flex: 1; min-width: 0; }
.contact .form-toast-close {
  flex-shrink: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.contact .form-toast-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.contact .form-toast[data-kind="error"] { border-left-color: #b34545; }
.contact .form-toast[data-kind="loading"] .form-toast-icon { animation: form-toast-spin 1.4s linear infinite; }
@keyframes form-toast-spin { to { transform: rotate(360deg); } }
body.dark-mode .contact .form-toast {
  background: #20243c;
  border-color: #707894;
  color: var(--dm-text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
body.dark-mode .contact .form-toast[data-kind="error"] { border-left-color: #e29a9a; }
@media (prefers-reduced-motion: reduce) {
  .contact .form-toast[data-kind="loading"] .form-toast-icon { animation: none; }
}


/*--------------------------------------------------------------
# 15. Payment methods
--------------------------------------------------------------*/
.payment {
  padding: 50px 15px;
}

.payment .payment-methods {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 45px;
  margin-left: auto;
  margin-right: auto;
}

.payment .payment-methods svg {
  color: var(--color-payment);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment .payment-methods svg:hover {
  color: var(--color-primary);
}


/*--------------------------------------------------------------
# 16. Footer
--------------------------------------------------------------*/
#footer {
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

#footer h3 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  font-family: var(--font-accent);
  padding: 0;
  margin: 0 0 15px 0;
}

#footer p {
  font-style: italic;
  padding: 0;
  margin: 0 0 40px 0;
}

#footer a:hover {
  color: var(--color-hover-muted);
}

#footer .social-links {
  margin: 0 0 40px 0;
}

#footer .social-links a {
  font-size: 18px;
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-on-primary);
  line-height: 1;
  padding: 8px 0;
  margin-right: 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

#footer .social-links a:hover {
  background: var(--color-white);
  color: var(--color-primary);
  text-decoration: none;
}

#footer .copyright {
  margin: 0 0 5px 0;
}

#footer .credits {
  font-size: 13px;
}

.footer-logo img {
  height: 60px;
  width: 60px;
}


/*--------------------------------------------------------------
# 17. Buttons & form controls (Bootstrap overrides)
--------------------------------------------------------------*/
.form-control {
  box-shadow: none;
  background: transparent;
  border: 2px solid var(--color-input-border);
  height: 54px;
  font-size: 18px;
  font-weight: 300;
  border-radius: 4px;
}

.form-control:focus,
.form-control:active {
  outline: none;
  box-shadow: none;
  border: 2px solid var(--color-primary);
}

input[type="text"] {
  height: 50px;
}

.form-group {
  margin-bottom: 30px;
}

.btn {
  margin-right: 4px;
  margin-bottom: 4px;
  font-family: var(--font-button);
  font-size: 16px;
  font-weight: 400;
  border-radius: 30px;
  transition: 0.5s;
  padding: 8px 20px;
}

.btn:hover,
.btn:active,
.btn:focus {
  box-shadow: none !important;
  outline: none !important;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: 2px solid var(--color-primary);
}

.btn-primary:hover:active,
.btn-primary:hover:not(:active) {
  background: var(--color-white) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary);
}


/*--------------------------------------------------------------
# 18. Light/Dark switch & stars
--------------------------------------------------------------*/
.toggle-container {
  position: relative;
  align-items: center;
}

#toggle-text {
  position: relative;
  top: 10px;
  color: var(--color-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-primary);
  transition: 0.5s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--color-white);
  transition: 0.5s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-black);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

#sun-icon,
#moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  transition: opacity 0.4s;
}

#sun-icon {
  left: 7.3px;
  color: var(--color-sun);
  opacity: 1;
}

#moon-icon {
  right: 6px;
  color: var(--color-moon);
  opacity: 0;
}

input:checked + .slider #sun-icon {
  opacity: 0;
}

input:checked + .slider #moon-icon {
  opacity: 1;
}

.stars {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1000;
  pointer-events: none;
}

.stars::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top left;
  animation: moveStars 120s linear infinite;
  filter: saturate(0%) brightness(1000%);
}

@keyframes moveStars {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, -50%, 0);
  }
}


/*==============================================================
# 19. Dark mode overrides
#
# Applied when <body class="dark-mode">. Colors come from the
# --dm-* tokens in section 0 (plus --color-* palette tokens).
==============================================================*/
body.dark-mode .stars {
  display: block;
}

body.dark-mode #toggle-text {
  color: var(--dm-text);
}

body.dark-mode .slider:before {
  background-color: var(--dm-bg);
}

body.dark-mode input:checked + .slider {
  background-color: var(--color-white);
}

/* Selection & scroll bar */
body.dark-mode ::selection {
  color: var(--dm-bg);
  background: var(--dm-text);
}

body.dark-mode ::-webkit-scrollbar-track {
  background: var(--dm-scroll-track-webkit);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--dm-scroll-thumb);
  border-radius: 6px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

body.dark-mode * {
  scrollbar-width: thin;
  scrollbar-color: var(--dm-scroll-thumb) var(--dm-scroll-track-firefox);
}

/* Back to top */
body.dark-mode .progress-circle circle {
  stroke: var(--dm-text);
}

body.dark-mode .back-to-top {
  background: transparent;
}

body.dark-mode .back-to-top:hover,
body.dark-mode .back-to-top:active {
  background: transparent;
  color: var(--dm-bg);
}

body.dark-mode .back-to-top i {
  color: var(--dm-text);
}

body.dark-mode .back-to-top:hover i {
  color: var(--dm-muted);
}

/* Preloader (background follows --color-bg) */
body.dark-mode #preloader img {
  filter: saturate(0%) brightness(1000%);
}

body.dark-mode #loading-counter {
  color: var(--dm-text);
}

/* Navigation */
body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu .active,
body.dark-mode .nav-menu .active:focus,
body.dark-mode .nav-menu li:hover>a {
  color: var(--dm-text);
  background: var(--dm-muted);
}

body.dark-mode .mobile-nav-toggle {
  color: var(--dm-text);
  background-color: transparent;
}

/* Hero */
body.dark-mode #hero {
  filter: grayscale(10%);
}

body.dark-mode #hero p {
  color: var(--dm-muted);
}

body.dark-mode #hero h1 {
  color: var(--dm-bg);
}

body.dark-mode #hero p span {
  color: var(--dm-bg);
}

body.dark-mode #hero .social-links a {
  color: var(--dm-bg);
}

body.dark-mode #hero .social-links a:hover {
  color: var(--dm-text);
}

/* Sections general */
body.dark-mode .section-title h2 {
  color: var(--dm-text);
}

body.dark-mode .section-title h2::after {
  background: var(--dm-accent);
}

/* About */
body.dark-mode .about .content h3 {
  color: var(--dm-text);
}

body.dark-mode .about .content ul i {
  color: var(--dm-text);
}

/* Facts */
body.dark-mode .facts .count-box {
  background: transparent;
}

body.dark-mode .facts .count-box i {
  background: transparent;
  border: 1px solid var(--dm-accent);
  color: var(--dm-text);
}

body.dark-mode .facts .count-box span {
  color: var(--dm-text);
}

/* Skills */
body.dark-mode .skills .progress .skill {
  color: var(--dm-text);
}

body.dark-mode .skills .progress-bar-wrap {
  background: var(--dm-muted);
}

body.dark-mode .skills .progress-bar {
  background-color: var(--dm-accent);
}

body.dark-mode .skills .skills-subtitle {
  color: var(--dm-text);
}

body.dark-mode .skills .skill-group-title {
  color: var(--color-silver);
}

body.dark-mode .skills .skill-tags li {
  background: transparent;
  border: 1px solid var(--dm-accent);
  color: var(--dm-text);
}

/* Resume */
body.dark-mode .resume .resume-title {
  color: var(--dm-text);
}

body.dark-mode .btn-download {
  background: transparent;
  color: var(--dm-text);
  border: 2px solid var(--dm-muted);
}

body.dark-mode .btn-download:hover,
body.dark-mode .btn-download:active {
  background: var(--dm-muted) !important;
  border-color: var(--dm-accent) !important;
  color: var(--dm-text);
}

body.dark-mode .resume .resume-item h5 {
  background: transparent;
  border: 1px solid var(--dm-accent);
  color: var(--dm-text);
}

body.dark-mode .resume-item h4 {
  color: var(--dm-text);
}

body.dark-mode .resume .resume-item {
  border-left: 2px solid var(--dm-accent);
}

body.dark-mode .resume .resume-item::before {
  background: var(--dm-bg);
  border: 2px solid var(--dm-accent);
}

/* Certification */
body.dark-mode .cert-item {
  background-color: transparent;
  border: 1px solid var(--dm-accent);
}

body.dark-mode .cert-content h3 {
  color: var(--dm-text);
}

body.dark-mode .cert-content p {
  color: var(--dm-muted);
}

body.dark-mode .cert-content a {
  color: var(--dm-text);
}

body.dark-mode .cert-content a:hover {
  color: var(--dm-muted);
}

body.dark-mode .btn-view-more {
  background: transparent;
  color: var(--dm-text);
}

/* Portfolio */
body.dark-mode #portfolio-flters {
  background: transparent;
}

body.dark-mode #portfolio-flters li {
  color: var(--dm-text);
}

body.dark-mode .portfolio #portfolio-flters li:hover,
body.dark-mode .portfolio #portfolio-flters li.filter-active {
  color: var(--dm-bg);
  background-color: var(--dm-accent);
}

/* Services */
body.dark-mode .services .icon-box {
  background: transparent;
  border: 1px solid var(--dm-accent);
}

body.dark-mode .services .icon-box h4 {
  color: var(--dm-text);
}

/* Payment methods */
body.dark-mode .payment .payment-methods svg:hover {
  color: var(--dm-text);
}

/* Contact */
body.dark-mode .contact .info {
  background: transparent;
}

body.dark-mode .contact .info i {
  color: var(--dm-text);
  background-color: var(--dm-muted);
}

body.dark-mode .contact .info h4,
body.dark-mode .contact .info p {
  color: var(--dm-text);
}

body.dark-mode .contact .info .email:hover i,
body.dark-mode .contact .info .address:hover i,
body.dark-mode .contact .info .phone:hover i {
  background: transparent;
  color: var(--dm-text);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: var(--dm-text);
}

body.dark-mode .form-control {
  background-color: transparent;
  border-color: var(--dm-muted);
}

body.dark-mode .form-control:active,
body.dark-mode .form-control:focus {
  border-color: var(--dm-accent);
}

body.dark-mode .contact .contact-form textarea,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"] {
  color: var(--dm-text);
}

body.dark-mode .btn-primary {
  background: transparent;
  color: var(--dm-text);
  border: 2px solid var(--dm-muted);
}

body.dark-mode .btn-primary:hover:active,
body.dark-mode .btn-primary:hover:not(:active) {
  background: var(--dm-muted) !important;
  border-color: var(--dm-accent) !important;
  color: var(--dm-text);
}

/* Footer */
body.dark-mode #footer {
  background: var(--dm-muted);
  color: var(--dm-bg);
}

body.dark-mode .footer-logo img {
  filter: saturate(0%) brightness(1000%);
}

body.dark-mode #footer h3,
body.dark-mode #footer p {
  color: var(--dm-text);
}

body.dark-mode #footer .social-links a {
  background: transparent;
  color: var(--dm-text);
}

body.dark-mode #footer a {
  color: var(--dm-text);
}

body.dark-mode #footer a:hover {
  color: var(--dm-bg);
}

body.dark-mode #footer .social-links a:hover {
  background: var(--dm-bg);
  color: var(--dm-text);
}

body.dark-mode #footer .copyright,
body.dark-mode #footer .credits {
  color: var(--dm-text);
}


/* Cisco course skills: compact inline launcher and accessible overlay. */
.cert-skills-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  padding: 9px 11px;
  background: rgba(22, 27, 64, .035);
  border: 1px solid rgba(22, 27, 64, .12);
  border-radius: 10px;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: .84rem;
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.cert-skills-trigger:hover { background: rgba(22, 27, 64, .085); border-color: rgba(22,27,64,.28); transform: translateY(-1px); }
.cert-skills-trigger:focus-visible, .cert-skills-dialog button:focus-visible { outline: 3px solid #648cda; outline-offset: 3px; }
.cert-skills-trigger-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: rgba(22,27,64,.09); flex-shrink: 0; }
.cert-skills-trigger-icon i { font-size: .96rem; }
.cert-skills-trigger-label { font-weight: 700; white-space: nowrap; }
.cert-skills-trigger-count { margin-left: auto; font-size: .73rem; opacity: .67; white-space: nowrap; }
.cert-skills-trigger-arrow { font-size: .8rem; opacity: .6; }
.cert-skills-dialog {
  width: min(580px, calc(100% - 32px));
  max-width: 580px;
  max-height: min(82dvh, 720px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(22,27,64,.1);
  border-radius: 18px;
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 22px 75px rgba(10,16,45,.23);
  overflow: auto;
}
.cert-skills-dialog::backdrop { background: rgba(12,17,35,.6); backdrop-filter: blur(5px); }
.cert-skills-dialog-inner { display: flex; flex-direction: column; }
.cert-skills-dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 28px 30px 21px; border-bottom: 1px solid rgba(22,27,64,.09); }
.cert-skills-dialog-eyebrow { margin: 0 0 9px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; color: #707895; }
.cert-skills-dialog-header h2 { margin: 0 0 8px; font-family: var(--font-heading); font-size: clamp(1.3rem, 4vw, 1.65rem); line-height: 1.3; color: inherit; }
.cert-skills-dialog-header p:last-child { margin: 0; font-size: .88rem; color: #71768a; }
.cert-skills-dialog-close { display: grid; flex-shrink: 0; place-items: center; height: 35px; width: 35px; border: 0; border-radius: 50%; background: #f1f2f6; color: #161b40; cursor: pointer; }
.cert-skills-dialog-close:hover { background: #e3e6ed; }
.cert-skills-dialog-body { padding: 24px 30px 28px; }
.cert-skills-dialog-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.cert-skills-dialog-topic { display: flex; align-items: center; gap: 9px; min-height: 41px; padding: 10px 12px; background: #f6f7fa; border: 1px solid #eceef3; border-radius: 9px; font-size: .82rem; font-weight: 600; line-height: 1.4; color: #343a58; }
.cert-skills-dialog-topic i { color: #737da6; flex: 0 0 auto; font-size: .77rem; }
.cert-skills-dialog-footer { padding: 13px 30px; background: #f8f9fb; border-top: 1px solid #eceef3; font-size: .73rem; color: #7b8193; }
@media (max-width: 520px) {
  .cert-skills-dialog { max-height: 85dvh; border-radius: 14px; }
  .cert-skills-dialog-header { padding: 22px 20px 18px; }
  .cert-skills-dialog-body { padding: 20px; }
  .cert-skills-dialog-list { grid-template-columns: 1fr; gap: 7px; }
  .cert-skills-dialog-footer { padding: 13px 20px; }
}
body.dark-mode .cert-skills-trigger { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.18); color: var(--dm-text); }
body.dark-mode .cert-skills-trigger:hover { background: rgba(255,255,255,.12); }
body.dark-mode .cert-skills-trigger-icon { background: rgba(255,255,255,.11); }
body.dark-mode .cert-skills-dialog { background: #202640; color: #f0f2ff; border-color: rgba(255,255,255,.14); }
body.dark-mode .cert-skills-dialog-header { border-color: rgba(255,255,255,.13); }
body.dark-mode .cert-skills-dialog-header p:last-child, body.dark-mode .cert-skills-dialog-eyebrow { color: #b1bad2; }
body.dark-mode .cert-skills-dialog-close { background: #373e58; color: #f0f2ff; }
body.dark-mode .cert-skills-dialog-close:hover { background: #4b5370; }
body.dark-mode .cert-skills-dialog-topic { background: #2d344e; color: #f0f2ff; border-color: #424b69; }
body.dark-mode .cert-skills-dialog-topic i { color: #a9b6db; }
body.dark-mode .cert-skills-dialog-footer { background: #252c44; border-color: #424b69; color: #b1bad2; }

/* v1.4.0: Accessible controls; preserve existing visual appearance. */
.mobile-nav-toggle { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.portfolio #portfolio-flters li { padding: 0; }
.portfolio #portfolio-flters li button { cursor: pointer; display: inline-block; padding: 12px 15px; min-height: 44px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; text-transform: uppercase; border-radius: var(--radius-pill); transition: all .3s ease-in-out; }
.portfolio #portfolio-flters li:hover, .portfolio #portfolio-flters li.filter-active { background: transparent; color: inherit; }
.portfolio #portfolio-flters li button:hover, .portfolio #portfolio-flters li button.filter-active { color: var(--color-on-primary); background: var(--color-primary); }
:where(a, button, input, textarea, select):focus-visible { outline: 3px solid #287bb5; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* v1.4.1 — Professional Projects, aligned with the site's navy design tokens */
.professional-projects { padding: 60px 0; background: var(--color-bg); color: var(--color-text); }
.pp-filters { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:20px 0 30px; }
.pp-filter { border:1px solid var(--color-line); border-radius:var(--radius-pill, 30px); background:transparent; color:var(--color-primary); padding:10px 16px; min-height:44px; font:600 13px var(--font-accent); cursor:pointer; transition:background .2s,color .2s; }
.pp-filter:hover, .pp-filter.is-active { background:var(--color-primary); color:var(--color-on-primary); border-color:var(--color-primary); }
.pp-filter:focus-visible { outline:3px solid var(--color-primary); outline-offset:3px; }
.pp-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; align-items:stretch; }
.pp-card { display:flex; flex-direction:column; gap:13px; padding:25px; border:1px solid var(--color-line); border-radius:10px; background:var(--color-bg); box-shadow:0 2px 14px rgba(22,27,64,.055); min-width:0; }
.pp-card[hidden] { display:none!important; }
.pp-card-top { display:flex; align-items:center; gap:12px; }
.pp-icon { display:inline-grid; place-items:center; width:43px; height:43px; border-radius:50%; background:var(--color-surface); color:var(--color-primary); font-size:21px; flex-shrink:0; }
.pp-category { color:var(--color-primary); font-size:12px; font-weight:700; letter-spacing:.02em; }
.pp-card h3 { color:var(--color-primary); font-family:var(--font-heading); font-size:19px; font-weight:700; margin:0; line-height:1.4; overflow-wrap:anywhere; }
.pp-purpose,.pp-detail p { margin:0; line-height:1.7; font-size:14px; }
.pp-detail strong,.pp-tools strong { display:block; margin-bottom:4px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--color-primary); }
.pp-tools { margin-top:auto; padding-top:13px; border-top:1px solid var(--color-line); display:flex; flex-direction:column; gap:4px; font-size:13px; }
body.dark-mode .pp-card { background:#1c1c1c; border-color:#454545; box-shadow:none; }
body.dark-mode .pp-card h3,body.dark-mode .pp-category,body.dark-mode .pp-detail strong,body.dark-mode .pp-tools strong { color:var(--dm-text); }
body.dark-mode .pp-icon { background:#343434; color:var(--dm-text); }
body.dark-mode .pp-filter { color:var(--dm-text); border-color:#666; }
body.dark-mode .pp-filter:hover,body.dark-mode .pp-filter.is-active { background:var(--dm-text); color:var(--dm-bg); border-color:var(--dm-text); }
body.dark-mode .pp-tools { border-color:#454545; }
@media(max-width:991px) { .pp-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .pp-grid { grid-template-columns:1fr; } .pp-card { padding:20px; } .pp-filters { gap:7px; } .pp-filter { padding:10px 12px; font-size:12px; } }
@media(prefers-reduced-motion:reduce) { .pp-filter { transition:none!important; } }

/* v1.4.2 PATCH: Dark-mode styling for accessible Portfolio filter buttons. */
body.dark-mode .portfolio #portfolio-flters li button {
  color: var(--dm-text);
  background: transparent;
}
body.dark-mode .portfolio #portfolio-flters li button:hover,
body.dark-mode .portfolio #portfolio-flters li button.filter-active,
body.dark-mode .portfolio #portfolio-flters li button[aria-pressed="true"] {
  color: var(--dm-bg);
  background: var(--dm-accent);
}

/* v1.4.3: keep theme switch, label, and footer credits spaced consistently. */
#footer .toggle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 30px;
}
#footer .toggle-container .switch { flex: 0 0 34px; margin: 0; }
#footer #toggle-text {
  position: static;
  display: block;
  margin: 0;
  line-height: 1.5;
  font-size: 15px;
  font-weight: 500;
}
#footer .copyright { margin-top: 0; }
#footer .switch input:focus-visible + .slider { outline: 3px solid var(--color-primary); outline-offset: 4px; }

/* v1.4.4: Touch devices should not retain expanded navigation after a tap.
   Keep mouse hover expansion for precise pointers only. */
@media (min-width: 992px) and (hover: none), (min-width: 992px) and (pointer: coarse) {
  .nav-menu a:hover,
  .nav-menu li:hover > a { width: 56px; }
  .nav-menu a:hover span,
  .nav-menu li:hover > a span { display: none; }
}

/* v1.5.0 — accessible, responsive embedded resume */
.resume-pdf-preview {max-width:850px;margin:24px auto 14px;text-align:center;}
.resume-pdf-caption {margin-bottom:12px;}
.resume-pdf-preview iframe {display:block;width:100%;height:min(78vh,850px);min-height:440px;border:1px solid #d8dce5;border-radius:8px;background:#fff;}
.resume-pdf-fallback {font-size:.9rem;margin:10px 0 18px;}
body.dark-mode .resume-pdf-preview iframe {border-color:#596075;}
@media(max-width:600px){.resume-pdf-preview iframe{min-height:390px;height:65vh;}}

/* v1.5.1: compact resume actions and accessible on-demand PDF dialog */
.resume-actions{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin:24px auto;}
.resume-actions .btn{cursor:pointer;}
.resume-preview-dialog{position:fixed;inset:0;margin:auto;width:min(94vw,960px);max-width:960px;height:min(90dvh,920px);max-height:90dvh;padding:0;border:1px solid #d9dce6;border-radius:12px;background:#fff;color:#171c40;box-shadow:0 20px 70px #0006;overflow:hidden;}
.resume-preview-dialog::backdrop{background:rgba(8,12,30,.75);}
.resume-dialog-header,.resume-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;}
.resume-dialog-header{border-bottom:1px solid #e0e2e9;}
.resume-dialog-header h3{font-size:1.1rem;font-weight:700;margin:0;color:inherit;}
.resume-dialog-close{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-size:1.3rem;}
.resume-dialog-close:hover,.resume-dialog-close:focus-visible{background:#eef0f5;}
.resume-dialog-body{height:calc(100% - 142px);display:flex;flex-direction:column;min-height:0;}
.resume-dialog-body iframe{width:100%;flex:1;min-height:0;border:0;background:white;}
.resume-dialog-footer{justify-content:flex-end;border-top:1px solid #e0e2e9;}
body.dark-mode .resume-preview-dialog{background:#1c2035;color:#f6f6f9;border-color:#515773;}
body.dark-mode .resume-dialog-header,body.dark-mode .resume-dialog-footer{border-color:#515773;}
body.dark-mode .resume-dialog-close:hover,body.dark-mode .resume-dialog-close:focus-visible{background:#333951;}
@media(max-width:600px){.resume-preview-dialog{width:98vw;height:92dvh;max-height:92dvh;border-radius:8px;}.resume-dialog-header,.resume-dialog-footer{padding:8px 12px;}.resume-dialog-body{height:calc(100% - 124px);}}

/* v1.5.2 — consistent brand-colored mobile navigation and dismiss controls */
.mobile-nav-toggle { color: var(--color-primary); background-color: var(--color-white); box-shadow: 0 2px 10px rgba(22,27,64,.12); }
.mobile-nav-active .mobile-nav-toggle { color: var(--color-on-primary); background-color: var(--color-primary); }
body.dark-mode .mobile-nav-toggle { color: var(--color-white); background-color: var(--color-navy); }
body.dark-mode.mobile-nav-active .mobile-nav-toggle { color: var(--color-navy); background-color: var(--color-white); }
.resume-dialog-close, .cert-skills-dialog-close { color: var(--color-primary); background: rgba(22,27,64,.07); border-radius: 50%; }
.resume-dialog-close:hover, .resume-dialog-close:focus-visible,
.cert-skills-dialog-close:hover, .cert-skills-dialog-close:focus-visible { color: var(--color-on-primary); background: var(--color-primary); }
body.dark-mode .resume-dialog-close, body.dark-mode .cert-skills-dialog-close { color: var(--color-white); background: var(--color-navy); }
body.dark-mode .resume-dialog-close:hover, body.dark-mode .resume-dialog-close:focus-visible,
body.dark-mode .cert-skills-dialog-close:hover, body.dark-mode .cert-skills-dialog-close:focus-visible { color: var(--color-navy); background: var(--color-white); }
.contact .form-toast-close { color: var(--color-primary); border-radius: 50%; min-width: 32px; min-height: 32px; }
.contact .form-toast-close:hover { background: rgba(22,27,64,.09); }
body.dark-mode .contact .form-toast-close { color: var(--color-white); }
body.dark-mode .contact .form-toast-close:hover { background: var(--color-navy); }
.mobile-nav-toggle:focus-visible, .resume-dialog-close:focus-visible, .cert-skills-dialog-close:focus-visible { outline: 2px solid var(--color-primary) !important; outline-offset: 3px; }


/* v1.5.3 — unify focus rings and dismiss/menu controls with navy palette.
   Keep keyboard focus visible; remove legacy bright-blue rings on touch. */
:where(a, button, input, textarea, select):focus-visible,
.cert-skills-trigger:focus-visible,
.cert-skills-dialog button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}
button.mobile-nav-toggle,
button.mobile-nav-toggle.bi,
body button.mobile-nav-toggle {
  color: var(--color-primary) !important;
  background-color: var(--color-white) !important;
  border: 1px solid rgba(22,27,64,.14);
  -webkit-appearance: none;
  appearance: none;
}
body.mobile-nav-active button.mobile-nav-toggle {
  color: var(--color-white) !important;
  background-color: var(--color-primary) !important;
}
body.dark-mode button.mobile-nav-toggle {
  color: var(--color-white) !important;
  background-color: var(--color-navy) !important;
  border-color: rgba(255,255,255,.25);
}
body.dark-mode.mobile-nav-active button.mobile-nav-toggle {
  color: var(--color-navy) !important;
  background-color: var(--color-white) !important;
}
.resume-preview-dialog button.resume-dialog-close,
.cert-skills-dialog button.cert-skills-dialog-close {
  color: var(--color-primary);
  background-color: rgba(22,27,64,.07);
  border: 1px solid rgba(22,27,64,.14);
  box-shadow: none;
}
.resume-preview-dialog button.resume-dialog-close:focus-visible,
.cert-skills-dialog button.cert-skills-dialog-close:focus-visible,
button.mobile-nav-toggle:focus-visible {
  outline: 3px solid var(--color-primary) !important;
  outline-offset: 3px;
  box-shadow: none !important;
}
.resume-preview-dialog button.resume-dialog-close:hover,
.cert-skills-dialog button.cert-skills-dialog-close:hover {
  color: var(--color-white);
  background-color: var(--color-primary);
}
body.dark-mode .resume-preview-dialog button.resume-dialog-close,
body.dark-mode .cert-skills-dialog button.cert-skills-dialog-close {
  color: var(--color-white);
  background-color: var(--color-navy);
  border-color: rgba(255,255,255,.25);
}
body.dark-mode .resume-preview-dialog button.resume-dialog-close:focus-visible,
body.dark-mode .cert-skills-dialog button.cert-skills-dialog-close:focus-visible,
body.dark-mode button.mobile-nav-toggle:focus-visible {
  outline-color: var(--color-white) !important;
}
/* Touch Safari can retain focus after taps: no persistent focus halo,
   while keyboard focus remains visible on pointer-capable devices. */
@media (hover: none) and (pointer: coarse) {
  .resume-preview-dialog button.resume-dialog-close:focus,
  .cert-skills-dialog button.cert-skills-dialog-close:focus,
  button.mobile-nav-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
  }
}

/* v1.6.0: centered resume preview and branded download request dialog */
.resume-dialog-body{align-items:center;justify-content:center;}
.resume-dialog-body iframe{display:block;align-self:center;width:100%;max-width:850px;margin:0 auto;}
.resume-download-dialog{position:fixed;inset:0;margin:auto;width:min(92vw,460px);max-width:460px;max-height:90dvh;overflow:auto;padding:0;border:1px solid #d9dce6;border-radius:14px;background:#fff;color:#171c40;box-shadow:0 20px 70px #0006;}
.resume-download-dialog::backdrop{background:rgba(8,12,30,.75);}
.resume-download-form{padding:22px;display:flex;flex-direction:column;gap:9px;}
.resume-download-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;}
.resume-download-header h3{font-size:1.2rem;font-weight:700;margin:0;color:inherit;}
.resume-download-close{display:grid;place-items:center;width:44px;height:44px;border:1px solid #171c40;border-radius:8px;background:transparent;color:#171c40;cursor:pointer;}
.resume-download-close:focus-visible{outline:2px solid #171c40;outline-offset:3px;}
.resume-download-intro{margin:0 0 12px;}
.resume-download-form label{font-weight:600;}
.resume-download-form input:not([type="hidden"]){width:100%;min-height:44px;border:1px solid #aeb4c3;border-radius:8px;padding:10px 12px;color:#171c40;background:#fff;}
.resume-download-form input:focus-visible{outline:2px solid #171c40;outline-offset:2px;}
.resume-download-privacy{font-size:.83rem;line-height:1.5;margin:8px 0 0;color:#515769;}
.resume-download-status{min-height:1.2em;margin:0;font-size:.9rem;}
.resume-download-submit{align-self:stretch;min-height:44px;}
.resume-download-submit:disabled{opacity:.65;cursor:wait;}
body.dark-mode .resume-download-dialog{background:#1c2035;color:#f6f6f9;border-color:#515773;}
body.dark-mode .resume-download-close{color:#fff;border-color:#fff;}
body.dark-mode .resume-download-close:focus-visible,body.dark-mode .resume-download-form input:focus-visible{outline-color:#fff;}
body.dark-mode .resume-download-privacy{color:#d1d4e1;}
@media(max-width:600px){.resume-download-form{padding:16px;}.resume-dialog-body iframe{max-width:100%;}}

/* v1.7.0: Web Applications feature follows the established portfolio palette */
.web-applications .wa-card{max-width:1050px;margin:0 auto;background:#fff;border:1px solid #e4e6ed;border-radius:12px;padding:clamp(20px,3vw,36px);box-shadow:0 4px 20px rgba(20,24,52,.055);color:#272b43}
.wa-heading{display:flex;align-items:center;gap:18px;margin-bottom:18px}
.wa-icon{width:60px;height:60px;flex:none;border-radius:12px;display:grid;place-items:center;background:#eef0f6;color:#171c40;font-size:29px}
.wa-eyebrow{font-size:.77rem;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:#5d637a}
.wa-heading h3{margin:3px 0 3px;font-size:1.55rem;font-weight:700;color:#171c40}
.wa-tagline{margin:0;font-size:.94rem;color:#596076;font-style:italic}
.wa-description,.wa-contribution p{line-height:1.75;margin:0 0 20px}
.wa-card h4{font-size:1rem;font-weight:700;color:#171c40;margin:0 0 10px}
.wa-features{margin-bottom:22px}.wa-features ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 24px;list-style:none;padding:0;margin:0}.wa-features li{position:relative;padding-left:21px;line-height:1.55}.wa-features li:before{content:'✓';position:absolute;left:0;color:#171c40;font-weight:800}
.wa-contribution{border-top:1px solid #e4e6ed;padding-top:20px}.wa-tech{border-top:1px solid #e4e6ed;padding-top:16px;display:flex;gap:10px;flex-wrap:wrap;line-height:1.6}.wa-tech strong{color:#171c40}
.wa-actions{margin-top:24px}.wa-live-link{display:inline-flex;align-items:center;gap:9px;background:#171c40;border:1px solid #171c40;color:#fff!important;border-radius:7px;padding:12px 19px;font-weight:600;text-decoration:none}.wa-live-link:hover{background:#2d345c;color:#fff!important}.wa-live-link:focus-visible{outline:3px solid #171c40;outline-offset:3px}
body.dark-mode .web-applications .wa-card{background:#1c2035;border-color:#454c65;color:#e9ebf3}body.dark-mode .wa-icon{background:#30364e;color:#fff}body.dark-mode .wa-heading h3,body.dark-mode .wa-card h4,body.dark-mode .wa-tech strong{color:#fff}body.dark-mode .wa-eyebrow,body.dark-mode .wa-tagline{color:#c4c9d9}body.dark-mode .wa-features li:before{color:#d5daed}body.dark-mode .wa-contribution,body.dark-mode .wa-tech{border-color:#454c65}body.dark-mode .wa-live-link{background:#f1f2f7;border-color:#f1f2f7;color:#171c40!important}body.dark-mode .wa-live-link:hover{background:#dfe2ed}body.dark-mode .wa-live-link:focus-visible{outline-color:#fff}
@media(max-width:600px){.wa-heading{align-items:flex-start;gap:12px}.wa-icon{width:48px;height:48px;font-size:23px}.wa-features ul{grid-template-columns:1fr}.wa-live-link{width:100%;justify-content:center;text-align:center}}

/* v1.7.1: align featured app action consistently */
.web-applications .wa-actions{display:flex;justify-content:center;align-items:center;text-align:center}
.web-applications .wa-live-link{justify-content:center;text-align:center}

/* v1.7.2: Match the View Resume pill-outline action; retain original placement. */
.web-applications .wa-actions{display:block;text-align:left;}
.web-applications .wa-live-link{display:inline-flex;justify-content:center;align-items:center;border:2px solid var(--color-primary);border-radius:30px;background:transparent;color:var(--color-primary)!important;padding:8px 20px;font-family:var(--font-button);font-size:16px;font-weight:400;line-height:1.5;transition:background-color .2s,color .2s,border-color .2s;}
.web-applications .wa-live-link:hover{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary)!important;}
.web-applications .wa-live-link:focus-visible{outline:2px solid var(--color-primary);outline-offset:3px;}
body.dark-mode .web-applications .wa-live-link{background:transparent;color:var(--dm-text)!important;border-color:var(--dm-muted);}
body.dark-mode .web-applications .wa-live-link:hover{background:var(--dm-muted);border-color:var(--dm-accent);color:var(--dm-text)!important;}
@media(max-width:600px){.web-applications .wa-live-link{width:auto;max-width:100%;}}

/* v1.7.3: Filled PasaPrint action, retaining pill shape and original placement. */
.web-applications .wa-live-link,
.web-applications .wa-live-link:visited{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary)!important;}
.web-applications .wa-live-link:hover{background:#2d345c;border-color:#2d345c;color:#fff!important;}
body.dark-mode .web-applications .wa-live-link,
body.dark-mode .web-applications .wa-live-link:visited{background:#f1f2f7;border-color:#f1f2f7;color:#171c40!important;}
body.dark-mode .web-applications .wa-live-link:hover{background:#dfe2ed;border-color:#dfe2ed;color:#171c40!important;}


/* v1.7.4 PATCH — restore desktop mouse hover while avoiding sticky touch hover. */
@media (min-width: 992px) and (any-hover: hover) {
  .nav-menu a:hover, .nav-menu li:hover > a { width: 100%; }
  .nav-menu a:hover span, .nav-menu li:hover > a span { display: block; }
}
@media (min-width: 992px) and (any-hover: none) {
  .nav-menu a:hover, .nav-menu li:hover > a { width: 56px; }
  .nav-menu a:hover span, .nav-menu li:hover > a span { display: none; }
}

/* Match the Professional Projects pill filters without changing Isotope behavior. */
.portfolio #portfolio-flters { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; padding:0; margin:20px 0 30px; }
.portfolio #portfolio-flters li { margin:0; padding:0; background:transparent!important; }
.portfolio #portfolio-flters li button {
  border:1px solid var(--color-line); border-radius:var(--radius-pill,30px);
  background:transparent; color:var(--color-primary);
  padding:10px 16px; min-height:44px;
  font:600 13px var(--font-accent); text-transform:none;
  transition:background-color .2s,color .2s,border-color .2s;
}
.portfolio #portfolio-flters li button:hover,
.portfolio #portfolio-flters li button.filter-active,
.portfolio #portfolio-flters li button[aria-pressed="true"] {
  background:var(--color-primary); color:var(--color-on-primary); border-color:var(--color-primary);
}
.portfolio #portfolio-flters li button:focus-visible { outline:3px solid var(--color-primary); outline-offset:3px; }
body.dark-mode .portfolio #portfolio-flters li button { background:transparent; color:var(--dm-text); border-color:#666; }
body.dark-mode .portfolio #portfolio-flters li button:hover,
body.dark-mode .portfolio #portfolio-flters li button.filter-active,
body.dark-mode .portfolio #portfolio-flters li button[aria-pressed="true"] { background:var(--dm-text); color:var(--dm-bg); border-color:var(--dm-text); }
@media(max-width:600px) { .portfolio #portfolio-flters { gap:7px; } .portfolio #portfolio-flters li button { padding:10px 12px; font-size:12px; } }

/* Compact, balanced download form; retains keyboard focus and Netlify form submission. */
.resume-download-dialog { width:min(92vw,430px); max-width:430px; border-radius:16px; }
.resume-download-form { padding:24px; gap:0; }
.resume-download-header { margin-bottom:18px; }
.resume-download-header h3 { font-size:1.22rem; line-height:1.3; }
.resume-download-intro { margin:0 0 20px; line-height:1.55; font-size:.95rem; }
.resume-download-form label { display:block; margin:0 0 7px; font-size:.92rem; line-height:1.4; }
.resume-download-form input:not([type="hidden"]) { box-sizing:border-box; height:46px; min-height:46px; margin:0 0 16px; font-size:1rem; }
.resume-download-status { min-height:0; margin:0; }
.resume-download-status:not(:empty) { margin:0 0 12px; }
.resume-download-submit { width:100%; min-height:46px; margin-top:6px; white-space:normal; text-align:center; }
@media(max-width:600px) { .resume-download-form { padding:20px; } .resume-download-dialog { width:min(92vw,430px); } }

/* Center the actual PDF viewport, not just its enclosing flex container. */
.resume-dialog-body { align-items:center; justify-content:center; overflow:hidden; }
.resume-dialog-body iframe { flex:1 1 auto; display:block; width:min(100%,650px); max-width:650px; height:100%; min-height:0; margin:0 auto; align-self:center; border:0; }
@media(max-width:700px) { .resume-dialog-body iframe { width:100%; max-width:100%; } }


/* ================================================================
   v1.8.0 — Midnight Navy: dark-only design system
   Light-mode selectors and behavior remain untouched.
   ================================================================ */
body.dark-mode {
  --dm-bg:#0B1220; --dm-text:#F1F5FB; --dm-muted:#B6C3D6;
  --dm-accent:#8FB8FF; --dm-surface:#162238; --dm-surface-raised:#1C2B43;
  --dm-border:#30405B; --dm-subtle:#91A8C8; --dm-focus:#A7CAFF;
  --dm-scroll-thumb:#667F9F; --dm-scroll-track-webkit:#101C2C;
  --dm-scroll-track-firefox:#101C2C;
  --color-bg:var(--dm-bg); --color-text:var(--dm-text);
  color-scheme:dark;
  background-color:var(--dm-bg);color:var(--dm-text);
}
body.dark-mode :is(section,#footer) { color:var(--dm-text); }
body.dark-mode :is(.section-title h2,.about .content h3,.resume .resume-title,.resume-item h4) {color:var(--dm-text);}
body.dark-mode .section-title h2::after {background:var(--dm-accent);}
body.dark-mode :is(.about p,.resume p,.contact p,.cert-content p,.pp-description,.pp-detail,.wa-description,.wa-contribution p) {color:var(--dm-muted);}
body.dark-mode a:not(.wa-live-link):not(.nav-menu a):not(.btn-download) {text-decoration-color:var(--dm-accent);}
/* Distinct elevations and subtle edges */
body.dark-mode :is(.pp-card,.web-applications .wa-card,.services .icon-box,.contact .info,.cert-item,.facts .count-box) {
  background:var(--dm-surface);border-color:var(--dm-border);color:var(--dm-text);
  box-shadow:0 10px 32px rgba(0,0,0,.14);
}
body.dark-mode :is(.pp-card h3,.pp-category,.pp-detail strong,.pp-tools strong,.wa-heading h3,.wa-card h4,.wa-tech strong,.cert-content h3,.services .icon-box h4) {color:var(--dm-text);}
body.dark-mode :is(.pp-icon,.wa-icon,.cert-skills-trigger-icon) {background:var(--dm-surface-raised);color:var(--dm-accent);}
body.dark-mode :is(.pp-tools,.wa-contribution,.wa-tech) {border-color:var(--dm-border);}
body.dark-mode :is(.wa-eyebrow,.wa-tagline,.cert-skills-dialog-eyebrow) {color:var(--dm-subtle);}
body.dark-mode .wa-features li::before {color:var(--dm-accent);}
/* Filter pills: consistent on both showcases */
body.dark-mode :is(.pp-filter,.portfolio #portfolio-flters li button) {
  background:transparent;color:var(--dm-text);border:1px solid var(--dm-border);
}
body.dark-mode :is(.pp-filter:hover,.pp-filter.is-active,.portfolio #portfolio-flters li button:hover,.portfolio #portfolio-flters li button.filter-active,.portfolio #portfolio-flters li button[aria-pressed="true"]) {
  background:var(--dm-accent);color:var(--dm-bg);border-color:var(--dm-accent);
}
/* Keep images natural: no inversion or tint applied to actual work */
body.dark-mode .portfolio .portfolio-wrap img {filter:none;}
body.dark-mode .portfolio .portfolio-wrap {border-radius:10px;overflow:hidden;}
/* Navigation: desktop hover remains governed by pointer media queries */
body.dark-mode .nav-menu a {background:var(--dm-surface);color:var(--dm-muted);}
body.dark-mode :is(.nav-menu a:hover,.nav-menu .active,.nav-menu .active:focus,.nav-menu li:hover>a) {background:var(--dm-accent);color:var(--dm-bg);}
body.dark-mode button.mobile-nav-toggle {background:var(--dm-surface);color:var(--dm-text);}
body.dark-mode.mobile-nav-active button.mobile-nav-toggle {background:var(--dm-accent);color:var(--dm-bg);}
/* Hero: avoid washed-out white overlay, keep photo visible */
body.dark-mode #hero {filter:none;}
body.dark-mode #hero::before {background:linear-gradient(90deg,rgba(11,18,32,.88),rgba(11,18,32,.66) 56%,rgba(11,18,32,.38));}
body.dark-mode #hero :is(h1,p,p span,.social-links a) {color:var(--dm-text);}
body.dark-mode #hero .social-links a:hover {color:var(--dm-accent);}
/* Resume remains a white PDF; only the surrounding UI changes */
body.dark-mode :is(.resume-preview-dialog,.resume-download-dialog,.cert-skills-dialog) {
  background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-border);
  box-shadow:0 24px 80px rgba(0,0,0,.48);
}
body.dark-mode :is(.resume-dialog-header,.resume-dialog-footer,.cert-skills-dialog-header,.cert-skills-dialog-footer) {border-color:var(--dm-border);}
body.dark-mode :is(.resume-dialog-close,.resume-download-close,.cert-skills-dialog-close) {
  background:var(--dm-surface-raised);color:var(--dm-text);border-color:var(--dm-border);
}
body.dark-mode :is(.resume-dialog-close:hover,.resume-download-close:hover,.cert-skills-dialog-close:hover) {
  background:var(--dm-accent);color:var(--dm-bg);
}
body.dark-mode .cert-skills-dialog-topic {background:var(--dm-surface-raised);border-color:var(--dm-border);color:var(--dm-text);}
body.dark-mode .cert-skills-dialog-topic i {color:var(--dm-accent);}
body.dark-mode .cert-skills-dialog-footer {background:var(--dm-surface);color:var(--dm-muted);}
body.dark-mode .cert-skills-dialog-header p:last-child {color:var(--dm-muted);}
body.dark-mode .cert-skills-trigger {background:var(--dm-surface);border-color:var(--dm-border);color:var(--dm-text);}
body.dark-mode .resume-pdf-preview iframe {background:#fff;border-color:var(--dm-border);}
body.dark-mode :is(.resume-download-form input:not([type="hidden"]),.contact .form-control) {
  background:var(--dm-bg);color:var(--dm-text);border:1px solid var(--dm-border);
}
body.dark-mode :is(input::placeholder,textarea::placeholder) {color:var(--dm-subtle);opacity:1;}
body.dark-mode .resume-download-intro {color:var(--dm-muted);}
body.dark-mode :is(.resume-download-submit,.web-applications .wa-live-link,.web-applications .wa-live-link:visited) {
  background:var(--dm-accent);border-color:var(--dm-accent);color:var(--dm-bg)!important;
}
body.dark-mode :is(.resume-download-submit:hover,.web-applications .wa-live-link:hover) {
  background:#B8D3FF;border-color:#B8D3FF;color:var(--dm-bg)!important;
}
body.dark-mode :is(.btn-download,.btn-view-more) {color:var(--dm-text);border-color:var(--dm-accent);}
body.dark-mode :is(.btn-download:hover,.btn-view-more:hover) {background:var(--dm-accent)!important;color:var(--dm-bg)!important;}
/* Footer and scroll controls */
body.dark-mode #footer {background:var(--dm-bg);color:var(--dm-muted);}
body.dark-mode #footer :is(.copyright,.credits,p) {color:var(--dm-muted);}
body.dark-mode #footer a {color:var(--dm-text);}
body.dark-mode #footer a:hover {color:var(--dm-accent);}
body.dark-mode .back-to-top {background:var(--dm-surface);border-color:var(--dm-accent);}
body.dark-mode .back-to-top i {color:var(--dm-accent);}
body.dark-mode .back-to-top:hover {background:var(--dm-accent);}
body.dark-mode .back-to-top:hover i {color:var(--dm-bg);}
body.dark-mode :is(a,button,input,textarea,select):focus-visible {outline:3px solid var(--dm-focus);outline-offset:3px;}
@media (prefers-reduced-motion:reduce) {body.dark-mode *,body.dark-mode *::before,body.dark-mode *::after {scroll-behavior:auto;}}

/* v1.8.1: keyboard and status clarity, without altering theme palettes. */
@media (hover:hover) and (pointer:fine) {
  .nav-menu a:focus-visible { width:100%; }
  .nav-menu a:focus-visible span { display:inline-block; }
}
.resume-download-status[data-state="error"] { color:#A12D36; }
.resume-download-status[data-state="success"] { color:#246C45; }
body.dark-mode .resume-download-status[data-state="error"] { color:#FFADB2; }
body.dark-mode .resume-download-status[data-state="success"] { color:#A9E6C3; }
.resume-download-submit[aria-busy="true"] { cursor:progress; }
@media (prefers-reduced-motion:reduce) {
  html:focus-within { scroll-behavior:auto!important; }
  .typed-cursor { animation:none!important; }
}

/* v1.11.0 — Featured Work & Case Studies */
.featured-work {padding:60px 0;background:var(--color-bg-secondary,#f5f8fd);color:var(--color-text,#272829)}
.fw-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.fw-card {display:flex;flex-direction:column;gap:13px;padding:25px;border:1px solid #dbe2ed;border-radius:14px;background:#fff;box-shadow:0 6px 22px rgba(22,27,64,.045);min-width:0}
.fw-card-top {display:flex;align-items:center;gap:12px}
.fw-icon {display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#edf1f8;color:#161b40;font-size:22px;flex-shrink:0}
.fw-category,.fw-dialog-category {font-size:12px;letter-spacing:.035em;font-weight:700;color:#435475;text-transform:uppercase}
.fw-card h3 {font-size:19px;line-height:1.4;margin:0;color:#161b40;font-weight:700}
.fw-card>p {font-size:14px;line-height:1.75;margin:0;color:#526078;flex:1}
.fw-card-bottom {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding-top:13px;border-top:1px solid #e5e9f1}
.fw-tools {font-size:12px;color:#526078;max-width:100%}
.fw-open,.fw-done {background:#161b40;color:#fff;border:1px solid #161b40;border-radius:22px;padding:9px 15px;font-size:13px;font-weight:600;cursor:pointer}
.fw-open:hover,.fw-done:hover {background:#303d70;color:#fff}
.fw-open i {margin-left:5px}
.fw-dialog {position:fixed;inset:0;margin:auto;width:min(700px,calc(100% - 28px));max-width:700px;max-height:min(85dvh,820px);padding:0;border:1px solid #dbe2ed;border-radius:16px;background:#fff;color:#272829;box-shadow:0 22px 70px rgba(0,0,0,.28);overflow:auto}
.fw-dialog::backdrop {background:rgba(9,15,37,.7)}
.fw-dialog-inner {padding:0 26px}
.fw-dialog-header {display:flex;justify-content:space-between;gap:15px;align-items:flex-start;padding:25px 0 19px;border-bottom:1px solid #e4e9f0}
.fw-dialog-header h2 {font-size:23px;line-height:1.35;color:#161b40;margin:8px 0 0}
.fw-close:not(.fw-done) {background:transparent;border:1px solid #dbe2ed;color:#161b40;border-radius:9px;width:36px;height:36px;flex-shrink:0;cursor:pointer}
.fw-dialog-content {padding:12px 0 20px}
.fw-dialog-content section {padding-top:14px}
.fw-dialog-content h3 {font-size:16px;font-weight:700;color:#161b40;margin:0 0 8px}
.fw-dialog-content p {font-size:14px;line-height:1.8;color:#46536b;margin:0}
.fw-dialog-footer {border-top:1px solid #e4e9f0;padding:17px 0 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px;color:#526078}
.fw-open:focus-visible,.fw-close:focus-visible {outline:3px solid #627aa9;outline-offset:3px}
@media(max-width:767px){.fw-grid{grid-template-columns:1fr}.fw-card{padding:20px}.fw-dialog-inner{padding:0 18px}.fw-dialog-header h2{font-size:20px}}
body.dark-mode .featured-work {background:var(--dm-bg);color:var(--dm-text)}
body.dark-mode .fw-card,body.dark-mode .fw-dialog {background:var(--dm-surface);border-color:var(--dm-border);color:var(--dm-text)}
body.dark-mode .fw-icon {background:var(--dm-surface-raised);color:var(--dm-accent)}
body.dark-mode :is(.fw-card h3,.fw-dialog-header h2,.fw-dialog-content h3) {color:var(--dm-text)}
body.dark-mode :is(.fw-card>p,.fw-tools,.fw-dialog-content p,.fw-dialog-footer,.fw-category,.fw-dialog-category) {color:var(--dm-muted)}
body.dark-mode :is(.fw-card-bottom,.fw-dialog-header,.fw-dialog-footer){border-color:var(--dm-border)}
body.dark-mode :is(.fw-open,.fw-done){background:var(--dm-accent);border-color:var(--dm-accent);color:var(--dm-bg)}
body.dark-mode :is(.fw-open:hover,.fw-done:hover){background:#b8d3ff;border-color:#b8d3ff;color:var(--dm-bg)}
body.dark-mode .fw-close:not(.fw-done){color:var(--dm-text);border-color:var(--dm-border)}
@media(prefers-reduced-motion:reduce){.fw-card,.fw-dialog{scroll-behavior:auto}}

/* v1.11.1: Keep featured-card actions aligned and modal dismissal singular. */
.fw-card-bottom{flex-wrap:nowrap}
.fw-tools{min-width:0;overflow-wrap:anywhere}
.fw-open{flex-shrink:0}
.fw-dialog-footer{justify-content:flex-start}
@media(max-width:380px){.fw-card-bottom{flex-wrap:wrap}}

/* v1.11.2 — Unified Featured Work dialog close control. */
.fw-dialog button.fw-close {
  -webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;min-width:40px;min-height:40px;padding:0;flex:0 0 40px;
  border:1px solid #161b40;border-radius:12px;background:#fff;color:#161b40;
  box-shadow:none;outline:none;line-height:1;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.fw-dialog button.fw-close i {font-size:20px;line-height:1;color:inherit;}
.fw-dialog button.fw-close:hover {background:#161b40;color:#fff;}
.fw-dialog button.fw-close:focus {outline:none;box-shadow:none;}
.fw-dialog button.fw-close:focus-visible {outline:2px solid #161b40;outline-offset:3px;box-shadow:none;}
body.dark-mode .fw-dialog button.fw-close {background:transparent;border-color:var(--dm-text);color:var(--dm-text);}
body.dark-mode .fw-dialog button.fw-close:hover {background:var(--dm-text);color:var(--dm-bg);}
body.dark-mode .fw-dialog button.fw-close:focus-visible {outline-color:var(--dm-text);}
@media (hover:none) and (pointer:coarse) {
  .fw-dialog button.fw-close:focus,.fw-dialog button.fw-close:focus-visible {outline:none!important;box-shadow:none!important;}
}

/* v1.11.3 — Consistent outlined, circular close buttons across all dialogs.
   Specific selectors intentionally override legacy per-dialog shapes/fills. */
:is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close) {
  -webkit-appearance:none;appearance:none;box-sizing:border-box;
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;
  margin:0;padding:0;border:1.5px solid #161b40;border-radius:50%;
  background:transparent;color:#161b40;box-shadow:none;outline:none;
  line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent;
}
:is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close) i {
  color:inherit;font-size:20px;line-height:1;
}
@media (hover:hover) and (pointer:fine) {
  :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):hover {
    background:#161b40;color:#fff;border-color:#161b40;
  }
}
:is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):focus-visible {
  outline:2px solid #161b40 !important;outline-offset:3px;box-shadow:none !important;
}
body.dark-mode :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close) {
  background:transparent;color:var(--dm-text);border-color:var(--dm-text);
}
@media (hover:hover) and (pointer:fine) {
  body.dark-mode :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):hover {
    background:var(--dm-text);color:var(--dm-bg);border-color:var(--dm-text);
  }
}
body.dark-mode :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):focus-visible {
  outline-color:var(--dm-text) !important;
}
@media (hover:none) and (pointer:coarse) {
  :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):focus,
  :is(.cert-skills-dialog,.resume-preview-dialog,.resume-download-dialog,.fw-dialog) button:is(.cert-skills-dialog-close,.resume-dialog-close,.resume-download-close,.fw-close):focus-visible {
    outline:none !important;box-shadow:none !important;
  }
}


/* v1.12.0 — Compact, scannable Featured Work case-study presentation.
   Scoped to case-study dialogs; all other modal close controls remain unchanged. */
.fw-dialog { overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.fw-dialog-header {padding-top:22px;padding-bottom:17px;}
.fw-dialog-content {padding:19px 0 22px;display:grid;gap:19px;}
.fw-dialog-content section {padding:0;min-width:0;}
.fw-dialog-content h3 {display:flex;align-items:center;gap:10px;font-size:16px;line-height:1.4;margin:0 0 7px;}
.fw-dialog-content h3 i {display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;flex:0 0 27px;border-radius:8px;background:#edf1f8;color:#161b40;font-size:14px;font-weight:400;}
.fw-dialog-content p {line-height:1.7;}
.fw-dialog-footer {padding:15px 0 21px;display:block;}
#fw-dialog-tools {display:flex;align-items:flex-start;flex-wrap:wrap;gap:9px 13px;}
.fw-tools-label {padding-top:5px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#526078;}
.fw-tools-list {display:flex;flex-wrap:wrap;gap:7px;}
.fw-tool-chip {display:inline-flex;align-items:center;padding:5px 10px;border:1px solid #dbe2ed;border-radius:999px;background:#f5f7fb;color:#34435e;font-size:12px;line-height:1.35;}
body.dark-mode .fw-dialog-content h3 i {background:var(--dm-surface-raised);color:var(--dm-accent);}
body.dark-mode .fw-tools-label {color:var(--dm-muted);}
body.dark-mode .fw-tool-chip {background:var(--dm-surface-raised);border-color:var(--dm-border);color:var(--dm-text);}
@media(max-width:767px){.fw-dialog-header{padding-top:19px;padding-bottom:15px}.fw-dialog-content{padding-top:17px;gap:17px}.fw-dialog-content h3{font-size:15px}.fw-dialog-content p{line-height:1.65}}

/* v1.13.0 — PasaPrint walkthrough and development story */
.web-applications .wa-walkthrough{border-top:1px solid #e4e6ed;padding-top:20px;margin:0 0 22px}
.web-applications .wa-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;counter-reset:none}
.web-applications .wa-steps li{display:flex;align-items:flex-start;gap:11px;padding:16px 14px;border:1px solid #e4e6ed;border-radius:12px;background:#f7f8fb;min-width:0}
.web-applications .wa-step-icon{display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;border-radius:50%;border:1px solid #171c40;color:#171c40;font-size:17px}
.web-applications .wa-steps strong{display:block;color:#171c40;font-size:.93rem;margin-bottom:5px}
.web-applications .wa-steps p{font-size:.87rem;line-height:1.6;margin:0;color:#4d5368}
.web-applications .wa-contribution h4:not(:first-child){margin-top:16px}
.web-applications .wa-contribution p{margin-bottom:12px}
.web-applications .wa-contribution .wa-status{display:inline-flex;align-items:center;gap:8px;font-size:.86rem;font-weight:600;margin:4px 0 12px;color:#171c40}
body.dark-mode .web-applications .wa-walkthrough{border-color:var(--dm-border)}
body.dark-mode .web-applications .wa-steps li{background:var(--dm-surface-raised);border-color:var(--dm-border)}
body.dark-mode .web-applications .wa-step-icon{border-color:var(--dm-accent);color:var(--dm-accent)}
body.dark-mode .web-applications .wa-steps strong,body.dark-mode .web-applications .wa-contribution .wa-status{color:var(--dm-text)}
body.dark-mode .web-applications .wa-steps p{color:var(--dm-muted)}
@media(max-width:900px){.web-applications .wa-steps{grid-template-columns:1fr}}
@media(max-width:600px){.web-applications .wa-steps li{padding:13px 12px}.web-applications .wa-step-icon{flex-basis:33px;width:33px;height:33px}}

/* v1.13.1 — Align certification primary links at the bottom of every card. */
.cert-content .cert-actions { margin-top: auto; }
.cert-content .cert-actions a:last-child { margin-top: 0; }

/* v1.14.0 — Lightweight Portfolio Assistant; isolated from existing dialogs. */
.pa-widget{position:fixed;right:22px;bottom:82px;z-index:1005;font-family:inherit}
.pa-launcher{margin-left:auto;display:grid;place-items:center;width:52px;height:52px;border:1px solid #161b40;border-radius:50%;background:#161b40;color:#fff;box-shadow:0 5px 20px rgba(0,0,0,.16);font-size:23px;cursor:pointer}
.pa-launcher:hover{background:#2a3767}.pa-launcher:focus-visible,.pa-panel :focus-visible{outline:2px solid #536ed3;outline-offset:3px}
.pa-panel[hidden]{display:none!important}.pa-panel{position:absolute;right:0;bottom:64px;width:min(370px,calc(100vw - 28px));height:min(540px,calc(100dvh - 120px));min-height:300px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #dce1eb;border-radius:18px;background:#fff;color:#25314a;box-shadow:0 15px 50px rgba(14,22,46,.22)}
.pa-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid #e6e9f1}.pa-header strong{display:block;font-size:15px;color:#161b40}.pa-header small{display:block;font-size:11px;color:#66738c;margin-top:3px}
.pa-close{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border:1px solid #161b40;border-radius:50%;background:transparent;color:#161b40;cursor:pointer;font-size:15px}.pa-close:hover{background:#161b40;color:#fff}
.pa-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:15px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;background:#f7f8fc;-webkit-overflow-scrolling:touch}
.pa-bubble{max-width:94%;padding:10px 12px;border-radius:13px;background:#fff;color:#26334e;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.pa-user{align-self:flex-end;background:#161b40;color:#fff}
.pa-section-link{font-size:12px;font-weight:600;color:#172e72;text-decoration:underline;text-underline-offset:3px}.pa-choices{display:flex;flex-wrap:wrap;gap:6px}
.pa-suggestions{display:flex;gap:6px;overflow-x:auto;padding:11px 12px 8px;flex:0 0 auto}.pa-topic{border:1px solid #cbd3e1;border-radius:999px;background:#fff;color:#23345a;font-size:11px;padding:7px 10px;white-space:nowrap;cursor:pointer}.pa-topic:hover{background:#edf1fa}.pa-choices .pa-topic{white-space:normal}
.pa-form{display:flex;gap:8px;padding:7px 12px}.pa-form input{flex:1;min-width:0;border:1px solid #cbd3e1;border-radius:10px;padding:10px;font-size:14px;background:#fff;color:#25314a}.pa-form button{width:40px;flex:0 0 40px;border:0;border-radius:10px;background:#161b40;color:#fff;cursor:pointer}.pa-disclaimer{font-size:10px;line-height:1.45;text-align:center;color:#69748a;margin:0;padding:0 13px 12px}
body.dark-mode .pa-panel{background:var(--dm-surface,#17213b);border-color:var(--dm-border,#40506a);color:var(--dm-text,#e8edf8)}body.dark-mode .pa-header{border-color:var(--dm-border,#40506a)}body.dark-mode .pa-header strong,body.dark-mode .pa-header small{color:var(--dm-text,#e8edf8)}body.dark-mode .pa-messages{background:var(--dm-bg,#0d1428)}body.dark-mode .pa-bubble{background:var(--dm-surface-raised,#26334e);color:var(--dm-text,#e8edf8)}body.dark-mode .pa-user{background:#354c88;color:#fff}body.dark-mode .pa-close{border-color:var(--dm-text,#e8edf8);color:var(--dm-text,#e8edf8)}body.dark-mode .pa-close:hover{background:var(--dm-text,#e8edf8);color:var(--dm-bg,#0d1428)}body.dark-mode .pa-topic,body.dark-mode .pa-form input{background:var(--dm-surface-raised,#26334e);border-color:var(--dm-border,#40506a);color:var(--dm-text,#e8edf8)}body.dark-mode .pa-section-link{color:#a9c2ff}body.dark-mode .pa-disclaimer{color:var(--dm-text,#e8edf8)}
@media(max-width:575px){.pa-widget{right:14px;bottom:75px}.pa-panel{width:calc(100vw - 28px);height:min(510px,calc(100dvh - 140px))}}@media(hover:none){.pa-close:focus:not(:focus-visible),.pa-launcher:focus:not(:focus-visible){outline:none;box-shadow:none}}@media(prefers-reduced-motion:reduce){.pa-widget *{scroll-behavior:auto!important}}

/* v1.14.2 — Assistant personality, bottom-right placement, touch-first behavior */
.pa-widget{right:20px;bottom:20px}
.pa-launcher{position:relative;width:54px;height:54px;font-size:23px;box-shadow:0 7px 24px rgba(17,25,60,.23);transition:transform .18s ease,background .18s ease}
.pa-launcher:hover{transform:translateY(-2px)}
.pa-launcher-dot{position:absolute;right:8px;top:8px;width:7px;height:7px;border-radius:50%;background:#a8e5d0;border:1px solid #161b40}
.pa-panel{bottom:68px;width:min(385px,calc(100vw - 28px));height:min(505px,calc(100dvh - 100px));min-height:0;border-radius:20px;box-shadow:0 18px 56px rgba(13,23,55,.25)}
.pa-header{justify-content:flex-start;background:linear-gradient(115deg,#f7f8ff,#fff);padding:14px 16px}
.pa-identity{flex:1;min-width:0}.pa-header strong{font-size:15px;letter-spacing:-.15px}.pa-header small{font-size:11px}
.pa-avatar{display:grid;place-items:center;flex:0 0 39px;width:39px;height:39px;border-radius:13px;background:#161b40;color:white;font-size:19px}
.pa-status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3b9f78;margin-right:4px}
.pa-messages{gap:12px;background:#f5f7fc}.pa-bubble{border-radius:15px 15px 15px 5px;line-height:1.6}.pa-user{border-radius:15px 15px 5px 15px}
.pa-quick-actions{display:flex;gap:8px;padding:9px 12px 0;border-top:1px solid #edf0f6;background:#fff}
.pa-quick-actions .pa-topic{font-size:11px;padding:7px 11px}.pa-quick-actions .pa-topic i{margin-right:4px}
.pa-form input{font-size:16px} /* Prevents iOS Safari zoom when input is intentionally focused */
body.dark-mode .pa-header{background:var(--dm-surface,#17213b)}
body.dark-mode .pa-quick-actions{background:var(--dm-surface,#17213b);border-color:var(--dm-border,#40506a)}
@media(max-width:575px){.pa-widget{right:16px;bottom:16px}.pa-panel{width:calc(100vw - 32px);height:min(490px,calc(100dvh - 94px))}}
@media(prefers-reduced-motion:reduce){.pa-launcher{transition:none}.pa-launcher:hover{transform:none}}

/* v1.14.3 — Messenger-style Portfolio Assistant. Overrides prior PA presentation only. */
.pa-widget{right:20px;bottom:20px;z-index:1005}
.pa-launcher{width:54px;height:54px;border-radius:50%;background:#161b40;color:#fff;font-size:23px;border:1px solid #161b40;box-shadow:0 8px 25px rgba(18,27,64,.24)}
.pa-launcher-dot{display:none}
.pa-panel{right:0;bottom:66px;width:min(380px,calc(100vw - 28px));height:min(525px,calc(100dvh - 100px));min-height:0;border-radius:20px;border:1px solid #dfe4ed;background:#fff;box-shadow:0 16px 52px rgba(17,25,58,.24);display:flex;flex-direction:column}
.pa-header{flex:0 0 auto;min-height:69px;padding:12px 13px;gap:10px;display:flex;align-items:center;background:#fff;border-bottom:1px solid #e9edf4}
.pa-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:50%;font-size:18px;background:#161b40;color:#fff}
.pa-identity{flex:1;min-width:0}.pa-header strong{font-size:14px;font-weight:700;line-height:1.3}.pa-header small{font-size:11px;margin-top:3px;color:#6a7386}.pa-header-sparkle{color:#6374b3}
.pa-reset{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:#58657d;font-size:17px;cursor:pointer}.pa-reset:hover{background:#f1f3f8}
.pa-close{width:34px;height:34px;flex:0 0 34px;font-size:13px}
.pa-messages{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:14px;overflow-y:auto;overflow-x:hidden;padding:19px 13px;background:#f7f8fc;overscroll-behavior:contain;scroll-padding-bottom:16px}
.pa-message{display:flex;gap:7px;align-items:flex-end;flex-wrap:wrap;flex:0 0 auto}.pa-message-user{justify-content:flex-end}.pa-message-avatar{width:25px;height:25px;flex:0 0 25px;display:grid;place-items:center;border-radius:50%;background:#e7eaf7;color:#161b40;font-size:13px}
.pa-bubble{max-width:calc(100% - 38px);font-size:13px;line-height:1.55;padding:11px 13px;background:#fff;border:1px solid #e9edf4;border-radius:15px 15px 15px 4px;color:#26334e;overflow-wrap:anywhere;box-shadow:0 1px 3px rgba(15,23,50,.03)}
.pa-user{background:#161b40;color:#fff;border-color:#161b40;border-radius:15px 15px 4px 15px;max-width:85%}
.pa-section-link{margin-left:32px;margin-top:-3px;display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#253d83;font-weight:700;text-decoration:none}.pa-section-link:hover{text-decoration:underline}
.pa-choices{display:flex;gap:6px;flex-wrap:wrap;margin-left:32px}
.pa-bottom{flex:0 0 auto;border-top:1px solid #e9edf4;background:#fff;padding:10px 12px 11px}
.pa-suggestions{display:flex;flex-wrap:wrap;gap:6px;overflow:visible;padding:0 0 10px}
.pa-topic{white-space:normal;text-align:center;border:1px solid #d7dce8;background:#fff;color:#243455;border-radius:999px;font-size:11px;line-height:1.3;padding:7px 10px}
.pa-form{display:flex;gap:8px;padding:0;align-items:center}.pa-form input{height:43px;min-width:0;border-radius:22px;border:1px solid #d3d9e5;padding:10px 14px;font-size:16px;box-shadow:none}.pa-form button{width:39px;height:39px;flex:0 0 39px;border-radius:50%;font-size:19px}
.pa-disclaimer{font-size:10px;line-height:1.3;padding:8px 2px 0;color:#768094}
body.dark-mode .pa-panel,body.dark-mode .pa-header,body.dark-mode .pa-bottom{background:var(--dm-surface,#17213b);border-color:var(--dm-border,#40506a)}
body.dark-mode .pa-messages{background:var(--dm-bg,#0d1428)}
body.dark-mode .pa-bubble{background:var(--dm-surface-raised,#26334e);border-color:var(--dm-border,#40506a);color:var(--dm-text,#e8edf8)}
body.dark-mode .pa-user{background:#354c88;color:#fff;border-color:#354c88}
body.dark-mode .pa-message-avatar{background:#35446d;color:#fff}
body.dark-mode .pa-reset{color:var(--dm-text,#e8edf8)}body.dark-mode .pa-reset:hover{background:#30405e}
body.dark-mode .pa-section-link{color:#b8cbff}
@media(max-width:575px){.pa-widget{right:16px;bottom:16px}.pa-panel{width:calc(100vw - 32px);height:min(520px,calc(100dvh - 88px));border-radius:18px}.pa-messages{padding:14px 11px}.pa-header{padding:11px 12px}}
@media(max-height:540px){.pa-panel{height:calc(100dvh - 86px)}}
@media(prefers-reduced-motion:reduce){.pa-panel,.pa-message{animation:none!important;transition:none!important}}

/* v1.14.4 — compact, content-led messaging layout (reference-inspired, original navy design). */
.pa-panel[hidden]{display:none!important}
.pa-panel{height:auto!important;max-height:min(610px,calc(100dvh - 100px));overflow:hidden;border-radius:22px;box-shadow:0 18px 52px rgba(15,23,52,.24)}
.pa-header{min-height:74px;padding:13px 15px;background:linear-gradient(115deg,#151b40,#283b6b)!important;border-bottom:0;color:#fff;position:relative}
.pa-header:before{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,#8ea9e9,#e0e8ff,#8ea9e9);opacity:.75}
.pa-header strong{color:#fff;font-size:15px}.pa-header small,.pa-header-sparkle{color:#d5def4}
.pa-avatar{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.32);color:#fff}
.pa-reset{color:#e4e9fa}.pa-reset:hover{background:rgba(255,255,255,.13)}
.pa-close{color:#fff!important;border-color:rgba(255,255,255,.72)!important;background:transparent!important}
.pa-close:hover{background:rgba(255,255,255,.14)!important}
.pa-messages{flex:0 1 auto;min-height:108px;max-height:min(335px,calc(100dvh - 285px));padding:16px 14px 15px;gap:11px;background:#f6f7fb;overflow-y:auto;scrollbar-width:thin}
.pa-bubble{font-size:13px;line-height:1.52;padding:10px 13px;border-radius:17px 17px 17px 5px;box-shadow:0 2px 8px rgba(20,31,65,.05)}
.pa-user{border-radius:17px 17px 5px 17px}
.pa-message-avatar{width:27px;height:27px;flex-basis:27px;background:#e5eaf7}
.pa-bottom{padding:11px 13px 12px;border-top:1px solid #e7eaf1}
.pa-suggestions{gap:7px;padding-bottom:11px}
.pa-topic{font-size:11px;padding:7px 11px;border-color:#cdd5e6;background:#f8faff;transition:background .15s ease}
.pa-topic:hover{background:#e9efff}
.pa-form{background:#f7f8fc;border:1px solid #d6ddeb;border-radius:25px;padding:4px 5px 4px 0;gap:4px}
.pa-form:focus-within{border-color:#6275a8;box-shadow:0 0 0 2px rgba(62,85,152,.12)}
.pa-form input{height:37px;background:transparent!important;border:0!important;box-shadow:none!important;padding:8px 12px;flex:1;outline:0}
.pa-form button{width:35px;height:35px;flex-basis:35px}
.pa-disclaimer{text-align:center;margin:7px 0 0;padding:0;color:#778096;font-size:10px}
body.dark-mode .pa-header{background:linear-gradient(115deg,#111934,#25375e)!important}
body.dark-mode .pa-form{background:#1c2944;border-color:#40506a}
body.dark-mode .pa-topic{background:#263552;color:#e8edf8;border-color:#4b5c78}
body.dark-mode .pa-topic:hover{background:#354668}
@media(max-width:575px){.pa-panel{width:calc(100vw - 32px);max-height:calc(100dvh - 86px);border-radius:19px}.pa-messages{max-height:min(320px,calc(100dvh - 265px));min-height:95px;padding:13px 11px}.pa-header{min-height:68px;padding:11px 12px}.pa-bottom{padding:10px 11px 11px}}
@media(max-height:530px){.pa-messages{max-height:calc(100dvh - 240px);min-height:65px}.pa-panel{max-height:calc(100dvh - 78px)}}

/* v1.14.5 — Root-cause fix: the global `section { padding:60px 0 }`
   was adding 120px of unwanted whitespace inside the assistant panel. */
#portfolio-assistant .pa-panel {
  padding:0!important; margin:0!important;
  height:auto!important; min-height:0!important;
  max-height:min(610px,calc(100dvh - 100px));
  display:flex; flex-direction:column;
}
#portfolio-assistant .pa-header { flex:0 0 auto; margin:0; }
#portfolio-assistant .pa-messages { flex:0 1 auto; min-height:0; }
#portfolio-assistant .pa-bottom { flex:0 0 auto; margin:0; }
@media(max-width:575px){
  #portfolio-assistant .pa-panel {max-height:calc(100dvh - 88px)}
}

/* v1.14.6 — Device-responsive assistant: reserve real room for the conversation.
   Override previous content-sized rules and message max-height constraints. */
#portfolio-assistant .pa-panel {
  box-sizing:border-box;
  width:clamp(370px, 39vw, 510px);
  max-width:calc(100vw - 32px);
  height:min(640px, calc(100dvh - 110px))!important;
  max-height:calc(100dvh - 110px);
  min-height:0!important;
}
#portfolio-assistant .pa-messages {
  flex:1 1 0!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto;
  overscroll-behavior:contain;
}
#portfolio-assistant .pa-bottom {flex:0 0 auto!important;}
@media (min-width:768px) and (max-width:1199px) {
  #portfolio-assistant .pa-panel {
    width:min(480px, calc(100vw - 48px));
    height:min(650px, calc(100dvh - 105px))!important;
  }
}
@media (max-width:767px) {
  #portfolio-assistant .pa-panel {
    width:calc(100vw - 28px);
    max-width:calc(100vw - 28px);
    height:min(680px, calc(100dvh - 96px))!important;
    max-height:calc(100dvh - 96px);
    border-radius:20px;
  }
  #portfolio-assistant .pa-messages {padding:16px 12px;}
  #portfolio-assistant .pa-bottom {padding:11px 12px 12px;}
}
@media (max-height:500px) {
  #portfolio-assistant .pa-panel {
    height:calc(100dvh - 80px)!important;
    max-height:calc(100dvh - 80px);
  }
  #portfolio-assistant .pa-messages {padding:10px 12px;}
}

/* v1.14.7 — Balanced mobile assistant: avoid near-full-screen empty chat. */
#portfolio-assistant .pa-panel {
  height:min(510px, calc(100dvh - 110px))!important;
  max-height:calc(100dvh - 110px);
}
@media (min-width:768px) and (max-width:1199px) {
  #portfolio-assistant .pa-panel {
    height:min(530px, calc(100dvh - 110px))!important;
  }
}
@media (max-width:767px) {
  #portfolio-assistant .pa-panel {
    width:min(440px, calc(100vw - 28px));
    max-width:calc(100vw - 28px);
    height:min(465px, calc(100dvh - 105px))!important;
    max-height:calc(100dvh - 105px);
  }
}
@media (max-height:500px) {
  #portfolio-assistant .pa-panel {
    height:calc(100dvh - 80px)!important;
    max-height:calc(100dvh - 80px);
  }
}


/* v1.14.8 — Benchmark-informed visual polish (Intercom / Crisp / Tidio patterns).
   Intentional: preserve the user-approved v1.14.7 panel dimensions and placement. */
#portfolio-assistant .pa-panel{border:1px solid #dce3ef;box-shadow:0 20px 54px rgba(12,22,52,.22),0 3px 12px rgba(12,22,52,.08);isolation:isolate}
#portfolio-assistant .pa-header{padding:12px 15px;gap:11px;background:linear-gradient(118deg,#161b40 0%,#233666 100%)!important}
#portfolio-assistant .pa-header:before{height:2px;opacity:.6}
#portfolio-assistant .pa-avatar{display:grid;place-items:center;width:40px;height:40px;flex-basis:40px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.12);box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
#portfolio-assistant .pa-header strong{font-size:15px;letter-spacing:-.015em;line-height:1.3}
#portfolio-assistant .pa-header small{font-size:11px;letter-spacing:.01em;color:#d4def5}
#portfolio-assistant .pa-reset{width:38px;height:38px;flex-basis:38px;font-size:18px}
#portfolio-assistant .pa-close{width:38px;height:38px;flex-basis:38px;border:1.5px solid rgba(255,255,255,.83)!important;border-radius:50%;font-size:15px}
#portfolio-assistant .pa-messages{background:linear-gradient(180deg,#f7f9fd 0%,#f3f6fb 100%);gap:12px;padding:17px 14px}
#portfolio-assistant .pa-message{gap:9px}
#portfolio-assistant .pa-message-avatar{width:28px;height:28px;flex:0 0 28px;background:#e4eaf8;color:#243869;border:1px solid #dce4f5;font-size:13px}
#portfolio-assistant .pa-bubble{font-size:14px;line-height:1.53;padding:11px 14px;border:1px solid #e2e8f2;border-radius:17px 17px 17px 5px;box-shadow:0 3px 10px rgba(17,32,72,.055);max-width:calc(100% - 40px)}
#portfolio-assistant .pa-user{border-color:#161b40;border-radius:17px 17px 5px 17px;max-width:84%}
#portfolio-assistant .pa-section-link{font-size:12px;line-height:1.5;color:#233e83;text-underline-offset:3px}
#portfolio-assistant .pa-bottom{background:#fff;padding:11px 13px 12px;border-top:1px solid #e1e7f1}
#portfolio-assistant .pa-suggestions{gap:7px;padding:0 0 11px}
#portfolio-assistant .pa-topic{background:#f0f3f9;border:1px solid transparent;border-radius:999px;color:#263a64;font-size:12px;font-weight:500;line-height:1.35;padding:8px 12px;min-height:36px;box-shadow:none;transition:background-color .15s ease,border-color .15s ease}
@media(hover:hover) and (pointer:fine){#portfolio-assistant .pa-topic:hover{background:#e3eaf8;border-color:#cbd6ec}}
#portfolio-assistant .pa-form{background:#f7f9fc;border:1px solid #cdd6e6;border-radius:25px;padding:4px 5px 4px 1px;box-shadow:inset 0 1px 2px rgba(18,31,60,.025)}
#portfolio-assistant .pa-form:focus-within{border-color:#546ba6;box-shadow:0 0 0 3px rgba(61,88,157,.13)}
#portfolio-assistant .pa-form input{font-size:16px;color:#26344e;min-height:39px}
#portfolio-assistant .pa-form input::placeholder{color:#7c8799;opacity:1}
#portfolio-assistant .pa-form button{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;background:#161b40;box-shadow:0 2px 6px rgba(22,27,64,.14)}
#portfolio-assistant .pa-disclaimer{font-size:10px;line-height:1.35;color:#707b8f;margin:8px 0 0;padding:0 2px}
#portfolio-assistant :is(.pa-reset,.pa-close,.pa-topic,.pa-form button):focus-visible{outline:2px solid #94b2ff;outline-offset:2px}
@media(hover:none) and (pointer:coarse){#portfolio-assistant :is(.pa-reset,.pa-close,.pa-topic,.pa-form button):focus:not(:focus-visible){outline:none;box-shadow:none}}
body.dark-mode #portfolio-assistant .pa-panel{border-color:#445370;box-shadow:0 20px 54px rgba(0,0,0,.42)}
body.dark-mode #portfolio-assistant .pa-header{background:linear-gradient(118deg,#101830,#26395f)!important}
body.dark-mode #portfolio-assistant .pa-messages{background:linear-gradient(180deg,#101a30,#131f37)}
body.dark-mode #portfolio-assistant .pa-bottom{background:var(--dm-surface,#17213b);border-color:var(--dm-border,#40506a)}
body.dark-mode #portfolio-assistant .pa-bubble{background:#263651;border-color:#3c4e6c;color:#edf2fc}
body.dark-mode #portfolio-assistant .pa-user{background:#405992;border-color:#405992;color:#fff}
body.dark-mode #portfolio-assistant .pa-message-avatar{background:#283e66;border-color:#42577c;color:#e8efff}
body.dark-mode #portfolio-assistant .pa-topic{background:#293b5a;border-color:#344b70;color:#f0f4fc}
@media(hover:hover) and (pointer:fine){body.dark-mode #portfolio-assistant .pa-topic:hover{background:#385077;border-color:#5471a0}}
body.dark-mode #portfolio-assistant .pa-form{background:#1d2c47;border-color:#50617d}
body.dark-mode #portfolio-assistant .pa-form input{color:#f1f4fb}
body.dark-mode #portfolio-assistant .pa-form input::placeholder{color:#b1bed3}
body.dark-mode #portfolio-assistant .pa-disclaimer{color:#b7c1d4}
@media(max-width:575px){#portfolio-assistant .pa-header{padding:11px 12px}#portfolio-assistant .pa-messages{padding:13px 11px}#portfolio-assistant .pa-bottom{padding:10px 11px 11px}#portfolio-assistant .pa-bubble{font-size:13px}#portfolio-assistant .pa-topic{font-size:11px;padding:7px 10px;min-height:34px}}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-topic{transition:none}}

/* v1.14.9: Minimize affordance; retain approved responsive panel dimensions. */
#portfolio-assistant .pa-close i.bi-dash-lg{font-size:20px;line-height:1}

/* v1.15.0 — Single, correctly aligned composer focus treatment.
   Keep the actual text input borderless and let the outer pill own focus. */
#portfolio-assistant .pa-form input,
#portfolio-assistant .pa-form input:focus,
#portfolio-assistant .pa-form input:focus-visible,
#portfolio-assistant .pa-form input:active {
  outline: none !important;
  outline-offset: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}
#portfolio-assistant .pa-form:focus-within {
  border-color: #7889ac;
  box-shadow: 0 0 0 1px rgba(70, 93, 145, .16);
}
@media (hover:none) and (pointer:coarse) {
  #portfolio-assistant .pa-form:focus-within {
    border-color: #aab8d0;
    box-shadow: none;
  }
}
body.dark-mode #portfolio-assistant .pa-form:focus-within {
  border-color: #8399bd;
  box-shadow: 0 0 0 1px rgba(160, 185, 229, .18);
}
@media (hover:none) and (pointer:coarse) {
  body.dark-mode #portfolio-assistant .pa-form:focus-within {
    border-color: #6d82a4;
    box-shadow: none;
  }
}

/* v1.15.1 — familiar messaging send control and subtle reply cue */
#portfolio-assistant .pa-form button[type="submit"]{
  border-radius:50%;transition:background-color .18s ease,transform .18s ease;
}
#portfolio-assistant .pa-form button[type="submit"] .bi{font-size:16px;transform:translate(-1px,1px)}
@media(hover:hover){#portfolio-assistant .pa-form button[type="submit"]:hover{background:#2d4179;transform:translateY(-1px)}}
#portfolio-assistant .pa-typing{
  display:inline-flex;align-items:center;gap:5px;padding:13px 15px;
  background:#fff;border:1px solid #e2e8f2;border-radius:17px 17px 17px 5px;
  box-shadow:0 3px 10px rgba(17,32,72,.055);
}
#portfolio-assistant .pa-typing span{width:6px;height:6px;border-radius:50%;background:#7483a4;animation:pa-dot 1.05s ease-in-out infinite}
#portfolio-assistant .pa-typing span:nth-child(2){animation-delay:.14s}
#portfolio-assistant .pa-typing span:nth-child(3){animation-delay:.28s}
@keyframes pa-dot{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
body.dark-mode #portfolio-assistant .pa-typing{background:#263651;border-color:#3c4e6c}
body.dark-mode #portfolio-assistant .pa-typing span{background:#bdc9e5}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-typing span{animation:none;opacity:.75}#portfolio-assistant .pa-form button[type="submit"]{transition:none}}

/* v1.15.4: Preserve approved welcome-message line breaks and questions. */
#portfolio-assistant .pa-welcome-row .pa-bubble{white-space:pre-line}

/* v1.15.7 — Integrated message action button and progressive topic suggestions. */
#portfolio-assistant .pa-section-link{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  width:fit-content;max-width:calc(100% - 34px);margin:8px 0 4px 34px;
  padding:9px 13px;border:1px solid #c9d5ec;border-radius:11px;
  background:#e8eefb;color:#19396f;font-size:12px;font-weight:700;
  text-decoration:none;box-shadow:0 1px 3px rgba(17,32,72,.05);
  transition:background-color .15s ease,border-color .15s ease;
}
#portfolio-assistant .pa-section-link:hover{background:#dbe6fa;border-color:#aebfe2;text-decoration:none}
#portfolio-assistant .pa-section-link:focus-visible{outline:2px solid #7398ed;outline-offset:2px}
#portfolio-assistant .pa-section-link .bi{font-size:13px}
#portfolio-assistant .pa-suggestions[hidden]{display:none!important}
body.dark-mode #portfolio-assistant .pa-section-link{background:#2c4168;color:#e4edff;border-color:#4e6796}
body.dark-mode #portfolio-assistant .pa-section-link:hover{background:#39527d;border-color:#6987bd}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-section-link{transition:none}}

/* v1.15.9 — compact welcome and actionable starter prompts. */
#portfolio-assistant .pa-welcome-row .pa-bubble{white-space:pre-line;line-height:1.48}
#portfolio-assistant .pa-welcome-prompts{display:grid;gap:7px;margin:-4px 0 6px 34px;max-width:calc(100% - 34px)}
#portfolio-assistant .pa-starter-prompt{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;width:100%;padding:9px 12px;border:1px solid #d5deed;border-radius:12px;background:#fff;color:#26395d;font:inherit;font-size:12px;line-height:1.4;cursor:pointer;box-shadow:0 2px 6px rgba(17,32,72,.035);transition:background .15s ease,border-color .15s ease}
#portfolio-assistant .pa-starter-prompt .bi{flex:none;color:#526a96}
#portfolio-assistant .pa-starter-prompt:hover{background:#eef3fb;border-color:#b9c9e5}
#portfolio-assistant .pa-starter-prompt:focus-visible{outline:2px solid #7194d6;outline-offset:2px}
body.dark-mode #portfolio-assistant .pa-starter-prompt{background:#243451;border-color:#425777;color:#edf2fc}
body.dark-mode #portfolio-assistant .pa-starter-prompt .bi{color:#c4d5f5}
body.dark-mode #portfolio-assistant .pa-starter-prompt:hover{background:#304567}
@media(min-width:768px) and (min-height:640px){#portfolio-assistant .pa-panel{height:min(565px,calc(100dvh - 110px))!important}}
@media(max-width:767px){#portfolio-assistant .pa-starter-prompt{font-size:12px;padding:8px 10px}}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-starter-prompt{transition:none}}

/* v1.16.0 — Restore the disclaimer information icon. */
#portfolio-assistant .pa-disclaimer{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;text-align:center}
#portfolio-assistant .pa-disclaimer .bi-info-circle{font-size:12px;line-height:1;flex:0 0 auto;opacity:.85}

/* v1.16.1 — Accessible expandable topics menu; preserve approved chat sizing */
#portfolio-assistant .pa-topics-row{position:relative;display:flex;align-items:flex-start;gap:8px;padding-bottom:10px;min-width:0}
#portfolio-assistant .pa-topics-row .pa-suggestions{flex:1 1 auto;min-width:0;padding:0;align-items:center}
#portfolio-assistant .pa-topics-toggle{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border:1px solid #d4ddeb;border-radius:12px;background:#f0f3f9;color:#22345e;cursor:pointer}
#portfolio-assistant .pa-topics-toggle i{font-size:21px;line-height:1}
#portfolio-assistant .pa-topics-toggle[aria-expanded="true"]{background:#dfe7f6;border-color:#a8b8d6}
#portfolio-assistant .pa-topics-toggle:disabled{opacity:.4;cursor:default}
#portfolio-assistant .pa-topics-toggle:focus-visible{outline:2px solid #6685c7;outline-offset:2px}
#portfolio-assistant .pa-topics-menu{position:absolute;right:0;bottom:calc(100% + 8px);z-index:8;width:min(285px,100%);max-height:min(300px,45dvh);overflow:auto;background:#fff;border:1px solid #dce4f0;border-radius:15px;box-shadow:0 12px 30px rgba(13,28,63,.17);padding:12px}
#portfolio-assistant .pa-topics-menu[hidden]{display:none!important}
#portfolio-assistant .pa-topics-title{display:block;font-size:12px;font-weight:700;color:#26395e;margin-bottom:10px}
#portfolio-assistant .pa-topics-options{display:flex;flex-wrap:wrap;gap:7px}
#portfolio-assistant .pa-topics-options .pa-topic{white-space:normal;text-align:left}
body.dark-mode #portfolio-assistant .pa-topics-toggle{background:#273652;border-color:#485b79;color:#e8efff}
body.dark-mode #portfolio-assistant .pa-topics-menu{background:var(--theme-dark-assistant-menu);border-color:var(--theme-dark-assistant-border)}
body.dark-mode #portfolio-assistant .pa-topics-title{color:#e9effb}

/* v1.16.2 — accessible composer quick actions; panel dimensions unchanged */
#portfolio-assistant .pa-bottom{position:relative}
#portfolio-assistant .pa-actions-toggle{flex:0 0 30px!important;width:30px!important;height:30px!important;border-radius:50%!important;background:transparent!important;color:#40557e!important;box-shadow:none!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center}
#portfolio-assistant .pa-actions-toggle .bi{font-size:19px;transform:none!important}
#portfolio-assistant .pa-actions-toggle[aria-expanded="true"]{background:#e7edfa!important;color:#1d3769!important}
#portfolio-assistant .pa-actions-toggle:focus-visible,#portfolio-assistant .pa-actions-menu button:focus-visible{outline:2px solid #658ad5;outline-offset:2px}
#portfolio-assistant .pa-actions-menu{position:absolute;left:0;bottom:calc(100% - 4px);z-index:10;width:min(265px,100%);padding:10px;background:#fff;border:1px solid #dce4f0;border-radius:15px;box-shadow:0 12px 30px rgba(13,28,63,.17);display:grid;gap:2px}
#portfolio-assistant .pa-actions-menu[hidden]{display:none!important}
#portfolio-assistant .pa-actions-title{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6a7893;padding:5px 10px 7px}
#portfolio-assistant .pa-actions-menu button{display:flex;align-items:center;gap:11px;text-align:left;width:100%;background:transparent;color:#263b60;border:0;border-radius:9px;padding:10px;font-size:13px;font-weight:600;cursor:pointer}
#portfolio-assistant .pa-actions-menu button .bi{font-size:17px;color:#536d9d;width:20px;text-align:center}
@media(hover:hover){#portfolio-assistant .pa-actions-menu button:hover{background:#edf2fb}}
body.dark-mode #portfolio-assistant .pa-actions-menu{background:var(--theme-dark-assistant-menu);border-color:var(--theme-dark-assistant-border)}
body.dark-mode #portfolio-assistant .pa-actions-title{color:#a6b6d2}
body.dark-mode #portfolio-assistant .pa-actions-menu button{color:#e5ecf8}
body.dark-mode #portfolio-assistant .pa-actions-menu button .bi{color:#afc4ec}
body.dark-mode #portfolio-assistant .pa-actions-toggle{color:#c3d0ea!important}
body.dark-mode #portfolio-assistant .pa-actions-toggle[aria-expanded="true"]{background:#344766!important;color:#fff!important}
@media(hover:hover){body.dark-mode #portfolio-assistant .pa-actions-menu button:hover{background:var(--theme-dark-assistant-hover)}}

/* v1.16.4 — match floating launcher robot icon to assistant avatars */
#portfolio-assistant .pa-launcher .bi-robot{font-size:25px;line-height:1;display:block}

/* v1.16.5 — small floating, non-modal invitation above the robot launcher */
#portfolio-assistant .pa-nudge{position:absolute;right:0;bottom:calc(100% + 12px);z-index:3;max-width:min(255px,calc(100vw - 34px));width:max-content;padding:11px 15px;border:1px solid #d8e2f0;border-radius:14px;background:#fff;color:#263b60;box-shadow:0 7px 22px rgba(18,34,68,.16);font:inherit;font-size:13px;font-weight:600;line-height:1.4;text-align:left;cursor:pointer;animation:pa-nudge-in .2s ease-out}
#portfolio-assistant .pa-nudge[hidden]{display:none!important}
#portfolio-assistant .pa-nudge:after{content:"";position:absolute;right:21px;bottom:-6px;width:10px;height:10px;background:inherit;border-right:1px solid #d8e2f0;border-bottom:1px solid #d8e2f0;transform:rotate(45deg)}
#portfolio-assistant .pa-nudge:focus-visible{outline:2px solid #7095d8;outline-offset:3px}
body.dark-mode #portfolio-assistant .pa-nudge{background:#263855;color:#eef3ff;border-color:#52688b}
body.dark-mode #portfolio-assistant .pa-nudge:after{border-color:#52688b}
@keyframes pa-nudge-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-nudge{animation:none}}

/* v1.16.6 — smaller-screen assistant proportions, without affecting tablets/desktops. */
@media (max-width: 575px) and (min-height: 501px) {
  #portfolio-assistant .pa-panel {
    width:min(390px, calc(100vw - 40px));
    max-width:calc(100vw - 40px);
    height:min(420px, calc(100dvh - 115px))!important;
    max-height:calc(100dvh - 115px);
    border-radius:18px;
  }
  #portfolio-assistant .pa-header {padding:10px 12px;min-height:0;gap:9px}
  #portfolio-assistant .pa-messages {padding:11px 10px;gap:9px}
  #portfolio-assistant .pa-bottom {padding:9px 10px 10px}
  #portfolio-assistant .pa-welcome-prompts {gap:6px;margin-bottom:4px}
  #portfolio-assistant .pa-starter-prompt {padding:7px 10px;line-height:1.35}
}
@media (max-width: 390px) and (min-height: 501px) {
  #portfolio-assistant .pa-panel {height:min(395px, calc(100dvh - 115px))!important}
}

/* v1.16.7 — compact responsive assistant across phone and small-tablet viewports.
   Override earlier tablet >=768px height rule and narrow <=575px-only fix. */
@media (max-width: 900px) {
  #portfolio-assistant .pa-panel {
    box-sizing:border-box;
    width:min(370px, calc(100vw - 44px))!important;
    max-width:calc(100vw - 44px)!important;
    height:min(435px, calc(100dvh - 125px))!important;
    max-height:calc(100dvh - 125px)!important;
    border-radius:18px;
  }
  #portfolio-assistant .pa-header{min-height:59px;padding:9px 12px;gap:9px}
  #portfolio-assistant .pa-header strong{font-size:14px}
  #portfolio-assistant .pa-header small{font-size:10px}
  #portfolio-assistant .pa-messages{padding:11px 10px;gap:8px}
  #portfolio-assistant .pa-bottom{padding:8px 10px 9px}
  #portfolio-assistant .pa-welcome-prompts{gap:6px;margin-bottom:3px}
  #portfolio-assistant .pa-starter-prompt{padding:7px 10px;line-height:1.35}
  #portfolio-assistant .pa-disclaimer{font-size:9px;padding-top:5px}
}
@media(max-width:380px){
  #portfolio-assistant .pa-panel{width:calc(100vw - 38px)!important;max-width:calc(100vw - 38px)!important;height:min(405px,calc(100dvh - 118px))!important}
}
@media(max-height:550px) and (max-width:900px){
  #portfolio-assistant .pa-panel{height:calc(100dvh - 90px)!important;max-height:calc(100dvh - 90px)!important}
}
/* Minimal arrow-up send action, consistent with the circular composer button. */
#portfolio-assistant .pa-form button[type="submit"] .bi-arrow-up-short{font-size:26px;line-height:1;display:block;font-weight:700}
/* Soft periodic robot motion only while the assistant is minimized. */
@keyframes pa-robot-idle{0%,78%,100%{transform:translateY(0) rotate(0)}83%{transform:translateY(-3px) rotate(-6deg)}88%{transform:translateY(-1px) rotate(5deg)}93%{transform:translateY(0) rotate(0)}}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .bi-robot{animation:pa-robot-idle 7s ease-in-out infinite;transform-origin:50% 70%}
#portfolio-assistant .pa-launcher[aria-expanded="true"] .bi-robot{animation:none}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-launcher .bi-robot{animation:none!important}}

/* v1.16.8 — two visible topic chips on compact screens; all topics remain in hamburger menu. */
@media(max-width:900px){
  #portfolio-assistant .pa-topics-row .pa-suggestions{gap:6px}
  #portfolio-assistant .pa-topics-row .pa-topic{font-size:11px;padding:7px 10px;min-height:33px}
}

/* v1.16.9 — expressive minimalist robot, launcher only. */
#portfolio-assistant .pa-launcher .pa-expressive-robot{width:35px;height:35px;display:block;color:inherit;overflow:visible}
#portfolio-assistant .pa-launcher .pa-robot-head{transform-origin:32px 37px}
#portfolio-assistant .pa-launcher .pa-face{opacity:0}
#portfolio-assistant .pa-launcher .pa-face-happy{opacity:1}
/* Smile is the resting face; brief blink, wink, curious, and thinking moments. */
@keyframes pa-expression-happy{0%,12%,17%,34%,40%,58%,64%,82%,88%,100%{opacity:1}13%,16%,35%,39%,59%,63%,83%,87%{opacity:0}}
@keyframes pa-expression-blink{0%,12%,17%,100%{opacity:0}13%,16%{opacity:1}}
@keyframes pa-expression-wink{0%,34%,40%,100%{opacity:0}35%,39%{opacity:1}}
@keyframes pa-expression-curious{0%,58%,64%,100%{opacity:0}59%,63%{opacity:1}}
@keyframes pa-expression-thinking{0%,82%,88%,100%{opacity:0}83%,87%{opacity:1}}
@keyframes pa-expression-tilt{0%,32%,42%,56%,66%,80%,90%,100%{transform:rotate(0deg) translateY(0)}35%,39%{transform:rotate(-8deg) translateY(-1px)}59%,63%{transform:rotate(5deg) translateY(-2px)}83%,87%{transform:rotate(-5deg) translateY(0)}}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-face-happy{animation:pa-expression-happy 12s steps(1,end) infinite}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-face-blink{animation:pa-expression-blink 12s steps(1,end) infinite}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-face-wink{animation:pa-expression-wink 12s steps(1,end) infinite}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-face-curious{animation:pa-expression-curious 12s steps(1,end) infinite}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-face-thinking{animation:pa-expression-thinking 12s steps(1,end) infinite}
#portfolio-assistant .pa-launcher[aria-expanded="false"] .pa-robot-head{animation:pa-expression-tilt 12s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){#portfolio-assistant .pa-launcher .pa-face,#portfolio-assistant .pa-launcher .pa-robot-head{animation:none!important}#portfolio-assistant .pa-launcher .pa-face{opacity:0}#portfolio-assistant .pa-launcher .pa-face-happy{opacity:1}}

/* v1.17.0 — one final adaptive layout layer across Android, iPhone, iPad and desktop.
   Width AND height determine sizing; header and footer never consume the message scrollport. */
#portfolio-assistant{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
#portfolio-assistant .pa-panel{
  box-sizing:border-box!important;
  width:min(470px,calc(100vw - 48px))!important;
  max-width:calc(100vw - 48px)!important;
  height:min(520px,calc(100dvh - 112px))!important;
  max-height:calc(100dvh - 112px)!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
#portfolio-assistant .pa-panel[hidden]{display:none!important}
#portfolio-assistant .pa-header,#portfolio-assistant .pa-bottom{flex:0 0 auto!important}
#portfolio-assistant .pa-messages{
  flex:1 1 0!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain;
}
#portfolio-assistant .pa-disclaimer{
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;
  gap:6px;line-height:1.35;
}
#portfolio-assistant .pa-disclaimer .bi-info-circle{flex:0 0 auto}
#portfolio-assistant .pa-disclaimer span{min-width:0;text-align:center}
@media(min-width:768px) and (max-width:1199px){
  #portfolio-assistant .pa-panel{
    width:min(420px,calc(100vw - 52px))!important;
    max-width:calc(100vw - 52px)!important;
    height:min(480px,calc(100dvh - 125px))!important;
    max-height:calc(100dvh - 125px)!important;
  }
}
@media(max-width:767px){
  #portfolio-assistant .pa-panel{
    width:min(360px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    height:min(470px,calc(100dvh - 108px))!important;
    max-height:calc(100dvh - 108px)!important;
    border-radius:18px;
  }
  #portfolio-assistant .pa-header{padding:9px 11px!important;gap:8px;min-height:0}
  #portfolio-assistant .pa-header strong{font-size:14px}
  #portfolio-assistant .pa-header small{font-size:10px}
  #portfolio-assistant .pa-messages{padding:11px 10px!important;gap:8px!important}
  #portfolio-assistant .pa-bubble{font-size:12px!important;line-height:1.4!important;padding:10px 11px}
  #portfolio-assistant .pa-welcome-row .pa-bubble{line-height:1.4!important}
  #portfolio-assistant .pa-welcome-prompts{gap:5px;margin:0 0 4px 30px;max-width:calc(100% - 30px)}
  #portfolio-assistant .pa-starter-prompt{padding:7px 9px;font-size:11px;line-height:1.3}
  #portfolio-assistant .pa-bottom{padding:8px 10px 9px!important}
  #portfolio-assistant .pa-topics-row{margin-bottom:7px}
  #portfolio-assistant .pa-disclaimer{font-size:9px!important;margin-top:5px!important;padding:0!important}
}
@media(max-width:767px) and (max-height:650px){
  #portfolio-assistant .pa-panel{
    height:calc(100dvh - 92px)!important;
    max-height:calc(100dvh - 92px)!important;
  }
}
@media(max-height:460px){
  #portfolio-assistant .pa-panel{
    height:calc(100dvh - 78px)!important;
    max-height:calc(100dvh - 78px)!important;
  }
}

/* v1.17.1 — interactive closing section after the footer */
.journey-end{background:var(--theme-dark-journey);color:#fff;padding:52px 20px 58px;text-align:center;position:relative;overflow:hidden}
.journey-end::before{content:"";position:absolute;left:50%;top:-180px;transform:translateX(-50%);width:500px;height:300px;background:radial-gradient(ellipse,rgba(99,135,202,.16),transparent 70%);pointer-events:none}
.journey-end-inner{position:relative;max-width:680px;margin:auto}
.journey-end-emblem{width:50px;height:50px;border-radius:50%;background:#283f70;display:inline-flex;align-items:center;justify-content:center;font-size:22px;color:#e2ebff;margin-bottom:14px}
.journey-end-eyebrow{font-size:10px!important;letter-spacing:.16em;font-weight:700;color:#b7c9e9;margin:0 0 12px!important}
.journey-end h2{font-size:clamp(21px,3.5vw,29px);line-height:1.25;color:#fff!important;margin:0 0 12px!important;font-weight:700}
.journey-end-description{color:var(--theme-dark-journey-muted);font-size:13px;line-height:1.6;margin:0 auto 25px!important;max-width:440px}
.journey-end-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.journey-end-action{appearance:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;min-height:86px;padding:13px 8px;border-radius:13px;border:1px solid var(--theme-dark-journey-border);background:var(--theme-dark-journey-card);color:#fff!important;text-decoration:none!important;font-family:inherit;font-size:12px;font-weight:600;line-height:1.35;cursor:pointer;transition:background .2s ease,transform .2s ease,border-color .2s ease}
.journey-end-action i{font-size:19px}
.journey-end-action:hover{background:var(--theme-dark-journey-hover);border-color:#92acd8;transform:translateY(-2px)}
.journey-end-action:focus-visible{outline:3px solid #b7caff;outline-offset:3px}
.journey-end.is-visible .journey-end-inner{animation:journey-enter .65s ease-out both}
.journey-end.is-visible .journey-end-action{animation:journey-enter .45s ease-out both}
.journey-end.is-visible .journey-end-action:nth-child(2){animation-delay:.07s}
.journey-end.is-visible .journey-end-action:nth-child(3){animation-delay:.14s}
.journey-end.is-visible .journey-end-action:nth-child(4){animation-delay:.21s}
@keyframes journey-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:540px){.journey-end{padding:38px 18px 44px}.journey-end-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.journey-end-action{min-height:78px}.journey-end-description{margin-bottom:20px!important}}
@media(prefers-reduced-motion:reduce){.journey-end .journey-end-inner,.journey-end .journey-end-action{animation:none!important;transition:none!important;transform:none!important}}

/* v1.17.5 — unified Midnight Navy navigation, preserving light mode */
body.dark-mode #header{background:var(--theme-dark-header);border-right-color:var(--theme-dark-border)}
body.dark-mode .nav-menu a,
body.dark-mode .nav-menu a:focus{background:var(--theme-dark-raised);color:var(--theme-dark-text)}
body.dark-mode .nav-menu a span,
body.dark-mode .nav-menu a:focus span,
body.dark-mode .nav-menu a i,
body.dark-mode .nav-menu a:focus i{color:var(--theme-dark-text)}
body.dark-mode .nav-menu a.active,
body.dark-mode .nav-menu a.active:focus,
body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu li:hover>a{background:var(--theme-dark-accent);color:var(--theme-dark-accent-ink)}
body.dark-mode .nav-menu a.active span,
body.dark-mode .nav-menu a.active i,
body.dark-mode .nav-menu a.active:focus span,
body.dark-mode .nav-menu a.active:focus i,
body.dark-mode .nav-menu a:hover span,
body.dark-mode .nav-menu a:hover i,
body.dark-mode .nav-menu li:hover>a span,
body.dark-mode .nav-menu li:hover>a i{color:var(--theme-dark-accent-ink)}
body.dark-mode .nav-menu a:focus-visible{outline:3px solid var(--theme-dark-focus);outline-offset:3px}
body.dark-mode button.mobile-nav-toggle{background:var(--theme-dark-raised);color:var(--theme-dark-text)}
body.dark-mode.mobile-nav-active button.mobile-nav-toggle{background:var(--theme-dark-accent);color:var(--theme-dark-accent-ink)}
body.dark-mode button.mobile-nav-toggle:focus-visible{outline:3px solid var(--theme-dark-focus)!important;outline-offset:3px}

/* v1.17.6 — transparent collapsed navigation rail; keep the icon pills intact.
   Desktop header is a foreground UI layer, not a particle-overlay target. */
@media (min-width: 992px) {
  #header, body.dark-mode #header {
    background: transparent !important;
    background-color: transparent !important;
    border-right: 0 !important;
    box-shadow: none !important;
    z-index: 9997;
    isolation: isolate;
  }
  #header .nav-menu, #header .navbar {
    background: transparent !important;
    position: relative;
    z-index: 1;
  }
}
/* Expanded mobile/tablet navigation remains an opaque readable drawer. */
@media (max-width: 991px) {
  body.dark-mode.mobile-nav-active #header,
  body.dark-mode #header { background: var(--theme-dark-header) !important; }
}

/* v1.17.7 — particles are a noninteractive background effect, not a foreground overlay.
   Keep the fixed particles above the hero image/gradient, but behind ALL page content. */
#stars.stars{z-index:1!important;pointer-events:none!important;isolation:isolate}
#hero{z-index:auto!important}
#hero::before{z-index:0}
#hero>.container{position:relative;z-index:2}
main,#footer,.journey-end{position:relative;z-index:2}
#header{z-index:9997!important}
.mobile-nav-toggle{z-index:9998!important}
#portfolio-assistant{z-index:1005!important}
@media(prefers-reduced-motion:reduce){#stars.stars::after{animation:none!important}}

/* v1.17.8 — translucent expanded drawer reveals background particles while keeping
   navigation buttons/labels above the background-only particle layer. */
@media(max-width:991px){
  body.dark-mode.mobile-nav-active #header{
    background:rgba(13,23,48,.86)!important;
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter:blur(3px);
  }
  body:not(.dark-mode).mobile-nav-active #header{
    background:rgba(255,255,255,.88)!important;
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter:blur(3px);
  }
}
/* Touchscreens must not retain a second selected-looking button after a tap. */
@media(hover:none){
  .nav-menu a:not(.active):hover,
  .nav-menu li:hover>a:not(.active),
  body.dark-mode .nav-menu a:not(.active):hover,
  body.dark-mode .nav-menu li:hover>a:not(.active){
    background:var(--color-surface)!important;
    color:var(--color-text-muted)!important;
  }
  body.dark-mode .nav-menu a:not(.active):hover,
  body.dark-mode .nav-menu li:hover>a:not(.active){background:#192A4B!important;color:#E5ECFA!important}
  .nav-menu a:not(.active):hover span,
  .nav-menu a:not(.active):hover i{color:var(--color-text-muted)!important}
  body.dark-mode .nav-menu a:not(.active):hover span,
  body.dark-mode .nav-menu a:not(.active):hover i{color:#E5ECFA!important}
  .nav-menu a:not(.active):hover,
  .nav-menu li:hover>a:not(.active){width:56px}
  .nav-menu a:not(.active):hover span,
  .nav-menu li:hover>a:not(.active) span{display:none}
  @media(max-width:991px){
    .nav-menu a:not(.active):hover,
    .nav-menu li:hover>a:not(.active){width:100%}
    .nav-menu a:not(.active):hover span,
    .nav-menu li:hover>a:not(.active) span{display:block}
  }
}

/* v1.18.1 — hide only the collapsed desktop navigation when Journey Complete appears.
   The mobile drawer is not affected, and reduced motion disables the fade. */
@media(min-width:992px){
  body.journey-nav-hidden #header{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:opacity .22s ease,visibility .22s ease!important}
  body:not(.journey-nav-hidden) #header{opacity:1;visibility:visible;transition:opacity .22s ease,visibility .22s ease}
}
@media(prefers-reduced-motion:reduce){
  body.journey-nav-hidden #header,body:not(.journey-nav-hidden) #header{transition:none!important}
}

/* v1.18.12 — cohesive closing chapter. No teaser, scroll checkpoint, or spacer.
   Keep the chapter in normal flow and scrub only its visual entrance. */
#journey-end{padding:0!important;overflow:hidden!important;background:var(--theme-dark-journey)!important}
#journey-end .journey-reveal-clip{display:block!important;max-height:none!important;overflow:visible!important;opacity:1!important;transition:none!important}
#journey-end .journey-end-inner{
  padding:clamp(36px,5vw,58px) 20px clamp(38px,5vw,58px)!important;
  opacity:var(--journey-opacity,1)!important;
  transform:translate3d(0,var(--journey-rise,0px),0)!important;
  animation:none!important;transition:none!important;
}
#journey-end .journey-end-action{animation:none!important}
#journey-end.is-visible .journey-end-inner,
#journey-end.is-visible .journey-end-action{animation:none!important}
@media(max-width:540px){
  #journey-end .journey-end-inner{padding:32px 18px 38px!important}
}
@media(prefers-reduced-motion:reduce){
  #journey-end .journey-end-inner{opacity:1!important;transform:none!important}
}

/* v1.18.16 — a brief reveal pause, not a scroll checkpoint.
   Teaser overlays the existing closing chapter; it contributes zero layout height. */
#journey-end{isolation:isolate;min-height:0!important}
#journey-end .journey-teaser{
  position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;
  flex-direction:column;gap:12px;pointer-events:none;color:#e3ebfb;
  opacity:0;visibility:hidden;transform:translateY(-8px);
  transition:opacity .35s ease,transform .35s ease,visibility 0s linear .35s;
}
#journey-end .journey-teaser i{font-size:22px;color:#a9bde3}
#journey-end .journey-teaser span{font-size:clamp(17px,2.5vw,23px);font-weight:650;letter-spacing:.015em}
#journey-end.journey-pending .journey-teaser{
  opacity:1;visibility:visible;transform:translateY(0);
  transition:opacity .25s ease,transform .25s ease,visibility 0s;
}
#journey-end .journey-end-inner{
  opacity:1!important;transform:translateY(0)!important;
  transition:opacity .48s ease,transform .48s ease!important;
}
#journey-end.journey-pending .journey-end-inner{
  opacity:0!important;transform:translateY(18px)!important;
  pointer-events:none;visibility:hidden;
}
#journey-end.journey-ready .journey-end-inner{visibility:visible}
@media(prefers-reduced-motion:reduce){
  #journey-end .journey-teaser{display:none!important}
  #journey-end .journey-end-inner{opacity:1!important;transform:none!important;visibility:visible!important;transition:none!important}
}

/* v1.18.17 preview — compact scroll-controlled two-state reveal. */
#journey-end{min-height:0!important;overflow:hidden!important;position:relative!important}
#journey-end .journey-teaser{
  position:absolute!important;inset:44px 12px auto!important;height:70px!important;
  gap:5px!important;opacity:calc(1 - min(1, var(--journey-progress,0) * 2))!important;
  visibility:visible!important;transform:translateY(calc(-12px * var(--journey-progress,0)))!important;
  transition:none!important;pointer-events:none!important;
}
#journey-end .journey-teaser i{font-size:15px!important}
#journey-end .journey-teaser span{font-size:14px!important;font-weight:500!important;letter-spacing:.02em!important}
#journey-end .journey-end-inner{
  padding:46px 18px 44px!important;
  opacity:var(--journey-progress,0)!important;
  transform:translateY(calc(32px * (1 - var(--journey-progress,0)))) scale(calc(.94 + .06 * var(--journey-progress,0)))!important;
  transform-origin:top center!important;
  visibility:visible!important;transition:none!important;
  pointer-events:auto!important;
}
#journey-end:not(.journey-ready) .journey-end-actions{pointer-events:none!important}
@media(prefers-reduced-motion:reduce){
 #journey-end .journey-teaser{opacity:0!important}
 #journey-end .journey-end-inner{opacity:1!important;transform:none!important}
 #journey-end .journey-end-actions{pointer-events:auto!important}
}

/* v1.18.18: actual compact flow, no absolute teaser, viewport spacer, or snap.
   This overrides legacy journey patches intentionally. */
#journey-end{height:auto!important;min-height:0!important;overflow:visible!important;position:relative!important;scroll-snap-align:none!important}
#journey-end .journey-teaser{
  position:relative!important;inset:auto!important;height:auto!important;min-height:70px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-direction:column!important;gap:4px!important;padding:18px 12px 10px!important;
  opacity:calc(1 - var(--journey-progress,0))!important;
  visibility:visible!important;transform:none!important;transition:none!important;
  pointer-events:none!important;
}
#journey-end .journey-teaser i{font-size:14px!important;line-height:1!important}
#journey-end .journey-teaser span{font-size:13px!important;line-height:1.4!important;font-weight:500!important}
#journey-end .journey-reveal-clip{height:auto!important;max-height:none!important;overflow:visible!important;display:block!important}
#journey-end .journey-end-inner{
  padding:12px 18px 38px!important;
  opacity:calc(.25 + .75 * var(--journey-progress,0))!important;
  transform:translateY(calc(16px * (1 - var(--journey-progress,0)))) scale(calc(.97 + .03 * var(--journey-progress,0)))!important;
  transform-origin:top center!important;visibility:visible!important;transition:none!important;
  pointer-events:auto!important;
}
#journey-end:not(.journey-ready) .journey-end-actions{pointer-events:auto!important}
@media(prefers-reduced-motion:reduce){
  #journey-end .journey-teaser{opacity:1!important}
  #journey-end .journey-end-inner{opacity:1!important;transform:none!important}
}

/* v1.18.19 — restore subtle directional cue without changing layout. */
@keyframes journey-teaser-chevron-nudge{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(4px)}
}
#journey-end .journey-teaser i.bi-chevron-double-down{
  display:inline-block;
  animation:journey-teaser-chevron-nudge 1.6s ease-in-out infinite;
  will-change:transform;
}
@media(prefers-reduced-motion:reduce){
  #journey-end .journey-teaser i.bi-chevron-double-down{animation:none!important;will-change:auto}
}

/* v1.18.21 — remove the large section-container backgrounds and borders.
   Preserve all individual Featured Work / Professional Projects card surfaces. */
#featured-work,
#professional-projects,
body.dark-mode #featured-work,
body.dark-mode #professional-projects,
body:not(.dark-mode) #featured-work,
body:not(.dark-mode) #professional-projects {
  background: transparent !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* v1.18.22 — remove only the contact details container surface.
   Keep the three icon circles, typography, layout and contact form intact. */
.contact .info,
body.dark-mode .contact .info,
body:not(.dark-mode) .contact .info {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* v1.18.25 — laptop hero tuning; navigation is consolidated in v1.18.30. */
@media (min-width: 992px) and (max-height: 850px) {
  #hero { padding-left: clamp(108px, 11vw, 155px); background-position: center center; }
  #hero .container { max-width: 1120px; }
  #hero h1 { font-size: clamp(42px, 4.5vw, 60px); line-height: 1.12; }
  #hero p { font-size: clamp(19px, 2vw, 25px); line-height: 1.5; }
  #hero p span { letter-spacing: .055em; }
  #hero .social-links { margin-top: 24px; }
  #hero .social-links a { font-size: 26px; margin-right: 18px; }
}
/* Keep foreground text readable while allowing the hero photograph to show. */
@media (min-width: 992px) {
  body:not(.dark-mode) #hero::before {
    background: linear-gradient(90deg, rgba(255,255,255,.76) 0%, rgba(255,255,255,.65) 52%, rgba(255,255,255,.53) 100%);
  }
}

/* v1.18.37 — v1.18.24 circle-to-pill navigation, compact desktop sizing.
   Ten navigation links must fit vertically without an internal header scrollbar.
   Retain the original 0.3s width expansion and original hover label behavior. */
@media (min-width: 992px) {
  #header {
    box-sizing: border-box;
    width: 224px;
    padding: 8px 10px;
    overflow: visible;
    pointer-events: none;
  }
  #header #navbar, #header .nav-menu,
  #header .nav-menu > ul, #header .nav-menu > ul > li {
    width: 204px;
    max-width: none;
    overflow: visible;
  }
  #header .nav-menu a, #header .nav-menu a:focus {
    --nav-circle: clamp(34px, calc((100vh - 56px) / 10 - 4px), 48px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--nav-circle);
    min-width: var(--nav-circle);
    height: var(--nav-circle);
    min-height: var(--nav-circle);
    padding: 0;
    margin-bottom: 4px;
    border-radius: 999px;
    overflow: hidden;
    pointer-events: auto;
    gap: 0;
    transition: width .3s ease, background-color .3s ease;
  }
  #header .nav-menu a i, #header .nav-menu a:focus i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    font-size: 20px;
    line-height: 1;
    margin: 0;
  }
  #header .nav-menu a span, #header .nav-menu a:focus span {
    display: none;
    padding: 0 5px 0 7px;
  }
  #header .nav-menu a:hover,
  #header .nav-menu li:hover > a,
  #header .nav-menu a:focus-visible {
    width: 204px;
    min-width: 204px;
    padding: 0 14px;
    justify-content: flex-start;
    gap: 0;
  }
  #header .nav-menu a:hover span,
  #header .nav-menu li:hover > a span,
  #header .nav-menu a:focus-visible span {
    display: block;
    white-space: nowrap;
    color: var(--color-on-primary);
    font-size: 13px;
  }
}
@media (min-width: 992px) and (hover: none) {
  #header .nav-menu a:hover,
  #header .nav-menu li:hover > a {
    width: var(--nav-circle);
    min-width: var(--nav-circle);
    padding: 0;
    justify-content: center;
  }
  #header .nav-menu a:hover span,
  #header .nav-menu li:hover > a span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #header .nav-menu a { transition: none !important; }
}

/* v1.18.36 — restore v1.18.24 hero image alignment on touch tablets.
   Overrides the v1.18.25 compact-laptop center alignment without changing
   desktop/laptop or phone styles. Portrait retains the original base rule. */
@media (min-width: 768px) and (max-width: 1366px) and (hover: none) {
  #hero { background-position: top right; }
}
