/* Base Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
  font-family: 'Google Sans Flex', sans-serif;
  background-color: #ffffff;
  color: #161616;
  overflow-x: hidden;
}

:root {
  --sat: env(safe-area-inset-top);
}

/* Nav bar */
.floating-navbar {
  position: relative;
  z-index: 2; 
  display: flex;
  gap: 0.5rem;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  width: 100%;
}

/* Base Button Style */
.floating-navbar a {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.5rem;
  border-radius: 999px;
  transition: all 0.3s ease;
  color: #161616;
  text-decoration: none;
  will-change: background-color, backdrop-filter;
  outline: none;           
  box-shadow: none;        
  background-color: transparent;
  transition: color 0.05s ease;
}

.floating-navbar a:focus,
.floating-navbar a:focus-visible {
  background-color: transparent; 
  outline: none;
  box-shadow: none;
}

/* Subtle hover
.floating-navbar a:hover {
  background-color: rgba(22, 22, 22, 0.1);
} */

/* Active Pill Style */
.floating-navbar a.active {
  background-color: rgba(22, 22, 22, 1);  
  color: #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
}

/* Hello Section */
/* .hello {
  background-color: #f2f4f8;
  text-align: center;
} */

.hello-border-wrapper {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 4px; /* glow edge */
  border-radius: 999px;
  width: 90vw;
  max-width: 500px;
  min-width: 320px;
}

.hello-cell {
  /* background-image: url(../images/MS_EMOJI_380_v002_4k_1035.jpg);  */
  background-size: cover;
  background-position: center;
  background-color: #f2f4f8;
  color: #ffffff;
  position: relative;
  text-align: center;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); */
  /* border-radius: 36px; */
  /* height: 560px; */
  /* height: 100vh; */
  width: 100%;
  overflow: hidden;
  z-index: 2;
  margin: 0;
  /* The following expands viewport on mobile to take whole screen */
  min-height: 100vh; 
  padding-top: env(safe-area-inset-top); 
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(100dvh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
}

.hello-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

.hello-overlay {
  /* background-color: rgba(15, 98, 254, 0.15);  */
  background: linear-gradient(to bottom, rgba(15, 98, 254, 0.15) 0%, rgba(15, 98, 254, 0.15) 60%, rgba(15, 98, 254, 0.4) 100%);
  padding: 3rem 1rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 20;
  /* border-radius: 36px; */
}

.hero-stats {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card h5 {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  color: #ffffff ;
}

.stat-card p {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
}

#hello {
  position: relative;
  padding: 0;
  background:#f2f4f8;
  box-shadow: 0 4px 16px rgba(15, 98, 254, 0.3);
  border-radius: 36px;
  z-index: 1; /* lower than chat overlay */
}

/* Glowing border animation */
@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* .border-animator-nav {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  
  --angle: 0deg;
  background: conic-gradient(
    from var(--angle),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    #32CC66,
    #FFC345,
    #FF45A8,
    #4589FF,
    rgba(0, 0, 0, 0)
  );

  animation: rotate-gradient 4s linear forwards;
  animation-delay: 1s;
} */

@keyframes rotate-gradient {
  0% {
    --angle: 0deg;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    --angle: 360deg;
    opacity: 0;
  }
}

.contact-cell {
  background-image: url(../images/MS_EMOJI_210_v002_4k_1065.jpg); 
  background-size: cover;
  background-position: center;
  color: #ffffff;
  position: relative;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border-radius: 36px;
  height: 400px;
  overflow: hidden;
}

.contact-overlay {
  background-color: rgba(15, 98, 254, 0.15); 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 20;
  /* border-radius: 36px; */
}

/* General Section Styling */
.section {
  padding-top: 100px;
  padding-bottom: 40px;
}

h1 {
  text-shadow: 0 0 10px rgba(15, 98, 254, 0.5);
}

h2.ai-welcome{
  font-weight: 300;
  text-align: center;
  background: linear-gradient(to bottom, #0f62fe, #33b1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

#chat{
  scroll-margin-top: 88px;
}

p.tag{
  display:inline-block;
  align-self:first baseline;
  border: 2px solid #ffffff;
  padding: 2px;
  font-size: 12px;
}

/* Buttons */
.btn:active,
.btn.active,
.btn.show {
  color: inherit !important;
  background-color: inherit !important;
  border-color: inherit !important;
  box-shadow: none !important;
}

.btn-primary {
  background-color: #0f62fe;
  /* border-color: #0f62fe; */
  border-radius: 999px;
}

.btn-secondary{
  background-color: transparent;
  border-color: #ffffff;
  border-radius: 999px;
  border-width: 1.5px;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #0f62fe;
}

/* Project Cards */
.project-card {
  background: #f2f4f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 36px;
  height: 300px;
}

.project-card-empty {
  background: #f2f4f8;
  border-radius: 36px;
  height: 300px;
}

/* Project Cards with Background Image */
.project-card.bg-image1 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/fluid_textures_11.jpg);
  color: white;
  overflow: hidden;
  height: 100%; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-card.bg-image2 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/NOTREAL_MS_CREATORS-HUB_WALLPAPER_05.jpg);
  color: white;
  overflow: hidden;
  height: 300px; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-card.bg-image3 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/NOTREAL_MS_CREATORS-HUB_WALLPAPER_01.jpg);
  color: white;
  overflow: hidden;
  height: 300px; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-card.bg-image4 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/purple_1.jpg);
  color: white;
  overflow: hidden;
  height: 300px; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-card.bg-image5 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/16-new-windows-dev-home-wallpapers-light-dark-versions-4k-v0-ozkpdpas4n6b1.jpg);
  color: white;
  overflow: hidden;
  height: 300px; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-card.bg-image6 {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url(../images/hero@2x-2880x1620.jpg);
  color: white;
  overflow: hidden;
  height: 300px; 
  display: flex;
  align-items: end; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark overlay */
.project-card.bg-image1::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 98, 254, 0.1);
  z-index: 1;
}

.project-card.bg-image2::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 98, 254, 0.1);
  z-index: 1;
}

.project-card.bg-image3::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 98, 254, 0.1);
  z-index: 1;
}

.project-card.bg-image4::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 98, 254, 0.1);
  z-index: 1;
}

.project-card.bg-image5::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 45, 156, 0.2);
  z-index: 1;
}

.project-card.bg-image6::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 98, 254, 0.2);
  z-index: 1;
}

/* XP Cards */
.xp1-card,
.xp2-card,
.xp3-card {
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;            
  min-height: 160px;       
  transition: min-height 0.3s ease; 
}

.xp1-card {border: none; background: linear-gradient(to bottom, #009d9a, #00cfcf);}
.xp2-card {border: none; background: linear-gradient(to bottom, #ee5396, #ff8bb0);}
.xp3-card {border: none; background: linear-gradient(to bottom, #a56eff, #c499ff);}

#impact .row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch; /* equal column heights */
}

#impact .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

#impact .xp1-card,
#impact .xp2-card,
#impact .xp3-card {
  flex: 1; /* let cards fill column height */
}

/* Card content */
.project-card .card-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}

/* XP Card content */
.xp1-card .card-content,
.xp2-card .card-content,
.xp3-card .card-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  color: #ffffff;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-footer {
  margin-top: auto;
}

p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
}

.logo-img {
  max-width: 150px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.logo-img-s {
  max-width: 125px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Hover effects */
/* .hello-cell:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease;
  will-change: transform, box-shadow;
  box-shadow: 0 0 8px rgba(15, 98, 245, 0.6), 
              0 0 16px rgba(15, 98, 245, 0.6), 
              0 0 32px rgba(15, 98, 245, 0.6);
} */

.project-card,
.project-card.bg-image1,
.project-card.bg-image2,
.project-card.bg-image3,
.project-card.bg-image4 {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.project-card.bg-image1:hover,
.project-card.bg-image2:hover,
.project-card.bg-image3:hover,
.project-card.bg-image4:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* --- AI Chat --- */

/* Chat bubble */
/* Input bar wrapper: anchor point for bubble */
.hello-chat-border-wrapper {
  position: relative; /* important: overlay is absolute relative to this */
  z-index: 999;
  padding: 4px;
  border-radius: 999px;
  margin: 0 auto;
  width: 100%;
  max-width: 640px;
}

/* Container anchored just above input bar */
#chat-overlay-container {
  position: absolute;
  bottom: 100%;        
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  pointer-events: none; 
  z-index: 1000;         
  width: 100%;
  max-width: 640px;  
}

/* Floating bubble */
.chat-overlay {
  background: linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgb(208, 226, 255) 100%);
  /* background: rgb(237, 245, 255, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  color: #161616;       
  padding: 16px 16px;
  border-radius: 24px;
  pointer-events: auto;      
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(12px); 
  transition: all 0.35s ease;
  font-size: 0.95rem;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  box-shadow: 0 2px 12px rgba(15, 98, 254, 0.7);
  font-size: small;
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Show bubble (floating up) */
.chat-overlay.show {
  opacity: 1;
  transform: translateY(0);  
}

.chat-overlay.hide {  
  opacity: 0;
  transform: translateY(12px);
}

@keyframes fadeUpNew {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-text.fade-in {
  animation: fadeUpNew 0.35s ease;
}

/* Close button inside bubble */
.chat-close {
  background: transparent;
  border: none;
  color: #78a9ff;
  font-size: 1.1rem;
  font-weight: 300;
  margin-left: 12px;
  padding: 0px 0px 0px 8px;
  cursor: pointer;
}

/* Typing dots */
.typing {
  display: inline-flex;
  align-items: center;
}

.typing .dot {
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background-color: #0f62fe;
  border-radius: 50%;
  opacity: 0.3;
  animation: blink 1.4s infinite;
}

.typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/*  Chat Input Bar  */
.floating-chatbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 8px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  z-index: 2;
}

#user-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.6rem 0.5rem;
  color: #161616;
}

#user-input::placeholder {
  color: #a2a9b0;
}

#send-btn {
  border: none;
  background: #0f62fe;
  color: white;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#send-btn:hover {
  background-color: #005fcb;
}

#hello .row.justify-content-center .col-md-8 {
  padding-top: 40px;
}

.border-animator-chat {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  
  --angle: 0deg;
  background: conic-gradient(
    from var(--angle),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    #ff7eb6,
    #be95ff, 
    #08bdba,
    #4589ff,
    rgba(0, 0, 0, 0)
  );

  /* animation: rotate-gradient 6s linear forwards;
  animation-delay: 1.5s; */
}

.border-animator-chat.visible {
  animation: rotate-gradient 4s linear forwards;
  animation-delay: 0s;
}

.disclaimer {
  font-size: 0.7rem;
  color: #161616;
  margin-top: 8px;
  margin-bottom: 40px;
  opacity: 0.8;
  /* font-weight: lighter; */
}

/* Footer */
footer {
  background-color: #ffffff;
  color: #161616;
  font-size: 0.9rem;
}

/* Responsive CSS */

@media (max-width: 576px) {
  
  .floating-navbar {
    padding: 4px 4px; /* reduced navbar padding on mobile */
    gap: 0.05rem;
  }

  .floating-navbar a {
    font-size: 0.8rem; /* reduced font size on mobile */
  }

  .hello-border-wrapper {
    padding: 3px; 
    width: 95vw;  
    max-width: none; 
    min-width: unset; 
  }

  #chat{
  scroll-margin-top: 80px;
  }

  .stat-card {
    padding: 0.5rem;
    border-radius: 16px;
  }

  .stat-card h5 {
    font-size: 14px;
  }

  .stat-card p {
    font-size: 12px;
  }

  .project-card,
  .project-card.bg-image1,
  .project-card.bg-image2,
  .project-card.bg-image3,
  .project-card.bg-image4,
  .project-card.bg-image5,
  .project-card.bg-image6 {
    height: 100%;
  }

  .hello-chat-border-wrapper {
    position: relative;
    z-index: 9999; /* above all page sections on mobile */
    padding: 3px; 
    width: 95vw;  
    max-width: none;
    min-width: unset; 
  }

  #user-input {
    font-size: 16px;
    padding: 0.35rem 0.4rem;
    transform: scale(0.9); /* scale back down visually - fix for mobile auto zoom behavior*/
    transform-origin: left center; /* scale back down visually - fix for mobile auto zoom behavior*/
    width: 111.11%; /* scale back down visually - fix for mobile auto zoom behavior*/
  }

  #user-input::placeholder {
    font-size: 16px;
  }

  #send-btn {
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
  }

  .floating-chatbar {
    gap: 0.05rem;
    padding: 4px 4px;
  }

  #chat-overlay-container {
    max-width: 100%; 
    z-index: 10000; /* ensure overlay is above the wrapper */
  }
  .chat-overlay {
    font-size: 0.85rem;
    padding: 12px 12px;
    transform: translateY(8px);
  }
  .chat-overlay.show {
    transform: translateY(0);
  }

  .ai-disclaimer {
    font-size: 0.6rem;
    margin-top: 8px;
  }

  h2{
    text-align: center;
  }

  p.subtitle{
    text-align: center;
  }
  .disclaimer{
    text-align: center;
  }

}

@media (max-width: 768px){
  .project-card,
  .project-card.bg-image1,
  .project-card.bg-image2,
  .project-card.bg-image3,
  .project-card.bg-image4,
  .project-card.bg-image5 {
    height: 100%;
  }
  
  h2{
    text-align: center;
  }

  p.subtitle{
    text-align: center;
  }

  .disclaimer{
    text-align: center;
  }
}

@media (max-height: 500px) {

  .hello-cell {
    height: auto;
    min-height: 160vh;
  }

  #chat{
  scroll-margin-top: 0;
  }

  .stat-card {
    padding: 0.5rem;
    border-radius: 16px;
  }

  .stat-card h5 {
    font-size: 14px;
  }

  h3 {
    font-size: 20px;
  }

  .stat-card p {
    font-size: 12px;
  }

}