/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: "Geist", sans-serif;
  background-color: #040404;
  color: #fff;
  position: relative;
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  background-color:#1a1a1a;
  background-size: cover;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: -1;
}

@media (min-width: 1024px) {
  body::before {
    background-attachment: fixed;
  }
}

a {
  color: #ffffff;
  text-decoration: none;
}
p {
  color: #f1f1f1;
  text-decoration: none;
}
a:hover {
  color: #f1f1f1;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Geist", sans-serif;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  transition: ease-in-out 0.3s;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  z-index: 997;
  overflow-y: auto;
}

#header * {
  transition: ease-in-out 0.3s;
}

#header h1 {
  font-size: 5rem;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  font-family: "Geist", sans-serif;
  color: var(--accent);
}

#header h1 a, #header h1 a:hover {
  color: #fff;
  line-height: 1;
  display: inline-block;
}

#header h2 {
  font-size: 24px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.8);
}

#header h2 span {
  color: var(--accent);
  padding-bottom: 6px;
}

#header img {
  padding: 0;
  margin: 0;
}

#header .social-links {
  margin-top: 40px;
  display: flex;
}

#header .social-links a {
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  line-height: 1;
  margin-right: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease-in-out;
}

#header .social-links a:hover {
  background: var(--accent);
  color: #1a1a1a;
}

@media (max-width: 992px) {
  #header h1 {
    font-size: 36px;
  }
  #header h2 {
    font-size: 20px;
    line-height: 30px;
  }
  #header .social-links {
    margin-top: 15px;
  }
  #header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Header Top */
#header.header-top {
  height: 80px;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
}

#header.header-top .social-links,
#header.header-top h2,
#header.header-top .hero-cta {
  display: none;
}

#header.header-top h1 {
  margin-right: auto;
  font-size: 36px;
}

#header.header-top .container {
  display: flex;
  align-items: center;
}

#header.header-top .navbar {
  margin: 0;
}

@media (max-width: 768px) {
  #header.header-top {
    height: 60px;
  }
  #header.header-top h1 {
    font-size: 26px;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/**
* Desktop Navigation 
*/
.navbar {
  padding: 0;
  margin-top: 35px;
}

.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar li + li {
  margin-left: 30px;
}

.navbar a, .navbar a:focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  font-family: "Geist", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  transition: 0.3s;
}

.navbar a i, .navbar a:focus i {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
}

.navbar a:before {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  visibility: hidden;
  width: 0px;
  transition: all 0.3s ease-in-out 0s;
}

.navbar a:hover:before, .navbar li:hover > a:before, .navbar .active:before {
  visibility: visible;
  width: 25px;
}

.navbar a:hover, .navbar .active, .navbar .active:focus, .navbar li:hover > a {
  color: #fff;
}

/**
* Mobile Navigation 
*/
.mobile-nav-toggle {
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: none;
  line-height: 0;
  transition: 0.3s;
  position: fixed;
  right: 15px;
  top: 15px;
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }
  .navbar ul {
    display: none;
  }
}

@media (max-width: 576px) {
  .mobile-nav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .portfolio #portfolio-flters {
    flex-wrap: wrap;
    justify-content: center;
    padding: 2px 8px;
  }
  
  .portfolio #portfolio-flters li {
    padding: 6px 12px 8px 12px;
    font-size: 12px;
    margin: 0 2px 8px 2px;
  }
  
  .portfolio .portfolio-wrap .portfolio-info::before {
    width: 32px;
    height: 32px;
    top: 20px;
    left: 20px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
  }
  
  .portfolio .portfolio-wrap .portfolio-info::after {
    width: 32px;
    height: 32px;
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
  }
  
  .portfolio .portfolio-wrap:hover .portfolio-info::before {
    top: 10px;
    left: 10px;
  }
  
  .portfolio .portfolio-wrap:hover .portfolio-info::after {
    bottom: 10px;
    right: 10px;
  }
}

.navbar-mobile {
  position: fixed;
  overflow: hidden;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  transition: 0.3s;
  z-index: 999;
  margin-top: 0;
}

.navbar-mobile .mobile-nav-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
}

.navbar-mobile ul {
  display: block;
  position: absolute;
  top: 55px;
  right: 15px;
  bottom: 45px;
  left: 15px;
  padding: 10px 0;
  overflow-y: auto;
  transition: 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.navbar-mobile li {
  padding: 12px 20px;
}

.navbar-mobile li + li {
  margin: 0;
}

.navbar-mobile a {
  font-size: 16px;
  position: relative;
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
  overflow: hidden;
  position: absolute;
  width: 100%;
  top: 140px;
  bottom: 100%;
  opacity: 0;
  transition: ease-in-out 0.3s;
  z-index: 2;
  flex-direction: column;
}


section.section-show {
  top: 100px;
  bottom: auto;
  opacity: 1;
  padding-bottom: 45px;
}

section .container {
  background: rgba(0, 0, 0, 0.9);
  padding: 30px;
  margin-top: 30px;
  border-radius: 50px;
}

@media (max-width: 768px) {
  section {
    top: 120px;
  }
  section.section-show {
    top: 80px;
  }
}

.section-title h2 {
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  line-height: 1px;
  margin: 0 0 20px 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaaaaa;
  font-family: "Geist", sans-serif;
}

.section-title h2::after {
  content: "";
  width: 120px;
  height: 1px;
  display: inline-block;
  background: var(--accent);
  margin: 4px 10px;
}

.section-title p {
  margin: 0;
  margin: -15px 0 15px 0;
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: "Geist", sans-serif;
  color: #fff;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about-img {
  width: 100%;
  max-width: 400px; /* You can increase this to 400px or more */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  margin: 0 auto; /* centers the image horizontally */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* optional: adds depth */
}


.about-me .content h3 {
  font-weight: 700;
  font-size: 26px;
  color: #FFFFFF;
}

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

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

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

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

.about-me .content p:last-child {
  margin-bottom: 0;
}
#me {
  float: right;
  clear: right;
}
/*--------------------------------------------------------------
# Testimonials
--------------------------------------------------------------*/
.testimonials .testimonial-item {
  box-sizing: content-box;
  min-height: 320px;
}

.testimonials .testimonial-item .testimonial-img {
  width: 90px;
  border-radius: 50%;
  margin: -40px 0 0 40px;
  position: relative;
  z-index: 2;
  border: 6px solid rgba(255, 255, 255, 0.12);
}

.testimonials .testimonial-item h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 10px 0 5px 45px;
  color: #fff;
}

.testimonials .testimonial-item h4 {
  font-size: 14px;
  color: #999;
  margin: 0 0 0 45px;
}

.testimonials .testimonial-item .quote-icon-left, .testimonials .testimonial-item .quote-icon-right {
  color: rgba(255, 255, 255, 0.25);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 0;
  vertical-align: -0.38em;
}

.testimonials .testimonial-item .quote-icon-left {
  display: inline-block;
  left: -5px;
  position: relative;
}

.testimonials .testimonial-item .quote-icon-right {
  display: inline-block;
  right: -5px;
  position: relative;
  top: 10px;
}

.testimonials .testimonial-item p {
  font-style: italic;
  margin: 0 15px 0 15px;
  padding: 20px 20px 60px 20px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.testimonials .swiper-pagination {
  margin-top: 20px;
  position: relative;
}

.testimonials .swiper-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.3);
}

.testimonials .swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--accent);
}

/*--------------------------------------------------------------
# Resume
--------------------------------------------------------------*/
.resume .resume-title {
  font-size: 26px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 20px;
  color: #fff;
}

.resume .resume-item {
  padding: 0 0 20px 20px;
  margin-top: -2px;
  border-left: 0;
  position: relative;
}

.resume .resume-item::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.resume .resume-item h4 {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: "Geist", sans-serif;
  color: #ffffff;
  margin-bottom: 10px;
}

.resume .resume-item h5 {
  font-size: 16px;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 15px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 10px;
  border-radius: 10px;
}

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

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

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  left: -9px;
  top: 0;
  background: var(--accent);
  border: 2px solid var(--accent);
  z-index: 1;
}
.resume .resume-item:last-of-type {
  padding-bottom: 0;
}

.resume .resume-item:last-of-type::after {
  display: none;
}
.resume h6 {
  cursor: pointer;
  display: inline-block;
  padding: 8px 16px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 3px 10px 3px;
  transition: all 0.3s ease-in-out;
  border-radius: 25px;
  font-weight: bolder;
}
.resume h6:hover {
  background: var(--accent);
  color: #1a1a1a;
}


/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .icon-box {
  border-radius: 20px;
  text-align: center;
  background: rgba(204, 204, 204, 0.1);
  padding: 80px 20px;
  transition: all ease-in-out 0.3s;
}

.services .icon-box .icon {
  margin: 0 auto;
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 5px;
  transition: all .3s ease-out 0s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transform-style: preserve-3d;
}

.services .icon-box .icon i {
  color: #1a1a1a;
  font-size: 28px;
}

.services .icon-box .icon::before {
  position: absolute;
  content: '';
  left: -8px;
  top: -8px;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  transition: all .3s ease-out 0s;
  transform: translateZ(-1px);
}

.services .icon-box h4 {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 24px;
}

.services .icon-box h4 a {
  color: #fff;
}

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

.services .icon-box:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}

.services .icon-box:hover .icon {
  background: #1a1a1a;
}

.services .icon-box:hover .icon i {
  color: var(--accent);
}

.services .icon-box:hover .icon::before {
  background: #00b1a8;
}

.services .icon-box:hover h4 a, .services .icon-box:hover p {
  color: #1a1a1a;
}

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

.portfolio #portfolio-flters {
  padding: 0;
  margin: 0 auto 15px auto;
  list-style: none;
  text-align: center;
  border-radius: 50px;
  padding: 2px 15px;
}

.portfolio #portfolio-flters li {
  cursor: pointer;
  display: inline-block;
  padding: 8px 16px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 3px 10px 3px;
  transition: all 0.3s ease-in-out;
  border-radius: 4px;
  font-weight: bolder;
}

.portfolio #portfolio-flters li:hover, .portfolio #portfolio-flters li.filter-active {
  background: var(--accent);
  color:rgba(0, 0, 0, 0.6);
}

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

.portfolio .portfolio-wrap {
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
}

.portfolio .portfolio-wrap::before {
  content: "";
  background: rgba(0, 0, 0, 0.6);
  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 #fff;
  border-left: 3px solid #fff;
  transition: all 0.3s 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 #fff;
  border-right: 3px solid #fff;
  transition: all 0.3s ease 0s;
  z-index: 9994;
}

.portfolio .portfolio-wrap .portfolio-info h4 {
  font-size: 20px;
  color: #fff;
  font-weight: 600;
}

.portfolio .portfolio-wrap .portfolio-info p {
  color: #ffffff;
  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: #fff;
  margin: 0 2px;
  font-size: 28px;
  display: inline-block;
  transition: 0.3s;
}

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

.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;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
  border-radius: 25px;
  color: #1a1a1a;
  padding: 20px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
}

.contact .info-box i.info-icon {
  font-size: 24px;
  color: var(--accent);
  border-radius: 50%;
  padding: 14px;
  float: left;
  background: rgba(255, 255, 255, 0.1);
}

.contact .info-box h3 {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  margin: 10px 0 8px 68px;
}

.contact .info-box p {
  padding: 0;
  color: #fff;
  line-height: 24px;
  font-size: 14px;
  margin: 0 0 0 68px;
}

.contact .info-box .social-links {
  margin: 5px 0 0 68px;
  display: flex;
}

.contact .info-box .social-links a {
  font-size: 18px;
  display: inline-block;
  color: #fff;
  line-height: 1;
  margin-right: 12px;
  transition: 0.3s;
}

.contact .info-box .social-links a:hover {
  color: var(--accent);
}

.contact .php-email-form {
  border-radius: 25px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.08);
}

#status {
  width: 90%;
  max-width: 500px;
  text-align: center;
  padding: 10px;
  margin: 0 auto;
  border-radius: 8px;
}
#status.success {
  background-color: var(--accent);
  color:#1a1919;
  animation: status 4s ease forwards;
  font-weight: bolder;
}
#status.error {
  background-color: var(--accent);
  color: white;
  animation: status 4s ease forwards;
  font-weight: bolder;
}
@keyframes status {
  0% {
    opacity: 1;
    pointer-events: all;
  }
  90% {
    opacity: 1;
    pointer-events: all;
  }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

.contact .php-email-form .loading {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 15px;
}

.contact .php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent);
  border-top-color: #eee;
  -webkit-animation: animate-loading 1s linear infinite;
  animation: animate-loading 1s linear infinite;
}

.contact .php-email-form input, .contact .php-email-form textarea {
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  transition: 0.3s;
  color: #fff;
}

.contact .php-email-form input:focus, .contact .php-email-form textarea:focus {
  background-color: rgba(255, 255, 255, 0.11);
}

.contact .php-email-form input::-webkit-input-placeholder, .contact .php-email-form textarea::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input::-moz-placeholder, .contact .php-email-form textarea::-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input::placeholder, .contact .php-email-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input {
  padding: 10px 15px;
}

.contact .php-email-form textarea {
  padding: 12px 15px;
}

.contact .php-email-form button[type="submit"] {
  background: var(--accent);
  border: 0;
  padding: 10px 30px;
  color: #1a1a1a;
  transition: 0.3s;
  border-radius: 25px;
  font-weight: bolder;
}

.contact .php-email-form button[type="submit"]:hover {
  background: #1a1a1a;
  color: var(--accent);
  font-weight: bolder;
}

@-webkit-keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.mt-3 {
  margin-top: 1rem;
}

/*--------------------------------------------------------------
# Neumorphic (Soft UI) design system — dark & light
# Every surface shares the page background; depth comes from a
# paired highlight + shade shadow. Raised = interactive/resting,
# inset = pressed/active/input. No translucency, no backdrop blur.
--------------------------------------------------------------*/
:root {
  /* Monochrome: one grey ramp, no hue. Depth comes from hairlines, not shadows. */
  --bg: #0c0c0d;
  --bg-deep: #151517;
  --surface: #151517;
  --line: #2e2e32;
  --text-strong: #f1f1ef;
  --text-soft: #c9c9cd;
  --text-muted: #8d8d93;
  --accent: #f1f1ef;
  --accent-2: #c9c9cd;
  --accent-rgb: 241, 241, 239;
  --shadow-dark: rgba(0, 0, 0, 0.5);
  --shadow-light: rgba(255, 255, 255, 0.04);
  --radius: 14px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --nm-raised: 0 0 0 1px var(--line);
  --nm-raised-sm: 0 0 0 1px var(--line);
  --nm-inset: inset 0 0 0 1px var(--line);
  --nm-inset-sm: inset 0 0 0 1px var(--line);
}

body[data-theme="light"] {
  --bg: #f4f4f2;
  --bg-deep: #ebebe8;
  --surface: #ffffff;
  --line: #d6d6d2;
  --text-strong: #111113;
  --text-soft: #3a3a3e;
  --text-muted: #6a6a70;
  --accent: #111113;
  --accent-2: #3a3a3e;
  --accent-rgb: 17, 17, 19;
  --shadow-dark: rgba(17, 17, 19, 0.12);
  --shadow-light: rgba(255, 255, 255, 0.9);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-soft);
  text-rendering: optimizeLegibility;
  transition: background 0.35s ease, color 0.35s ease;
}

body[data-theme="light"] {
  color-scheme: light;
}

body[data-theme="dark"] {
  color-scheme: dark;
}

/* Legacy fixed backdrop layers — not needed on a flat surface */
body::before,
body::after {
  display: none;
}

::selection {
  background: rgba(var(--accent-rgb), 0.34);
  color: var(--text-strong);
}

a,
p,
li,
span {
  color: inherit;
}

a {
  color: var(--text-strong);
}

a:hover,
#header h2 a:hover {
  color: var(--accent);
}

/* Story link icon */
.career-story-link__icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #20242b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 2px 2px 5px var(--shadow-dark);
}

body[data-theme="light"] .career-story-link__icon {
  color: #ffffff;
}

/* Fixed story link */
.career-story-link {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-strong);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-family: "Geist", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: box-shadow 0.25s ease, color 0.25s ease, background 0.35s ease;
}

.career-story-link:hover,
.career-story-link:focus-visible {
  color: var(--accent);
}

@view-transition {
  navigation: auto;
}

/*--------------------------------------------------------------
# Header / hero
--------------------------------------------------------------*/
#header {
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding: 90px 0 70px;
}

#header .container {
  position: relative;
  max-width: 1120px;
  padding: 46px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

#header .container::before {
  content: "Business Systems  ·  Process Automation  ·  Internal Tools  ·  Navotas, PH";
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 24px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  font-family: "Geist", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

#header h1 {
  max-width: 900px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.95;
  color: var(--text-strong);
  font-family: "Geist Mono", "Geist", monospace;
  text-shadow: none;
}

#header h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 6px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
}

#header h2 {
  max-width: 850px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

#header h2 span,
#header h2 strong,
.about-me .content ul i,
.contact .info-box i.info-icon {
  color: var(--accent);
}

#header .text-secondary {
  color: var(--text-muted) !important;
}

#header .social-links a,
.contact .info-box .social-links a {
  border: none;
  color: var(--text-soft);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  transition: box-shadow 0.25s ease, color 0.25s ease, background 0.35s ease;
}

#header .social-links a:hover,
.contact .info-box .social-links a:hover {
  color: var(--accent);
  background: var(--bg);
  transform: none;
}

#header .social-links a:active,
.contact .info-box .social-links a:active {
  box-shadow: var(--nm-inset-sm);
}

/* Collapsed top bar */
#header.header-top {
  height: 82px;
  min-height: 0;
  padding: 0;
  border-bottom: none;
  background: var(--bg);
  box-shadow: 0 10px 26px var(--shadow-dark);
}

#header.header-top .container {
  max-width: 1180px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Leave room for the fixed story link when the header becomes a top nav. */
@media (min-width: 992px) {
  #header.header-top .container {
    padding-right: 160px;
  }
}

#header.header-top .container::before,
#header.header-top h1::after {
  display: none;
}

#header.header-top h1 {
  color: var(--text-strong);
}


/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/
.navbar {
  width: fit-content;
  padding: 8px;
  border: none;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.navbar:not(.navbar-mobile) li + li {
  margin-left: 4px;
}

.navbar a,
.navbar a:focus {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.25s ease, box-shadow 0.25s ease;
}

.navbar a:before {
  display: none;
}

.navbar a:hover,
.navbar li:hover > a {
  color: var(--text-strong);
  background: transparent;
}

.navbar .active,
.navbar .active:focus {
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
}

/* Collapsed top bar keeps its nav flat so the inset track doesn't
   fight the bar's own shadow */
#header.header-top .navbar {
  box-shadow: var(--nm-inset-sm);
}

.mobile-nav-toggle {
  color: var(--text-strong);
  z-index: 1002;
}

.navbar-mobile {
  background: rgba(15, 18, 24, 0.72);
}

body[data-theme="light"] .navbar-mobile {
  background: rgba(198, 208, 224, 0.72);
}

.navbar-mobile ul {
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
section.section-show {
  top: 104px;
  padding-bottom: 70px;
}

section .container,
.contact .php-email-form,
.contact .info-box,
.services .icon-box,
.portfolio .portfolio-wrap {
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

section .container {
  max-width: 1120px;
  padding: clamp(22px, 4vw, 42px);
  margin-top: 24px;
  border-radius: var(--radius-lg);
}

.section-title h2 {
  color: var(--text-muted);
}

.section-title h2::after {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title p {
  color: var(--text-strong);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  letter-spacing: 0;
  text-transform: none;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about-img {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--nm-raised);
  padding: 10px;
  background: var(--bg);
}

.about-me .content h3,
.resume .resume-title,
.services .icon-box h4,
.portfolio .portfolio-wrap .portfolio-info h4,
.contact .info-box p,
.testimonials .testimonial-item h3 {
  color: var(--text-strong);
}

.about-me .content p,
.resume .resume-item,
.services .icon-box p,
.testimonials .testimonial-item p {
  color: var(--text-soft);
  line-height: 1.75;
}

.about-me .content ul li {
  align-items: flex-start;
  padding: 12px 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--shadow-dark);
}

.about-me .content ul li:last-child {
  border-bottom: none;
}

.services .icon-box:hover,
.contact .info-box:hover {
  border-color: transparent;
  background: var(--bg);
  transform: translateY(-3px);
  box-shadow: 13px 13px 28px var(--shadow-dark), -13px -13px 28px var(--shadow-light);
}

.contact .info-box h3 {
  color: var(--text-strong);
  letter-spacing: 0;
}

/*--------------------------------------------------------------
# Testimonials
--------------------------------------------------------------*/
.testimonials .testimonial-item p {
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--nm-raised-sm);
}

.testimonials .testimonial-item .testimonial-img {
  border: 6px solid var(--bg);
  box-shadow: var(--nm-raised-sm);
}

.testimonials .testimonial-item h4 {
  color: var(--text-muted);
}

.testimonials .testimonial-item .quote-icon-left,
.testimonials .testimonial-item .quote-icon-right {
  color: rgba(var(--accent-rgb), 0.45);
}

.testimonials .swiper-pagination .swiper-pagination-bullet {
  background-color: var(--bg);
  box-shadow: var(--nm-inset-sm);
  opacity: 1;
}

.testimonials .swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--accent);
  box-shadow: none;
}

/*--------------------------------------------------------------
# Resume
--------------------------------------------------------------*/
.resume .resume-item::after {
  background: var(--shadow-dark);
}

.resume .resume-item::before {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--nm-raised-sm);
}

.resume .resume-item h4 {
  color: var(--text-strong);
  line-height: 1.35;
}

.resume .resume-item h5,
.resume h6,
.portfolio #portfolio-flters li {
  border: none;
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
}

.resume .resume-item h5 {
  box-shadow: var(--nm-inset-sm);
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 13px;
}

.resume h6:hover {
  color: var(--accent);
  background: var(--bg);
}

.resume h6:active {
  box-shadow: var(--nm-inset-sm);
}

/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .icon-box {
  padding: 34px 24px;
  text-align: left;
}

.services .icon-box .icon {
  margin: 0 0 22px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  transition: box-shadow 0.3s ease;
}

.services .icon-box .icon i {
  color: var(--accent);
  font-size: 28px;
}

.services .icon-box .icon::before {
  display: none;
}

.services .icon-box:hover .icon {
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
}

.services .icon-box:hover .icon i {
  color: var(--accent);
}

.services .icon-box h4 a {
  color: var(--text-strong);
}

.services .icon-box:hover h4 a,
.services .icon-box:hover p {
  color: var(--text-soft);
}

.services .icon-box:hover h4 a {
  color: var(--text-strong);
}

/*--------------------------------------------------------------
# Portfolio
--------------------------------------------------------------*/
.portfolio #portfolio-flters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  background: transparent;
}

.portfolio #portfolio-flters li {
  margin: 0;
  text-transform: none;
  transition: box-shadow 0.25s ease, color 0.25s ease;
}

.portfolio #portfolio-flters li:hover {
  color: var(--accent);
  background: var(--bg);
}

.portfolio #portfolio-flters li.filter-active {
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.portfolio .portfolio-wrap {
  overflow: hidden;
  padding: 12px;
}

.portfolio .portfolio-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 8px);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.portfolio .portfolio-wrap:hover {
  transform: translateY(-3px);
  box-shadow: 13px 13px 28px var(--shadow-dark), -13px -13px 28px var(--shadow-light);
}

.portfolio .portfolio-wrap:hover img {
  transform: scale(1.03);
}

.portfolio .portfolio-wrap::before {
  inset: 12px;
  border-radius: calc(var(--radius) - 8px);
  background: linear-gradient(180deg, rgba(24, 28, 35, 0.1), rgba(24, 28, 35, 0.88));
}

body[data-theme="light"] .portfolio .portfolio-wrap::before {
  background: linear-gradient(180deg, rgba(44, 55, 82, 0.06), rgba(44, 55, 82, 0.78));
}

.portfolio .portfolio-wrap .portfolio-info::before,
.portfolio .portfolio-wrap .portfolio-info::after {
  display: none;
}

.portfolio .portfolio-wrap .portfolio-info h4,
.portfolio .portfolio-wrap .portfolio-info p {
  color: #f2f5fa;
}

.portfolio .portfolio-wrap .portfolio-links a {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  color: #f2f5fa;
  background: rgba(24, 28, 35, 0.55);
  font-size: 18px;
}

.portfolio .portfolio-wrap .portfolio-links a:hover {
  color: #20242b;
  background: var(--accent);
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box i.info-icon {
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  transition: color 0.28s ease, box-shadow 0.28s ease;
}

.contact .info-box:hover i.info-icon {
  transform: none;
  background: var(--bg);
}

/* A fixed square keeps the icon well round: Bootstrap Icons (unlike the old
   Boxicons) leave the <i> at the text line-height, which stretched it tall. */
.contact .info-box i.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  line-height: 1;
}

.contact .info-box i.info-icon::before {
  vertical-align: 0;
}

.contact .info-box {
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.35s ease;
}

.contact .php-email-form input,
.contact .php-email-form textarea {
  border: none;
  border-radius: 12px;
  color: var(--text-strong);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  transition: box-shadow 0.25s ease, background 0.35s ease;
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  background: var(--bg);
  box-shadow: var(--nm-inset-sm), 0 0 0 2px rgba(var(--accent-rgb), 0.45);
  outline: none;
}

.contact .php-email-form input::placeholder,
.contact .php-email-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.contact .php-email-form input::-webkit-input-placeholder,
.contact .php-email-form textarea::-webkit-input-placeholder {
  color: var(--text-muted);
}

.contact .php-email-form input::-moz-placeholder,
.contact .php-email-form textarea::-moz-placeholder {
  color: var(--text-muted);
}

.contact .php-email-form .loading {
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  border-radius: 12px;
  color: var(--text-soft);
}

.contact .php-email-form button[type="submit"] {
  color: #20242b;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--nm-raised-sm);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

body[data-theme="light"] .contact .php-email-form button[type="submit"] {
  color: #ffffff;
}

.contact .php-email-form button[type="submit"]:hover {
  color: #20242b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: brightness(1.08);
  font-weight: bolder;
}

body[data-theme="light"] .contact .php-email-form button[type="submit"]:hover {
  color: #ffffff;
}

.contact .php-email-form button[type="submit"]:active {
  box-shadow: var(--nm-inset-sm);
}

#status.success,
#status.error {
  background: var(--accent);
  color: #20242b;
  box-shadow: var(--nm-raised-sm);
}

/*--------------------------------------------------------------
# Hero CTA buttons
--------------------------------------------------------------*/
.hero-headline {
  font-family: "Geist Mono", monospace;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
  max-width: 700px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-soft);
  max-width: 680px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #20242b !important;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--nm-raised-sm);
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}

body[data-theme="light"] .btn-cta-primary {
  color: #ffffff !important;
}

.btn-cta-primary:hover {
  filter: brightness(1.08);
}

.btn-cta-primary:active {
  box-shadow: var(--nm-inset-sm);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 30px;
  border-radius: 999px;
  border: none;
  background: var(--bg);
  color: var(--text-strong) !important;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--nm-raised-sm);
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.btn-cta-secondary:hover {
  color: var(--accent) !important;
  background: var(--bg);
  transform: none;
}

.btn-cta-secondary:active {
  box-shadow: var(--nm-inset-sm);
}

/*--------------------------------------------------------------
# Signature story
--------------------------------------------------------------*/
.signature-story {
  margin-bottom: 0;
}

.signature-story .story-panel {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
  overflow: hidden;
}

.signature-story .story-step {
  flex: 1;
  padding: 28px 24px;
  position: relative;
}

.signature-story .story-step:not(:last-child) {
  border-right: 1px solid var(--shadow-dark);
}

.signature-story .story-label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.signature-story .story-step p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0;
}

.signature-story .story-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: var(--accent);
  font-size: 20px;
  opacity: 0.7;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .signature-story .story-panel {
    flex-direction: column;
  }
  .signature-story .story-step:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--shadow-dark);
  }
  .signature-story .story-divider {
    display: none;
  }
}

/*--------------------------------------------------------------
# Toolbox
--------------------------------------------------------------*/
.toolbox-section {
  margin-top: 0;
}

.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.toolbox-category {
  border: none;
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.toolbox-category:hover {
  transform: translateY(-3px);
  box-shadow: var(--nm-raised);
}

.toolbox-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.toolbox-cat-header i {
  font-size: 16px;
}

.toolbox-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toolbox-items li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--shadow-dark);
  line-height: 1.5;
}

.toolbox-items li:last-child {
  border-bottom: none;
}

.toolbox-items li::before {
  content: "› ";
  color: var(--accent);
  font-weight: 700;
  font-family: "Geist Mono", monospace;
}

.toolbox-philosophy {
  padding: 16px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  font-size: 14px;
  color: var(--text-soft);
  font-style: italic;
}

@media (max-width: 768px) {
  .toolbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .toolbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*--------------------------------------------------------------
# Mono label & shared utilities
--------------------------------------------------------------*/
.mono-label {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.case-file-label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.case-key {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 5px;
}

.portfolio-sub {
  font-size: 12px;
  color: rgba(238, 242, 248, 0.75);
  margin: 4px 0 10px;
  font-style: italic;
}

/*--------------------------------------------------------------
# Contact availability block
--------------------------------------------------------------*/
.contact-availability {
  padding: 20px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  margin-bottom: 4px;
}

.availability-row {
  font-family: "Geist Mono", monospace;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avail-true {
  color: var(--text-strong);
  font-weight: 700;
}

body[data-theme="light"] .avail-true {
  color: var(--text-strong);
}

.availability-types {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.availability-types span {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  color: var(--text-soft);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-family: "Geist", sans-serif;
}

.availability-note {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
  font-style: italic;
}

/*--------------------------------------------------------------
# Digital contact actions
--------------------------------------------------------------*/
.contact-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-action {
  min-height: 44px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  color: var(--text-strong);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.contact-action:hover,
.contact-action:focus-visible {
  color: var(--accent);
}

.contact-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-action:active {
  box-shadow: var(--nm-inset-sm);
}

.contact-action-primary {
  color: #20242b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.contact-action-primary:hover,
.contact-action-primary:focus-visible {
  color: #20242b;
  filter: brightness(1.08);
}

body[data-theme="light"] .contact-action-primary,
body[data-theme="light"] .contact-action-primary:hover,
body[data-theme="light"] .contact-action-primary:focus-visible {
  color: #171a20;
}

body[data-theme="light"] .contact-action:focus-visible {
  outline-color: var(--accent);
}

/* Same layout as the Social / Email / Phone boxes: icon left, text beside it. */
.contact .digital-contact-box .contact-card-actions {
  margin: 16px 0 0 68px;
  justify-content: flex-start;
}

@media (max-width: 420px) {
  .contact-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-action {
    width: 100%;
  }
}

/*--------------------------------------------------------------
# Full-width case study cards (Production Systems)
--------------------------------------------------------------*/
.csf-card {
  display: flex;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.csf-card:hover {
  transform: translateY(-3px);
  box-shadow: 13px 13px 28px var(--shadow-dark), -13px -13px 28px var(--shadow-light);
}

.csf-accent-bar {
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.csf-content {
  flex: 1;
  padding: 28px 28px 24px;
}

.csf-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.csf-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  color: var(--accent);
  font-size: 22px;
  margin-top: 2px;
}

.csf-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 4px 0 10px;
  line-height: 1.3;
}

.system-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.45px;
  line-height: 1.35;
  text-transform: uppercase;
}

.portfolio-info .system-status {
  margin-top: 8px;
}

.csf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.csf-tags span {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  border: none;
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.csf-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.csf-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.csf-col .case-key {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.csf-col p {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 991px) {
  .csf-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .csf-header {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .csf-content {
    padding: 20px 18px;
  }
}

/* Image column layout */
.csf-card--has-image {
  min-height: 260px;
}

.csf-preview-col {
  width: 340px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.csf-preview-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
  transition: transform 0.4s ease;
}

.csf-card:hover .csf-preview-col img {
  transform: scale(1.03);
}

.csf-placeholder-label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 991px) {
  .csf-card--has-image {
    flex-direction: column;
  }

  .csf-preview-col {
    width: 100%;
    height: 200px;
  }
}

/*--------------------------------------------------------------
# Mobile navigation & touch targets
--------------------------------------------------------------*/
body.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-toggle {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  z-index: 1003;
  border: none;
  border-radius: 50%;
  color: var(--text-strong);
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-size: 24px;
  line-height: 1;
}

.mobile-nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Inline social glyphs (Threads / X are not in the bundled Bootstrap Icons font) */
.social-svg {
  width: 17px;
  height: 17px;
  display: block;
}

@media (max-width: 991px) {
  .career-story-link {
    top: 14px;
    right: 14px;
    padding: 8px 12px;
  }

  #header {
    padding: 86px 0 48px;
  }

  #header .container {
    align-items: flex-start;
    padding: 30px 22px;
  }

  /* Home card on phones/tablets: inset from the screen edges, content centred. */
  #header:not(.header-top) .container {
    width: calc(100% - 32px);
    margin: 0 auto;
    align-items: center;
    text-align: center;
  }

  #header:not(.header-top) .container::before {
    justify-content: center;
  }

  #header:not(.header-top) h1::after {
    margin-left: auto;
    margin-right: auto;
  }

  #header:not(.header-top) .hero-cta,
  #header:not(.header-top) .social-links {
    justify-content: center;
  }

  /* The nav pill is an empty capsule once its <ul> is hidden — the burger opens it now. */
  .navbar:not(.navbar-mobile) {
    display: none;
  }

  #header.header-top .container {
    align-items: center;
  }

  .navbar-mobile {
    width: auto;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(15, 18, 24, 0.72);
  }

  body[data-theme="light"] .navbar-mobile {
    background: rgba(198, 208, 224, 0.72);
  }

  .navbar-mobile ul {
    top: 72px;
    right: 14px;
    bottom: auto;
    left: 14px;
    max-height: calc(100vh - 96px);
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-mobile li {
    padding: 0;
  }

  .navbar-mobile a,
  .navbar-mobile a:focus {
    min-height: 52px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px;
  }

  .navbar-mobile .active,
  .navbar-mobile .active:focus {
    box-shadow: var(--nm-inset-sm);
    background: var(--bg);
  }
}

@media (max-width: 768px) {
  #header h1 {
    font-size: clamp(2.3rem, 13vw, 4rem);
  }

  #header .container::before {
    font-size: 11px;
    line-height: 1.35;
  }

  section.section-show {
    top: 78px;
  }

  section .container {
    margin-top: 16px;
  }

  .section-title p {
    margin-top: -8px;
  }

  .services .icon-box {
    padding: 26px 20px;
  }
}

/* Portfolio captions were revealed on :hover only, so on touch the card titles and
   their Zoom / Download / Visit buttons were unreachable. Show them by default. */
@media (hover: none), (max-width: 991px) {
  /* Always-on scrim has to carry the text over a busy screenshot, so it is
     stronger than the hover-reveal one it replaces. */
  .portfolio .portfolio-wrap::before {
    opacity: 1;
    background: linear-gradient(180deg, rgba(24, 28, 35, 0.12) 0%, rgba(24, 28, 35, 0.7) 42%, rgba(24, 28, 35, 0.94) 100%);
  }

  body[data-theme="light"] .portfolio .portfolio-wrap::before {
    background: linear-gradient(180deg, rgba(44, 55, 82, 0.12) 0%, rgba(44, 55, 82, 0.66) 42%, rgba(44, 55, 82, 0.92) 100%);
  }

  .portfolio .portfolio-wrap .portfolio-info {
    opacity: 1;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 24px;
  }

  .portfolio .portfolio-wrap .portfolio-info h4 {
    font-size: 17px;
    margin-bottom: 2px;
  }

  .portfolio .portfolio-wrap .portfolio-info .portfolio-sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: none;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .portfolio .portfolio-wrap .portfolio-links {
    display: flex;
    gap: 10px;
  }

  .portfolio .portfolio-wrap .portfolio-links a {
    width: 44px;
    height: 44px;
    margin: 0;
  }
}

@media (max-width: 991px) {
  /* Stacked case-study cards: the 4px accent rail has to become a top rule,
     otherwise it collapses to zero height as a column flex item. */
  .csf-card {
    flex-direction: column;
  }

  .csf-accent-bar {
    width: 100%;
    height: 4px;
  }
}

/*--------------------------------------------------------------
# KORA section — mascot profile, duties, timeline
--------------------------------------------------------------*/
.kora-intro {
  max-width: 760px;
  margin: -10px auto 34px;
  text-align: center;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}

.kora-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

/* Sprite stage --------------------------------------------- */
.kora-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 44px 20px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-inset);
  overflow: hidden;
}

.kora-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(var(--accent-rgb), 0.06) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.06) 1px, transparent 1px) 0 0 / 28px 100%;
  mask-image: radial-gradient(ellipse at 50% 70%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 70%, #000 30%, transparent 75%);
  pointer-events: none;
}

.kora-stage-label {
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.kora-stage-status {
  position: absolute;
  top: 16px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kora-stage-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-strong);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
  animation: kora-pulse 2.2s ease-in-out infinite;
}

@keyframes kora-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.06); }
}

.kora-bubble {
  position: relative;
  z-index: 1;
  max-width: 300px;
  min-height: 62px;
  margin: 26px 0 54px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-family: "Geist Mono", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-strong);
  text-align: center;
}

.kora-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--bg);
  box-shadow: 4px 4px 8px var(--shadow-dark);
}

.kora-bubble .kora-caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--accent);
  animation: kora-blink 1s steps(2) infinite;
}

@keyframes kora-blink { to { visibility: hidden; } }

.kora-sprite-wrap {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 139px;
  transform: scale(1.3);
  transform-origin: bottom center;
  margin-bottom: 30px;
}

.kora-sprite {
  width: 128px;
  height: 139px;
  background: url("../img/kora/kora-sprites.webp") 0 0 / 1024px 1112px no-repeat;
  filter: drop-shadow(0 14px 10px rgba(0, 0, 0, 0.35));
  animation: kora-idle 1.1s steps(6) infinite;
}

.kora-sprite-shadow {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 84px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 70%);
}

body[data-theme="light"] .kora-sprite-shadow {
  background: radial-gradient(ellipse, rgba(60, 76, 110, 0.4), transparent 70%);
}

/* Row offsets: idle 0 · waving -139 · jumping -278 · waiting -417 ·
   running -556 · review -695 · failed -834 · running-right -973 */
@keyframes kora-idle          { from { background-position: 0 0; }       to { background-position: -768px 0; } }
@keyframes kora-waving        { from { background-position: 0 -139px; }  to { background-position: -512px -139px; } }
@keyframes kora-jumping       { from { background-position: 0 -278px; }  to { background-position: -640px -278px; } }
@keyframes kora-waiting       { from { background-position: 0 -417px; }  to { background-position: -768px -417px; } }
@keyframes kora-running       { from { background-position: 0 -556px; }  to { background-position: -768px -556px; } }
@keyframes kora-review        { from { background-position: 0 -695px; }  to { background-position: -768px -695px; } }
@keyframes kora-failed        { from { background-position: 0 -834px; }  to { background-position: -1024px -834px; } }
@keyframes kora-running-right { from { background-position: 0 -973px; }  to { background-position: -1024px -973px; } }

.kora-sprite[data-state="waving"]        { animation: kora-waving 0.7s steps(4) infinite; }
.kora-sprite[data-state="jumping"]       { animation: kora-jumping 0.84s steps(5) infinite; }
.kora-sprite[data-state="waiting"]       { animation: kora-waiting 1.01s steps(6) infinite; }
.kora-sprite[data-state="running"]       { animation: kora-running 0.82s steps(6) infinite; }
.kora-sprite[data-state="review"]        { animation: kora-review 1.03s steps(6) infinite; }
.kora-sprite[data-state="failed"]        { animation: kora-failed 1.22s steps(8) infinite; }
.kora-sprite[data-state="running-right"] { animation: kora-running-right 1.06s steps(8) infinite; }

/* Greeting on hover while resting */
.kora-stage:hover .kora-sprite[data-state="idle"],
.csf-card:hover .kora-sprite-wrap--card .kora-sprite[data-state="idle"] {
  animation: kora-waving 0.7s steps(4) infinite;
}

.kora-states {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.kora-state-btn {
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  color: var(--text-soft);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.kora-state-btn:hover,
.kora-state-btn:focus-visible {
  color: var(--accent);
  outline: none;
}

.kora-state-btn.is-active {
  box-shadow: var(--nm-inset-sm);
  color: var(--accent);
}

/* Profile card ---------------------------------------------- */
.kora-profile {
  display: flex;
  flex-direction: column;
  padding: 28px 30px 26px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

.kora-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.kora-profile-name {
  font-family: "Geist", sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--text-strong);
  margin: 4px 0 6px;
}

.kora-profile-role {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}

.kora-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kora-profile-badges span {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.kora-profile-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-soft);
  margin: 0 0 20px;
}

.kora-json {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-deep);
  box-shadow: var(--nm-inset-sm);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-soft);
  overflow-x: auto;
  white-space: pre;
}

.kora-json .k { color: var(--accent); }
.kora-json .s { color: var(--text-strong); }
.kora-json .n { color: var(--text-soft); }
body[data-theme="light"] .kora-json .n { color: var(--text-soft); }

.kora-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
}

.kora-fact {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.kora-fact strong {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-strong);
}

.kora-fact span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Sub-headings ---------------------------------------------- */
.kora-subhead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 38px 0 18px;
}

.kora-subhead h3 {
  font-family: "Geist Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.kora-subhead p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Duty cards ------------------------------------------------- */
.kora-duties {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.kora-duty {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kora-duty:hover {
  transform: translateY(-3px);
  box-shadow: 13px 13px 28px var(--shadow-dark), -13px -13px 28px var(--shadow-light);
}

.kora-duty-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kora-duty-head i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  color: var(--accent);
  font-size: 19px;
  flex-shrink: 0;
}

.kora-duty-head h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
  line-height: 1.3;
}

.kora-duty-time {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.kora-duty p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.kora-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kora-cmds li {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  color: var(--text-strong);
  background: var(--bg-deep);
  box-shadow: var(--nm-inset-sm);
}

/* Guardrails ------------------------------------------------- */
.kora-guardrails {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin: 0;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-inset);
  list-style: none;
}

.kora-guardrails li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-soft);
}

.kora-guardrails li::before {
  content: "\F26B";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-size: 15px;
}

.kora-guardrails strong {
  color: var(--text-strong);
}

/* Timeline --------------------------------------------------- */
.kora-timeline {
  position: relative;
  margin: 0;
  padding: 6px 0 0 26px;
  list-style: none;
}

.kora-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.15));
}

.kora-timeline li {
  position: relative;
  padding: 0 0 18px;
}

.kora-timeline li::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm), 0 0 0 2px var(--accent);
}

.kora-timeline time {
  display: inline-block;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
}

.kora-timeline strong {
  color: var(--text-strong);
  font-size: 14px;
}

.kora-timeline p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-soft);
}

.kora-two-col {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 991px) {
  .kora-hero,
  .kora-two-col {
    grid-template-columns: 1fr;
  }

  .kora-duties {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .kora-duties,
  .kora-guardrails,
  .kora-facts {
    grid-template-columns: 1fr;
  }

  .kora-profile {
    padding: 22px 18px;
  }

  .kora-profile-name {
    font-size: 28px;
  }

  .kora-sprite-wrap {
    transform: scale(1.1);
  }
}

/*--------------------------------------------------------------
# System leaps changelog + module map (Work section)
--------------------------------------------------------------*/
.leaps-wrap {
  margin: 8px 0 34px;
  padding: 26px 28px 22px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

.leaps-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.leaps-head h3 {
  font-family: "Geist Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.leaps-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.leaps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaps-grid li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.leaps-grid time {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 2px;
}

.leaps-grid strong {
  color: var(--text-strong);
}

.leap-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  vertical-align: 2px;
}

.module-map {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.module-map li {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--bg-deep);
  box-shadow: var(--nm-inset-sm);
}

.csf-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.csf-metric {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

.csf-metric strong {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 18px;
  line-height: 1.1;
  color: var(--text-strong);
}

.csf-metric span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted);
}

.csf-preview-col--kora {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  margin: 12px 0 12px 12px;
  border-radius: calc(var(--radius) - 8px);
}

.kora-sprite-wrap--card {
  transform: scale(1.35);
  margin: 0 0 34px;
}

.csf-preview-col--kora img {
  width: auto;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s ease;
}

.csf-preview-col--kora .csf-placeholder-label {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
}

.csf-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.csf-footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .leaps-grid {
    grid-template-columns: 1fr;
  }

  .csf-preview-col--kora {
    margin: 12px 12px 0 12px;
    height: 220px;
  }
}

@media (max-width: 767px) {
  .leaps-wrap {
    padding: 20px 18px;
  }

  .leaps-grid li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Grid items must be allowed to shrink below their content (pre/svg) */
.kora-hero > *,
.kora-two-col > *,
.jhon-layout > *,
.kora-profile,
.kora-json,
.jhon-chat,
.jhon-log,
.jhon-bubble {
  min-width: 0;
}

.jhon-bubble {
  overflow-wrap: anywhere;
}

/* KORA flowcharts ---------------------------------------------- */
.kora-flows {
  padding: 22px 22px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

.kora-flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.kora-flow-tab {
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  color: var(--text-soft);
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.kora-flow-tab:hover,
.kora-flow-tab:focus-visible {
  color: var(--accent);
  outline: none;
}

.kora-flow-tab.is-active {
  box-shadow: var(--nm-inset-sm);
  color: var(--accent);
}

.kora-flow-panel {
  padding: 16px 14px 10px;
  border-radius: 14px;
  background: var(--bg-deep);
  box-shadow: var(--nm-inset-sm);
  overflow-x: auto;
}

.kora-flow-caption {
  margin: 0 0 10px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.fc-svg {
  display: block;
  width: 100%;
  max-width: 700px;
  min-width: 560px;
  height: auto;
  margin: 0 auto;
  font-family: "Geist", sans-serif;
}

.fc-node {
  fill: var(--bg);
  stroke: var(--text-muted);
  stroke-width: 1.4;
}

.fc-decision {
  stroke: var(--accent);
  stroke-width: 1.6;
}

.fc-pill {
  fill: rgba(var(--accent-rgb), 0.14);
  stroke: var(--accent);
}

.fc-io {
  stroke: var(--text-soft);
}

body[data-theme="light"] .fc-io {
  stroke: var(--text-soft);
}

.fc-data,
.fc-node-line {
  stroke: var(--text-strong);
  fill: var(--bg);
}

.fc-node-line {
  fill: none;
}

.fc-doc,
.fc-manual {
  stroke: var(--text-soft);
  stroke-dasharray: 4 3;
}

.fc-label {
  fill: var(--text-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.fc-sub {
  fill: var(--text-muted);
  font-size: 10.5px;
  font-family: "Geist Mono", monospace;
}

.fc-edge {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.fc-arrowhead {
  fill: var(--text-muted);
}

.fc-edge-label-bg {
  fill: var(--bg-deep);
}

.fc-edge-label {
  fill: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
}

.kora-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}

.kora-flow-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kora-flow-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border: 1.5px solid var(--text-muted);
  border-radius: 2px;
}

.kora-flow-legend i.lg-decision {
  border-color: var(--accent);
  transform: rotate(45deg) scale(0.8);
}

.kora-flow-legend i.lg-io {
  border-color: var(--text-soft);
  transform: skewX(-16deg);
}

.kora-flow-legend i.lg-data {
  border-color: var(--text-strong);
  border-radius: 50% / 40%;
}

.kora-flow-legend i.lg-pill {
  border-color: var(--accent);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
}

.kora-flow-legend i.lg-doc {
  border-style: dashed;
}

@media (max-width: 767px) {
  .kora-flows {
    padding: 16px 12px 12px;
  }
}

/*--------------------------------------------------------------
# JHON — visitor chat interface
--------------------------------------------------------------*/
.jhon-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

.jhon-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.jhon-card {
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
}

.jhon-portrait {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 16px;
  border-radius: 34px;
  background: var(--bg);
  box-shadow: var(--nm-inset);
  font-family: "Geist", sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  position: relative;
}

.jhon-portrait img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

body[data-theme="light"] .jhon-portrait img {
  filter: invert(1) brightness(0.25) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.6));
}

.jhon-avatar img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  /* white source mark rendered as near-black on the amber badge */
  filter: invert(1) brightness(0.2);
}

.jhon-portrait::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-strong);
  box-shadow: 0 0 0 3px var(--bg);
}

.jhon-card h3 {
  font-family: "Geist", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  color: var(--text-strong);
  margin: 0 0 4px;
}

.jhon-card .jhon-expansion {
  display: block;
  text-align: center;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 14px;
}

.jhon-card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0;
}

.jhon-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jhon-rules li {
  position: relative;
  padding-left: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.jhon-rules li::before {
  content: "\F26B";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
}

.jhon-chat {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--nm-raised);
  overflow: hidden;
}

.jhon-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
}

.jhon-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.jhon-chat-title i {
  font-size: 16px;
}

.jhon-engine {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}

.jhon-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  max-height: 520px;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: var(--bg-deep);
  box-shadow: var(--nm-inset-sm);
}

.jhon-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 86%;
}

.jhon-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.jhon-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #20242b;
  font-family: "Geist", sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 2px 2px 5px var(--shadow-dark);
}

.jhon-bubble {
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}

.jhon-msg--user .jhon-bubble {
  border-radius: 16px 16px 4px 16px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-strong);
  box-shadow: none;
}

.jhon-bubble p {
  margin: 0;
}

.jhon-bubble p + p {
  margin-top: 8px;
}

.jhon-bubble strong {
  color: var(--text-strong);
}

.jhon-meta {
  display: block;
  margin-top: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
}

.jhon-typing .jhon-bubble {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
}

.jhon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: jhon-dot 1s ease-in-out infinite;
}

.jhon-dot:nth-child(2) { animation-delay: 0.15s; }
.jhon-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes jhon-dot {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.jhon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 22px 0;
}

.jhon-chip {
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.jhon-chip:hover,
.jhon-chip:focus-visible {
  color: var(--accent);
  outline: none;
}

.jhon-chip:active {
  box-shadow: var(--nm-inset-sm);
}

.jhon-form {
  display: flex;
  gap: 10px;
  padding: 14px 22px 20px;
}

.jhon-input {
  flex: 1;
  min-height: 46px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
  color: var(--text-strong);
  font-family: "Geist", sans-serif;
  font-size: 14px;
}

.jhon-input:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.45);
  outline-offset: 1px;
}

.jhon-input::placeholder {
  color: var(--text-muted);
}

.jhon-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #20242b;
  font-family: "Geist", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--nm-raised-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.jhon-send:hover {
  transform: translateY(-1px);
}

.jhon-send:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.jhon-note {
  padding: 0 22px 16px;
  margin: 0;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* KORA block lives inside the Work section */
.kora-block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.14);
}

@media (max-width: 991px) {
  .jhon-layout {
    grid-template-columns: 1fr;
  }

  .jhon-side {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .jhon-side .jhon-card {
    flex: 1 1 260px;
  }
}

@media (max-width: 767px) {
  .jhon-log {
    padding: 16px 14px;
    max-height: 440px;
  }

  .jhon-msg {
    max-width: 94%;
  }

  .jhon-chips,
  .jhon-form,
  .jhon-chat-head {
    padding-left: 14px;
    padding-right: 14px;
  }

  .jhon-send span {
    display: none;
  }
}

/* Collapsed header on desktop: the name stays on one line and scales down
   with the window so it never crowds the navbar. */
@media (min-width: 992px) {
  #header.header-top h1 {
    font-size: clamp(18px, 1.6vw, 28px);
    line-height: 1.2;
    white-space: nowrap;
  }
}

/* Small desktops: tighten the nav and the room kept for the theme toggle
   so name + navbar still fit on one row. */
@media (min-width: 992px) and (max-width: 1199px) {
  #header.header-top .container {
    padding-right: 140px;
  }

  #header.header-top .navbar a,
  #header.header-top .navbar a:focus {
    padding: 10px 11px;
  }
}

/* Collapsed header on phones: keep the name clear of the fixed toggle buttons */
@media (max-width: 991px) {
  #header.header-top h1 {
    font-size: 22px;
    line-height: 1.2;
    padding-right: 132px;
  }
}

@media (max-width: 420px) {
  #header.header-top h1 {
    font-size: 19px;
  }
}

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


/*--------------------------------------------------------------
# Scroll reveal and metric count-up (assets/js/fx.js)
--------------------------------------------------------------*/

/* Scroll reveal. The class is added by JS only to elements that are still
   below the fold, so nothing visible at load ever starts hidden. */
.fx-reveal {
  opacity: 0;
  transform: translateY(22px);
  will-change: opacity, transform;
}

.fx-reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reading progress under the collapsed top bar. */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
}

#header.header-top .read-progress {
  opacity: 0.85;
}

/* Counting numbers: lock the glyph width so the card does not reflow while
   the value climbs. */
.csf-metric > strong.is-counting,
.kora-fact > strong.is-counting {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* The newest KORA duty gets a marker so the addition is findable. */
.kora-duty--feature {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.kora-duty-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "Geist Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #10131a;
  background: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .fx-reveal,
  .fx-reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/*--------------------------------------------------------------
# Case-study disclosure — lead line, toggle, collapsible detail
--------------------------------------------------------------*/

/* One sentence that has to carry the card on its own, because the three
   detail columns are folded away until asked for. */
.csf-lead {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-soft);
}

.csf-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  color: var(--text-soft);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.csf-toggle:hover,
.csf-toggle:focus-visible {
  color: var(--accent);
}

.csf-toggle i {
  font-size: 13px;
  transition: transform 0.25s ease;
}

.csf-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.csf-toggle[aria-expanded="true"] {
  box-shadow: var(--nm-inset-sm);
}

/* Collapse only when JS can reopen it. Without .has-js the detail simply
   stays in the page, fully readable. */
.has-js .csf-detail {
  display: none;
}

.has-js .csf-detail.is-open {
  display: block;
  animation: csf-unfold 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes csf-unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.csf-detail .csf-body {
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .has-js .csf-detail.is-open { animation: none; }
  .csf-toggle i { transition: none; }
}


/* Contact: the section listed details but never made an ask. */
.contact-cta {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.contact-cta-lead {
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-soft);
}

.contact-cta-lead strong {
  color: var(--text-strong);
}

.contact-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.info-box p a:not(.contact-action) {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.info-box p a:not(.contact-action):hover,
.info-box p a:not(.contact-action):focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* The KORA deep dive and the older releases fold away by default; both reuse
   the case-study toggle so there is one disclosure pattern on the page. */
.kora-deep-toggle,
.leaps-toggle {
  display: flex;
  margin: 4px auto 0;
}

.has-js .leaps-grid .leap-extra {
  display: none;
}

/* Same two-column grid (date | text) as the always-visible entries. */
.has-js .leaps-wrap.is-open .leap-extra {
  display: grid;
}

/*--------------------------------------------------------------
# Smooth scroll (Lenis) + section-change curtain — assets/js/motion.js
--------------------------------------------------------------*/
html.lenis,
html.lenis body {
  height: auto;
}

/* Lenis does the easing; native smooth scroll would fight it. */
html.lenis {
  scroll-behavior: auto;
}

.lenis.lenis-stopped {
  overflow: clip;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* While main.js swaps sections, skip the header collapse and section
   fade so motion.js can measure the final layout and animate to it. */
html.is-swapping #header,
html.is-swapping #header *,
html.is-swapping section {
  transition: none !important;
}

/* A sideways slide briefly puts two sections side by side. */
html.is-sliding,
html.is-sliding body {
  overflow-x: clip;
}

section.section-leaving {
  pointer-events: none;
}

/* Flow diagrams for systems with no screen of their own: full card width. */
.csf-diagram {
  display: block;
  width: 100%;
  height: auto;
  margin: 4px 0 18px;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: var(--nm-inset-sm);
}

/* Active-tab pill: one raised chip that glides between nav links.
   Desktop only: the mobile menu's list must stay absolutely positioned. */
.navbar:not(.navbar-mobile) ul {
  position: relative;
}

.navbar a {
  z-index: 1;
}

.nav-pill {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--nm-raised-sm);
  pointer-events: none;
}

.navbar.has-pill .active,
.navbar.has-pill .active:focus {
  background: transparent;
  box-shadow: none;
}

/* The mobile menu keeps its own pressed-in active row. */
.navbar-mobile .nav-pill {
  display: none;
}

.navbar-mobile.has-pill .active,
.navbar-mobile.has-pill .active:focus {
  background: var(--bg);
  box-shadow: var(--nm-inset-sm);
}

/* Show-more folds (About bio, Career Log) and the "More projects" button.
   They reuse the case-study toggle; these only set spacing. */
.more-toggle {
  margin-top: 4px;
}

.more-detail > p:first-child,
.more-detail > ul:first-child {
  margin-top: 16px;
}

.more-projects-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 32px;
}

/*--------------------------------------------------------------
# Intro video dialog
--------------------------------------------------------------*/
.btn-cta-play {
  gap: 6px;
  cursor: pointer;
}

.btn-cta-play .bi {
  color: var(--accent);
  font-size: 16px;
}

.intro-dialog {
  padding: 0;
  border: none;
  border-radius: 16px;
  background: #20242b;
  overflow: visible;
  width: min(calc(92 * var(--vw)), calc(86 * var(--vh) * 9 / 16));
}

.intro-dialog::backdrop {
  background: rgba(10, 12, 15, 0.82);
}

.intro-dialog video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.intro-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #20242b;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
}

@media (max-width: 575px) {
  .intro-close {
    top: 8px;
    right: 8px;
  }
}

/*--------------------------------------------------------------
# Monochrome redesign (2026-10): foldable hero, card build, colour + sound switches
--------------------------------------------------------------*/
:root {
  --bar-h: 72px;
  --coal: #151517;
}

/* ── Top bar: always a bar, JWD mark on the left, the nav beside it ── */
#header.header-top {
  height: var(--bar-h);
  background: var(--bg);
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

#header.header-top .container {
  max-width: 1240px;
}

.bar-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  margin-right: auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-strong);
  font: 600 12px/1 "Geist", sans-serif;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.bar-mark:hover,
.bar-mark:focus-visible {
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--text-muted);
}

/* ── Landing: pinned stage, the card unfolds as you scroll ── */
body:not(.is-home) #hero {
  display: none;
}

.hero-track {
  position: relative;
}

.hero-stage {
  position: sticky;
  top: var(--bar-h);
  height: calc(100 * var(--vh) - var(--bar-h));
  display: grid;
  place-items: center;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  overflow: hidden;
}

.fold {
  /* --e turns the leaf on its hinge; --m settles the whole card (slide + tilt).
     They run one after the other, so the hinge stays put while the leaf swings. */
  --e: 0;
  --m: 0;
  perspective: 1800px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.dev {
  position: relative;
  width: min(1080px, 100%, calc((100 * var(--vh) - var(--bar-h) - 48px) * 16 / 9.4));
  aspect-ratio: 16 / 9.4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform-style: preserve-3d;
  transform:
    translateX(calc((1 - var(--m)) * -25%))
    rotateX(calc((1 - var(--m)) * 9deg))
    rotateY(calc((1 - var(--m)) * -14deg))
    scale(calc(0.86 + var(--m) * 0.14));
}

.dev::before {
  content: "";
  position: absolute;
  inset: 8% 6% -6%;
  z-index: -1;
  background: #000;
  filter: blur(40px);
  opacity: 0.55;
  transform: translateZ(-60px);
}

.half,
.face {
  position: relative;
  overflow: hidden;
  background: var(--coal);
  border: 1px solid var(--line);
}

.half {
  grid-column: 2;
  grid-row: 1;
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.leaf {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: right center;
  transform: rotateY(calc((1 - var(--e)) * 180deg));
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.face.in {
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.face.out {
  transform: rotateY(180deg);
  border-radius: 0 var(--radius) var(--radius) 0;
}


/* The inner panels sit in shadow until the card opens. */
.half::after,
.face.in::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: calc((1 - var(--e)) * 0.7);
  pointer-events: none;
}

.hinge {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateZ(1px);
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.13) 20%, rgba(255, 255, 255, 0.06) 80%, transparent);
  opacity: var(--e);
  pointer-events: none;
}

.copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 4.5%, 44px);
}

.copy h1.name {
  margin: 0;
  color: var(--text-muted);
  font: 400 12px/1.4 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.copy .hero-headline {
  max-width: none;
  margin: 14px 0 0;
  color: var(--text-strong);
  font: 600 clamp(24px, 4.2vw, 52px)/1.05 "Geist", sans-serif;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.copy .sub {
  max-width: 34ch;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1.6;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-mono {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-strong);
  font: 500 14px/1 "Geist", sans-serif;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background 200ms var(--ease-out);
}

.btn-mono.primary {
  border-color: var(--text-strong);
  background: var(--text-strong);
  color: var(--bg);
}

.btn-mono:hover,
.btn-mono:focus-visible {
  color: var(--text-strong);
}

.btn-mono.primary:hover,
.btn-mono.primary:focus-visible {
  color: var(--bg);
}

.btn-mono:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  .btn-mono:not(.primary):hover {
    background: #232326;
  }
}

/* White panel with the backlit portrait; padding keeps clear air above the hair. */
.portrait {
  position: absolute;
  inset: 0;
  padding: 7% 0 0 4%;
  background: #fefefe;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 0;
}

.cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 6%, 40px);
  background: linear-gradient(160deg, #1c1c1f, #0f0f10);
}

.cover-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-strong);
  font: 600 14px/1 "Geist", sans-serif;
}

.cover-name {
  display: block;
  color: var(--text-strong);
  font: 600 clamp(22px, 3.2vw, 38px)/1.05 "Geist", sans-serif;
  letter-spacing: -0.03em;
}

.cover-role {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Phones: the hinge turns horizontal and the card opens top-down. */
@media (max-width: 720px) {
  .dev {
    width: min(400px, 100%, calc((100 * var(--vh) - var(--bar-h) - 48px) * 9 / 15));
    aspect-ratio: 9 / 15;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    transform:
      translateY(calc((1 - var(--m)) * -25%))
      rotateX(calc((1 - var(--m)) * -10deg))
      scale(calc(0.9 + var(--m) * 0.1));
  }

  .half {
    grid-column: 1;
    grid-row: 2;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .leaf {
    grid-column: 1;
    grid-row: 1;
    transform-origin: center bottom;
    transform: rotateX(calc((1 - var(--e)) * -180deg));
  }

  .face.in {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .face.out {
    transform: rotateX(180deg);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .hinge {
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13) 20%, rgba(255, 255, 255, 0.06) 80%, transparent);
  }

  .copy .hero-headline {
    font-size: 26px;
  }

  .copy .sub {
    margin-top: 8px;
    font-size: 13px;
  }

  .btn-mono {
    padding: 10px 14px;
    font-size: 13px;
  }

  .portrait {
    padding: 6% 0 0;
  }

  .portrait img {
    object-position: 60% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fold {
    --e: 1 !important;
    --m: 1 !important;
  }

  .hero-track {
    height: auto;
  }

  .hero-stage {
    position: static;
    height: auto;
    min-height: calc(100 * var(--vh) - var(--bar-h));
  }
}

/* ── Sections: open layout on the page, no boxed cards around each one ── */
section > .container {
  max-width: 1120px;
  background: transparent;
  box-shadow: none;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}

.section-title h2 {
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--text-muted);
  font: 400 12px/1.4 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: none;
}

.section-title h2::after {
  display: none;
}

.section-title p {
  margin: 0 0 28px;
  color: var(--text-strong);
  font: 600 clamp(30px, 4.4vw, 52px)/1.05 "Geist", sans-serif;
  letter-spacing: -0.03em;
  text-transform: none;
  text-wrap: balance;
}

/* Systems tiles: plain surfaces that lift toward you on hover. */
.services .icon-box {
  background: var(--coal);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.6s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

@media (hover: hover) {
  .services .icon-box:hover {
    transform: perspective(900px) translateZ(22px);
    box-shadow: 0 0 0 1px #4a4a50;
  }
}

/* ── Projects: screenshot-led cards, big number up top, title at the foot ── */
.viewbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--text-muted);
  font: 400 12px/1 "Geist Mono", ui-monospace, monospace;
}

.portfolio-container > .portfolio-item {
  margin-bottom: 28px;
}

.csf-card--has-image {
  flex-direction: column;
  height: 100%;
  background: var(--coal);
  box-shadow: 0 0 0 1px var(--line);
}

.csf-card--has-image .csf-preview-col {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7.4;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.col-lg-6 > .csf-card--has-image .csf-preview-col {
  aspect-ratio: 4 / 3;
}

.csf-card--has-image .csf-preview-col::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.06) 25%, rgba(12, 12, 13, 0.9) 88%);
  pointer-events: none;
}

.csf-preview-col--kora {
  background: var(--bg);
}

.csf-banner {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.csf-banner-num {
  position: absolute;
  top: clamp(12px, 3%, 24px);
  right: clamp(14px, 4%, 30px);
  color: var(--text-strong);
  font: 600 clamp(44px, 7vw, 92px)/1 "Geist", sans-serif;
  letter-spacing: -0.05em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.csf-banner-num span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font: 400 12px/1.3 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.csf-banner-title {
  position: absolute;
  left: clamp(16px, 4%, 32px);
  right: clamp(16px, 4%, 32px);
  bottom: clamp(14px, 4%, 28px);
  max-width: 24ch;
  color: var(--text-strong);
  font: 600 clamp(22px, 2.6vw, 34px)/1.1 "Geist", sans-serif;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* The banner carries the title now; the text block keeps the facts. */
.csf-card.has-banner .csf-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.csf-card--has-image .csf-icon-wrap {
  display: none;
}

@media (max-width: 991px) {
  .csf-card--has-image .csf-preview-col,
  .col-lg-6 > .csf-card--has-image .csf-preview-col {
    height: auto;
    aspect-ratio: 4 / 3.3;
  }
}

/* Project cards: built from mini black boxes, merged, then a black wipe. */
.csf-card {
  position: relative;
}

.mono-tiles {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  pointer-events: none;
}

.mono-tiles i {
  background: #1c1c1f;
  border: 1px solid #45454c;
  border-radius: 4px;
  transform: scale(0);
}

.csf-card.mono-pre {
  background: transparent;
  box-shadow: none;
}

.csf-card.mono-pre > :not(.mono-tiles) {
  visibility: hidden;
}

.mono-wb {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 130%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 23%);
  transform: translateX(100%);
}

/* Hover: a dolly in. The card comes forward and the screenshot zooms past the text. */
@media (hover: hover) {
  .csf-card {
    transition: transform 0.7s var(--ease-out), box-shadow 0.3s var(--ease-out);
  }

  .csf-card:hover {
    transform: perspective(1200px) translateZ(16px);
    box-shadow: 0 0 0 1px #4a4a50;
  }

  .csf-preview-col img {
    transition: transform 0.9s var(--ease-out), filter 0.4s var(--ease-out);
  }

  .csf-card:hover .csf-preview-col img {
    transform: scale(1.1);
  }
}

/* Project screenshots are monochrome until a visitor asks for colour.
   Photos of people keep their colour. */
#portfolio img,
.kora-sprite {
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.4s var(--ease-out);
}

body.show-colour #portfolio img,
body.show-colour .kora-sprite {
  filter: none;
}

.mono-switches {
  position: fixed;
  z-index: 1002;
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex;
  gap: 8px;
}

.mono-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--text-muted);
  font: 500 12px/1 "Geist Mono", ui-monospace, monospace;
  cursor: pointer;
  transition: color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.mono-switch::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px currentColor;
}

.mono-switch[aria-pressed="true"] {
  color: var(--text-strong);
  box-shadow: 0 0 0 1px var(--text-muted);
}

.mono-switch[aria-pressed="true"]::before {
  background: currentColor;
}

.mono-switch:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .csf-card,
  .csf-card:hover {
    transform: none;
  }
}

.csf-accent-bar {
  background: var(--line) !important;
  box-shadow: none !important;
}

/* Sound is a speaker icon: waves when on, an X when muted. */
.mono-icon {
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  font-size: 17px;
}

.mono-icon::before {
  display: none;
}

/* Colour is a split disc: half black, half white; it turns into a colour wheel when on. */
.colour-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f1f1ef 50%, #0c0c0d 50%);
  box-shadow: 0 0 0 1.5px #f1f1ef;
}

.colour-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#ff5f57, #febc2e, #28c840, #2aa3ff, #a259ff, #ff5f57);
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
}

#colour-switch[aria-pressed="true"] .colour-dot::after {
  opacity: 1;
  transform: none;
}

/* Touch screens have no hover, so there is nothing for the tick to play on. */
@media (hover: none) {
  #sound-switch {
    display: none;
  }
}

/* Light screenshots under white type: dim them and shade the top for the number. */
#portfolio .csf-card--has-image .csf-preview-col img {
  filter: grayscale(1) contrast(1.05) brightness(0.42);
}

body.show-colour #portfolio .csf-card--has-image .csf-preview-col img {
  filter: brightness(0.42);
}

.csf-card--has-image .csf-preview-col::after {
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.7) 0%, rgba(12, 12, 13, 0.1) 32%, rgba(12, 12, 13, 0.2) 55%, rgba(12, 12, 13, 0.92) 92%);
}

/* Cleaner case files: the banner already shows the first number and the title. */
.has-banner .csf-metric:first-child,
.has-banner .case-file-label {
  display: none;
}

.csf-tags {
  gap: 4px 14px;
}

.csf-tags span {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text-muted);
  font: 400 12px/1.6 "Geist Mono", ui-monospace, monospace;
}

/* Landing: only the card. The bar steps aside until you leave home. */
body.is-home #header {
  background: transparent;
  border-bottom-color: transparent;
  pointer-events: none;
}

body.is-home #header .bar-mark,
body.is-home .career-story-link {
  opacity: 0;
  visibility: hidden;
}

body.is-home .navbar-mobile {
  pointer-events: auto;
}

body.is-home .hero-stage {
  top: 0;
  height: calc(100 * var(--vh));
}

.fold.is-folded .dev {
  cursor: pointer;
}

/* Logo in the bar and on the cover. */
.bar-mark {
  box-shadow: none;
}

.bar-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.cover-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* The navigation inside the open card: a plain row of links, no pill. */
.card-nav-slot .navbar {
  width: auto;
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.card-nav-slot .navbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
}

.card-nav-slot .navbar li {
  padding: 0;
}

.card-nav-slot .navbar li:first-of-type,
.card-nav-slot .nav-pill {
  display: none;
}

.card-nav-slot .navbar a,
.card-nav-slot .navbar a:focus {
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--text-muted);
  font: 500 14px/1.4 "Geist", sans-serif;
}

.card-nav-slot .navbar a:hover {
  color: var(--text-strong);
}

/* Case-study cards are just the picture now, like the proposal: click to open. */
.csf-card.has-banner {
  cursor: pointer;
}

.csf-card.has-banner > .csf-content {
  display: none;
}

.csf-card.has-banner:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
}

.csf-banner-foot {
  position: absolute;
  left: clamp(16px, 4%, 32px);
  right: clamp(16px, 4%, 32px);
  bottom: clamp(14px, 4%, 28px);
  display: grid;
  gap: 8px;
}

.csf-banner-foot .csf-banner-title {
  position: static;
}

.csf-banner-lead {
  max-width: 48ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.col-lg-6 > .csf-card .csf-banner-lead {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The project page a card opens into. */
html.pv-open,
html.pv-open body {
  overflow: hidden;
}

.project-view {
  position: fixed;
  inset: 0;
  z-index: 1003;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
}

.pv-back {
  position: fixed;
  z-index: 2;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
  background: rgba(12, 12, 13, 0.85);
}

.pv-hero {
  position: relative;
  height: min(calc(62 * var(--vh)), 620px);
  min-height: 300px;
  overflow: hidden;
  background: var(--coal);
}

.pv-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  filter: grayscale(1) contrast(1.05) brightness(0.36);
}

body.show-colour .pv-hero img {
  filter: brightness(0.36);
}

.pv-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.1) 30%, var(--bg) 100%);
}

.pv-head {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left, 0px)) 28px;
}

.pv-label {
  margin: 0 0 10px;
  color: var(--text-muted);
  font: 400 12px/1.4 "Geist Mono", ui-monospace, monospace;
}

.pv-title {
  max-width: 20ch;
  margin: 0;
  color: var(--text-strong);
  font: 600 clamp(32px, 5.4vw, 64px)/1.05 "Geist", sans-serif;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.pv-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-left, 0px)) 96px;
}

.pv-body .csf-content {
  padding: 0;
}

.pv-body .csf-title,
.pv-body .case-file-label,
.pv-body .csf-icon-wrap,
.pv-body .csf-content > .csf-toggle {
  display: none;
}

.pv-body .csf-lead {
  max-width: 62ch;
  color: var(--text-strong);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
}

/* The landing does not scroll, so the reading-progress line has nothing to say. */
body.is-home .read-progress {
  display: none;
}

/* Dolly on the case-study cards: the camera pushes in. The card comes forward,
   the screenshot zooms past the text, the number moves furthest. (#portfolio
   in the selectors so the greyscale rule's transition does not win.) */
#portfolio .csf-card.has-banner {
  transition: transform 0.7s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

#portfolio .csf-card.has-banner .csf-preview-col img {
  transform: scale(1.03);
  transition: transform 0.9s var(--ease-out), filter 0.4s var(--ease-out);
}

#portfolio .csf-banner-num,
#portfolio .csf-banner-foot {
  transition: transform 0.7s var(--ease-out);
}

@media (hover: hover) {
  #portfolio .csf-card.has-banner:hover {
    transform: perspective(900px) translateZ(34px);
    box-shadow: 0 0 0 1px #4a4a50, 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  }

  #portfolio .csf-card.has-banner:hover .csf-preview-col img {
    transform: scale(1.14);
  }

  #portfolio .csf-card.has-banner:hover .csf-banner-num {
    transform: translate(-6px, 6px) scale(1.08);
  }

  #portfolio .csf-card.has-banner:hover .csf-banner-foot {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #portfolio .csf-card.has-banner:hover,
  #portfolio .csf-card.has-banner:hover .csf-preview-col img,
  #portfolio .csf-card.has-banner:hover .csf-banner-num,
  #portfolio .csf-card.has-banner:hover .csf-banner-foot {
    transform: none;
  }
}

/* Contact: left-aligned like every other heading block, one even row of boxes. */
.contact-cta {
  text-align: left;
}

.contact-cta-lead {
  max-width: 62ch;
  margin-left: 0;
}

.contact-cta-actions {
  justify-content: flex-start;
}

.contact .info-box {
  width: 100%;
}

/* KORA's profile inside her project page: no extra card around it. */
.pv-body .kora-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.contact-cta {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  background: none;
  box-shadow: none;
}

.pv-body .kora-block,
.pv-body .kora-block p {
  text-align: left;
}

/* Three-across cards (Excel tools): squarer picture, smaller type. */
.col-lg-4 > .csf-card--has-image .csf-preview-col {
  aspect-ratio: 4 / 3;
}

.col-lg-4 > .csf-card .csf-banner-title {
  font-size: clamp(20px, 1.8vw, 26px);
}

.col-lg-4 > .csf-card .csf-banner-lead {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A flowchart standing in for a screenshot: show all of it. */
#portfolio .csf-preview-col--diagram img {
  object-fit: cover;
  object-position: center;
}

/*--------------------------------------------------------------
# Approach (About): photo + bio, the K-Pick credential, then three
# open blocks. No boxed cards; hairlines and spacing carry the structure.
--------------------------------------------------------------*/
.approach .ap-intro {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.approach .ap-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  box-shadow: none;
  margin: 0;
}

.ap-role {
  margin: 0 0 14px;
  color: var(--text-strong);
  font: 600 clamp(20px, 2.2vw, 28px)/1.2 "Geist", sans-serif;
  letter-spacing: -0.02em;
}

.ap-lead {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

.ap-bio .more-detail p {
  max-width: 62ch;
  color: var(--text-soft);
  line-height: 1.7;
}

/* The credential */
.ap-credential {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: center;
  margin-top: 56px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--coal);
  box-shadow: 0 0 0 1px var(--line);
}

.ap-cred-label {
  display: block;
  color: var(--text-muted);
  font: 400 12px/1.4 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.ap-cred-name {
  margin: 10px 0 12px;
  color: var(--text-strong);
  font: 600 clamp(30px, 4.2vw, 48px)/1.02 "Geist", sans-serif;
  letter-spacing: -0.035em;
}

.ap-cred-note {
  max-width: 52ch;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.ap-cred-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-cred-stats li {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ap-cred-stats b {
  color: var(--text-strong);
  font: 600 clamp(28px, 3.4vw, 40px)/1 "Geist", sans-serif;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.ap-cred-stats span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

/* Open blocks */
.ap-block {
  margin-top: 72px;
}

.ap-h {
  margin: 0 0 24px;
  color: var(--text-strong);
  font: 600 clamp(22px, 2.4vw, 30px)/1.15 "Geist", sans-serif;
  letter-spacing: -0.02em;
}

.ap-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-steps li {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ap-num {
  display: block;
  margin-bottom: 14px;
  color: var(--text-muted);
  font: 400 12px/1 "Geist Mono", ui-monospace, monospace;
}

.ap-steps h4,
.ap-tools h4 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font: 600 17px/1.3 "Geist", sans-serif;
}

.ap-steps p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}

.ap-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.ap-tools > div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ap-tools ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-tools li {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.5;
}

.ap-philosophy {
  max-width: 62ch;
  margin: 32px 0 0;
  color: var(--text-strong);
  font: 500 clamp(18px, 1.8vw, 22px)/1.45 "Geist", sans-serif;
  letter-spacing: -0.01em;
}

/* Quotes: colleagues large, school friends smaller */
.ap-quotes {
  display: grid;
  gap: 20px;
}

.ap-quotes--work {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-quotes--school {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.ap-quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--coal);
  box-shadow: 0 0 0 1px var(--line);
}

.ap-quote blockquote {
  margin: 0;
}

.ap-quote blockquote p {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.ap-quote--big blockquote p {
  color: var(--text-strong);
  font-size: 16px;
}

.ap-quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-quote figcaption img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.ap-quote figcaption span {
  display: grid;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ap-quote figcaption b {
  color: var(--text-strong);
  font-weight: 600;
}

@media (max-width: 991px) {
  .approach .ap-intro,
  .ap-credential {
    grid-template-columns: 1fr;
  }

  .approach .ap-photo {
    max-width: 280px;
  }

  .ap-steps,
  .ap-tools,
  .ap-quotes--work,
  .ap-quotes--school {
    grid-template-columns: 1fr;
  }
}

/*--------------------------------------------------------------
# Hover highlight: everything that ticks (mono.js, hover sound) also
# visibly reacts, so the sound always has something to belong to.
# Text brightens, headings gain weight, links and buttons brighten.
--------------------------------------------------------------*/
@media (hover: hover) {
  :is(section, #hero, .project-view, #header) :is(p, li, h1, h2, h3, h4, a, button) {
    transition: color 0.2s var(--ease-out), font-weight 0.2s var(--ease-out), filter 0.2s var(--ease-out);
  }

  :is(section, #hero, .project-view) :is(p, li):hover {
    color: var(--text-strong);
  }

  :is(section, #hero, .project-view) :is(h1, h2, h3, h4):hover {
    color: var(--text-strong);
    font-weight: 700;
  }

  :is(section, #hero, .project-view, #header) :is(a, button):hover {
    filter: brightness(1.3);
  }
}

/* Career story: icon only (the name is in aria-label and the tooltip). */
.career-story-link {
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  justify-content: center;
  gap: 0;
}

/*--------------------------------------------------------------
# Desktop scale: the layout reads best at 80% on desktop screens (992px+,
# which with Windows display scaling covers most laptops), so the page
# is zoomed there. vh/vw are not zoom-adjusted, so screen-sized pieces use
# --vh/--vw, which grow by 1/0.8 to keep filling the window.
--------------------------------------------------------------*/
:root {
  --vh: 1vh;
  --vw: 1vw;
}

@media (min-width: 992px) {
  html {
    zoom: 0.8;
  }

  :root {
    --vh: 1.25vh;
    --vw: 1.25vw;
  }
}

/* Icon + label buttons (Contact: Resume): give the icon room. */
.contact-cta-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/*--------------------------------------------------------------
# Phone dial (main.js): press the circle, slide onto an icon, let go
--------------------------------------------------------------*/
.nav-dial {
  display: none;
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: none !important;
  }

  .nav-dial {
    display: block;
    position: fixed;
    z-index: 1002;
    /* left/top (the centre) are set by main.js; it can be dragged */
    left: calc(100% - 44px);
    top: 62%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
  }

  /* Resting: faded so it doesn't sit on top of the reading. Full when touched. */
  .nav-dial-btn {
    opacity: 0.4;
  }

  .nav-dial.is-pressed .nav-dial-btn,
  .nav-dial.is-open .nav-dial-btn {
    opacity: 1;
  }

  .nav-dial.is-docking {
    transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1), top 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-dial.is-pressed:not(.is-open) .nav-dial-btn {
    transform: scale(0.92);
  }

  .nav-dial.is-dragging .nav-dial-btn {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  }

  .nav-dial-shade {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 13, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .nav-dial.is-open .nav-dial-shade {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-dial-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--coal);
    color: var(--text-strong);
    font-size: 24px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-dial.is-open .nav-dial-btn {
    transform: scale(0.9);
    background: var(--bg);
  }

  .nav-dial-item {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--coal);
    color: var(--text-soft);
    font-size: 19px;
    opacity: 0;
    pointer-events: none;
    transform: translate(0, 0) scale(0.4);
    transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1), opacity 0.18s ease, background-color 0.15s ease, color 0.15s ease;
  }

  .nav-dial.is-open .nav-dial-item {
    opacity: 1;
    pointer-events: auto;
    transform: translate(var(--x), var(--y)) scale(1);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 22ms), opacity 0.2s ease calc(var(--i) * 22ms), background-color 0.15s ease, color 0.15s ease;
  }

  .nav-dial-item.is-active {
    border-color: var(--text-strong);
    color: var(--text-strong);
  }

  .nav-dial.is-open .nav-dial-item.is-hot {
    background: var(--text-strong);
    border-color: var(--text-strong);
    color: var(--bg);
    transform: translate(var(--x), var(--y)) scale(1.22);
    transition-delay: 0s;
  }

  .nav-dial-label {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-strong);
    font: 600 15px/1.2 "Geist", sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(calc(var(--x, 0px) - 100% - 40px), calc(var(--y, 0px) - 50%));
    transition: opacity 0.12s ease;
  }

  .nav-dial.on-left .nav-dial-label {
    transform: translate(calc(var(--x, 0px) + 40px), calc(var(--y, 0px) - 50%));
  }

  .nav-dial.has-hot .nav-dial-label {
    opacity: 1;
  }
}

@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  .nav-dial-item,
  .nav-dial.is-open .nav-dial-item {
    transition-duration: 0.01s;
    transition-delay: 0s;
  }
}
