header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 112px; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 0 0; box-sizing: border-box;
}
@media (max-width: 720px) {
  header { padding: 0; }
}
header #logo a {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; position: relative;
}
header #logo a svg { display: block; width: 50px; height: 50px; }
header #logo a canvas {
  display: block; width: 120px; height: 120px;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
}
header nav { display: none; }
@media (max-width: 720px) {
  header #logo a { width: 52px; height: 52px; }
  header #logo a svg { width: 52px; height: 52px; }
  header #logo a canvas { width: 120px; height: 120px; }
}


.about-link {
  position: fixed; bottom: 52px; left: 50%; transform: translateX(-50%);
  z-index: 2001; opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.about-link.visible { opacity: 1; pointer-events: auto; }
.about-link a {
  font-size: 17px; font-weight: 400; height: 40px; padding: 0 16px; width: 85px;
  color: #000; background: rgba(243,243,243,0.80); backdrop-filter: blur(11.55px);
  -webkit-backdrop-filter: blur(11.55px); display: inline-flex; align-items: center;
  justify-content: center; border-radius: 100px; transition: all 0.3s ease;
  position: relative; overflow: hidden; border: none; cursor: pointer;
}
.about-link a:hover { background: rgba(233,233,233,0.90); }
.about-link a .about-text { transition: opacity 0.3s ease, transform 0.3s ease; white-space: nowrap; }
.about-link a .close-icon { position: absolute; width: 24px; height: 24px; opacity: 0; transition: opacity 0.3s ease; }
.about-link a .close-icon::before,
.about-link a .close-icon::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 1.5px; background: #000; }
.about-link a .close-icon::before { transform: translate(-50%,-50%) rotate(45deg); }
.about-link a .close-icon::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.about-link.active a { padding: 0; width: 40px; }
.about-link.active a .about-text { opacity: 0; transform: scale(0.8); }
.about-link.active a .close-icon { opacity: 1; }
.about-link.hidden-by-section {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(20px);
}

/* ============================================================
   ABOUT OVERLAY
============================================================ */
.about-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(255,255,255,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0);
  visibility: hidden; opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1) 0.2s,
              background 0.8s cubic-bezier(0.4,0,0.2,1),
              backdrop-filter 0.8s cubic-bezier(0.4,0,0.2,1),
              visibility 0s 0.8s;
}
.about-overlay.active {
  visibility: visible; opacity: 1;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), background 0.4s cubic-bezier(0.4,0,0.2,1),
              backdrop-filter 0.4s cubic-bezier(0.4,0,0.2,1), visibility 0s 0s;
}
.about-scroll-area {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column;
}
.about-overlay-fade {
  position: sticky; top: 0; z-index: 9;
  width: 100%; height: 160px; flex-shrink: 0; align-self: stretch;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.about-content {padding: 1vh 40px 120px;text-align: center;max-width: 396px;margin: auto;width: 100%;}
.about-content p {
  font-size: 22px; line-height: 32px; color: #000; margin: 0 auto 40px;
  font-weight: 400; letter-spacing: -0.033px; text-align: center;
  width: 100%; max-width: 100%;
  transform: translateY(30px); opacity: 0;
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1), opacity 0.8s cubic-bezier(0.4,0,0.2,1);
}
.about-content p:last-child { margin-bottom: 0; }
.about-content p a { color: #000; text-decoration: underline; text-underline-offset: 3px; }
.about-content p a:hover { opacity: 0.6; }
.about-overlay.active .about-content p:nth-child(1) { transform: translateY(0); opacity: 1; transition-delay: 0.15s; }
.about-overlay.active .about-content p:nth-child(2) { transform: translateY(0); opacity: 1; transition-delay: 0.25s; }
.about-overlay.active .about-content p:nth-child(3) { transform: translateY(0); opacity: 1; transition-delay: 0.35s; }
.about-overlay.active .about-content p:nth-child(4) { transform: translateY(0); opacity: 1; transition-delay: 0.45s; }
.about-overlay:not(.active) .about-content p:nth-child(1) { transition-delay: 0.20s; }
.about-overlay:not(.active) .about-content p:nth-child(2) { transition-delay: 0.10s; }
.about-overlay:not(.active) .about-content p:nth-child(3) { transition-delay: 0.05s; }
.about-overlay:not(.active) .about-content p:nth-child(4) { transition-delay: 0s; }


/* Override the original header layout; retain reference placement and sizing. */
header { max-width:none; margin:0; padding:20px 0 0; pointer-events:none; }
header #logo a { float:none; pointer-events:auto; }
.about-link, .about-link *, .about-overlay, .about-overlay * { box-sizing:border-box; font-family:system-ui,-apple-system,sans-serif; }
.about-link a { text-decoration:none; line-height:normal; letter-spacing:normal; }
.about-content p a {font-weight:500;text-decoration:none;}
.about-content sup {font-size:.55em;vertical-align:super;line-height:0;}
body.rb-projects { padding-top:160px; }
body.rb-projects > .container { padding-bottom:120px; }
.about-link a:focus-visible,header a:focus-visible {outline:2px solid #000;outline-offset:5px;}
@media(max-width:720px){
 header{padding:0;}
 .about-link{bottom:max(20px, env(safe-area-inset-bottom));}
 .about-overlay-fade{height:100px;}
 .about-content{padding:20px 52px 60px;max-width:100%;text-align:center;}
 .about-content p{font-size:22px;line-height:32px;margin-bottom:40px;}
}
@media(prefers-reduced-motion:reduce){.about-link,.about-link *,.about-overlay,.about-overlay *{transition:none!important;}}

/* Consistent logo size on desktop and mobile. */
header #logo a, header #logo a svg { width:48px; height:48px; }
