/* Additional content and controls over the preserved template motion. */
#about {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  overflow: hidden;
  color: #171305;
  background: linear-gradient(180deg, #151106 0%, #6f5407 15%, #eab308 37%, #fde047 100%);
}
#about::before {
  content: '';
  position: absolute;
  top: -13vh;
  left: -10%;
  width: 120%;
  height: 32vh;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(100deg, #fef08a, #facc15 65%, #ca8a04);
  transform: translateZ(0);
}
.about-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: clamp(40px, 7vw, 130px);
  align-items: center;
  max-width: 1680px;
  min-height: 100vh;
  margin: auto;
  padding: clamp(130px, 17vh, 220px) 5vw 11vh;
}
.about-eyebrow { margin-bottom: 20px; font-size: clamp(12px, 1vw, 17px); font-weight: 800; letter-spacing: .18em; }
.about-intro h2 { font-size: clamp(60px, 7.5vw, 142px); font-weight: 750; line-height: .95; letter-spacing: -.065em; }
.about-intro h2 span { color: #fff9de; }
.about-lead { max-width: 790px; margin-top: 30px; font-size: clamp(20px, 1.7vw, 30px); line-height: 1.45; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.about-actions a {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 52px; padding: 12px 22px; border: 1px solid #171305; border-radius: 999px;
  color: #171305; background: #fff8cf; font-size: 16px; font-weight: 700; text-decoration: none;
  transition: transform .25s ease, background .25s ease;
}
.about-actions a:hover, .about-actions a:focus-visible { transform: translateY(-3px); background: white; }
.about-actions a:focus-visible { outline: 3px solid #171305; outline-offset: 3px; }
.about-facts { display: grid; gap: 12px; }
.about-facts > div { padding: clamp(22px, 2.2vw, 40px); border: 1px solid rgba(22, 17, 4, .38); border-radius: 22px; background: rgba(255, 248, 207, .62); }
.about-facts span { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.about-facts strong { display: block; font-size: clamp(20px, 2vw, 30px); line-height: 1.15; }
.about-facts p { margin-top: 9px; font-size: clamp(14px, 1.1vw, 18px); line-height: 1.35; }

/* Let the reference-style gallery transition stay measurable by ScrollTrigger. */
#portfolio { content-visibility: visible !important; }
#portfolio .portfolio-gallery-card { touch-action: pan-y; }
#portfolio .portfolio-gallery-card > img { object-fit: contain; background: #09121c; }
.portfolio-gallery-controls {
  position: absolute; z-index: 20; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 7px;
  padding: 5px; border-radius: 999px; color: white; background: rgba(8, 12, 20, .82);
}
.portfolio-gallery-controls button {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.45); border-radius: 50%;
  color: white; background: rgba(255,255,255,.1); font-size: 26px; line-height: 1;
  cursor: pointer;
}
.portfolio-gallery-controls button:hover, .portfolio-gallery-controls button:focus-visible { color: #111; background: #fde047; }
.portfolio-gallery-controls button:focus-visible, .portfolio-repo-link:focus-visible { outline: 3px solid white; outline-offset: 2px; }
.gallery-count { min-width: 54px; text-align: center; font: 700 13px/1 Arial, sans-serif; }
.portfolio-repo-link {
  position: absolute; z-index: 20; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; min-height: 42px; max-width: calc(100% - 190px);
  padding: 9px 16px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
  color: white; background: rgba(8, 12, 20, .84); font: 700 13px/1.2 Arial, sans-serif; text-decoration: none;
}
.portfolio-repo-link:hover { color: #111; background: #fde047; }

#work-with-me {
  z-index: 4;
  background: linear-gradient(180deg, #ad8108 0%, #76540a 15%, #33250b 36%, #070707 68%) !important;
}
#work-with-me::before {
  content: '';
  position: absolute; z-index: 0; top: -19vh; left: -10%; width: 120%; height: 28vh;
  background: linear-gradient(90deg, #fef08a, #facc15 65%, #ca8a04);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}
#work-with-me > * { position: relative; z-index: 1; }

.mobile-certificates { display: none; }
.contact-notice { margin-top: 12px; color: #fef08a; font-size: 14px; line-height: 1.35; }

@media (max-width: 1025px) {
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-intro h2 { font-size: clamp(58px, 9vw, 96px); }
}

@media (max-width: 700px) {
  #about { min-height: 0; }
  .about-inner { min-height: 0; padding: 24vh 5vw 12vh; gap: 38px; }
  .about-intro h2 { font-size: clamp(56px, 15vw, 88px); }
  .about-lead { font-size: 19px; }
  .about-facts > div { padding: 22px; }

  #portfolio .portfolio-sticky-container { gap: 14px !important; padding: 15px 4vw !important; }
  #portfolio .portfolio-heading-title { font-size: clamp(36px, 9.5vw, 52px) !important; line-height: 1.02 !important; margin-bottom: 0 !important; }
  #portfolio .portfolio-sticky-container > div:nth-child(2) { display: flex; flex-direction: column; gap: 14px !important; width: 100%; }
  #portfolio .portfolio-sticky-container > div:nth-child(2) > div:first-child { width: 100% !important; }
  #portfolio .portfolio-sticky-container .flex.flex-col:has(> .relative.flex.items-center > span.rounded-full) { gap: 3px !important; }
  #portfolio .portfolio-sticky-container .relative.flex.items-center:has(> span.rounded-full) { min-height: 60px !important; }
  #portfolio .portfolio-sticky-container h3 { font-size: clamp(18px, 5vw, 23px) !important; line-height: 1.1; }
  #portfolio .portfolio-sticky-container h3 + p { font-size: clamp(11px, 3vw, 14px) !important; line-height: 1.2; }
  #portfolio .portfolio-sticky-container > div:nth-child(2) > div:last-child { height: min(42vh, 370px) !important; min-height: 270px; width: 100% !important; }
  #portfolio .portfolio-gallery-card > img { object-fit: contain !important; }
  .portfolio-gallery-controls { right: 8px; bottom: 8px; gap: 2px; padding: 3px; }
  .portfolio-gallery-controls button { width: 34px; height: 34px; }
  .gallery-count { min-width: 40px; font-size: 11px; }
  .portfolio-repo-link { left: 8px; bottom: 8px; min-height: 38px; max-width: calc(100% - 138px); padding: 8px 10px; font-size: 11px; }

  #services .services-card.mobile-in-view .radial-mask-bg-fill { --reveal: 100% !important; }
  #services .services-card.mobile-in-view h3,
  #services .services-card.mobile-in-view p,
  #services .services-card.mobile-in-view li { color: #111 !important; }

  #awards > .mobile-certificates { display: grid; gap: 18px; padding: 0 5vw 10vw; }
  .mobile-certificates figure { overflow: hidden; padding: 10px; border: 1px solid rgba(250,204,21,.45); border-radius: 18px; background: #141414; }
  .mobile-certificates img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 10px; }
  .mobile-certificates figcaption { padding: 12px 5px 4px; color: #fff; font-size: 16px; line-height: 1.3; }
  #footer .footer-content > img { align-self: flex-start !important; }
}

@media (prefers-reduced-motion: reduce) {
  .about-actions a { transition: none; }
}
