/* ========== Global ========== */

:root {
  --accent: #a45ee5; /* lavender */
  --brand: #d96048;  /* your main button color */
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #9c8e8e;
  color: #222;
  margin: 0;
}

/* Only hide + animate on landing (not in chat mode) */
body:not(.chat-mode) .hero-title,
body:not(.chat-mode) .hero-subtitle {
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

body:not(.chat-mode) #tiles {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* When page is ready → animate in (still only for non-chat) */
body.hero-animate:not(.chat-mode) .hero-title {
  opacity: 1;
  transform: translateY(0);
}

body.hero-animate:not(.chat-mode) .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

body.hero-animate:not(.chat-mode) #tiles {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}


/* ========== Hero Avatar ========== */
.avatar {
  width: 100vw;
  max-width: 290px;
  min-width: 120px;
  height: 290px;
  border-radius: 50%;
  border-color: #918585;
  object-fit: cover;
  display: block;
  margin: 1.25rem auto 1.5rem;
  animation: floaty 3s ease-in-out infinite;
  will-change: transform;
}
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}

/* ========== Ask Box (search/chat input) ========== */
.ask-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 50px;
  padding: 0.4rem 0.6rem;
  max-width: 500px;
  margin: 1rem auto;

  background: rgba(239, 234, 234, 0.16);
  border: 2px solid rgba(212, 206, 206, 0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ask-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 0.6rem 1rem;
  background: transparent;
}
.ask-box button {
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  background-color: var(--brand);
  transition: background 0.2s ease;
}
.ask-box button:hover { background-color: #c24f39; }

/* ========== Feature Tiles ========== */
#tiles { margin-top: 1rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.6rem;
  margin-top: 2%;
}

.feature-tile {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: #fff;
  border-radius: 40px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  font-size: 0.9rem;
}
.feature-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(164,94,229,.18);
  background: #fff4f8;
}
.tile-emoji { font-size: 1.2rem; }
.tile-title { font-weight: 600; }

/* prevent blue links in feature tiles on iOS */
#tiles .feature-tile a,
#tiles .feature-tile a:link,
#tiles .feature-tile a:visited {
  color: inherit;
  text-decoration: none;
}

#tiles .feature-tile a:hover,
#tiles .feature-tile a:active,
#tiles .feature-tile a:focus {
  color: #d96048; /* your brand hover color */
  text-decoration: none;
}


/* compact tiles while chatting (smaller than before) */
.chat-mode #tiles.tiles-compact { max-width: 900px; }
.chat-mode #tiles.tiles-compact .feature-grid { gap: 1rem; }
.chat-mode #tiles.tiles-compact .feature-tile { padding: .7rem .5rem; border-radius: 25px; font-size: .82rem; }
.chat-mode #tiles.tiles-compact .tile-emoji { font-size: 1rem; }
.chat-mode .chat-footer #ask .ask-box {
    background: rgba(255, 255, 255, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #3a3a3a;
}
@media (max-width:600px){
  .chat-mode .ask-input{color: black;}
}

/* Landing page only (no chat-mode) */
body:not(.chat-mode) .ask-box{ max-width: 450px; }

body:not(.chat-mode) #tiles {
  max-width: 980px;
  margin: 0 auto;
}
body:not(.chat-mode) #tiles .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 0.5%;
}
body:not(.chat-mode) #tiles .feature-tile {
  padding: .9rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
body:not(.chat-mode) #tiles .tile-emoji { font-size: 1.35rem; }

/* Landing-page mobile tweaks (does not affect chat) */
@media (max-width: 600px) {
  body:not(.chat-mode) #tiles .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
  }
  body:not(.chat-mode) #tiles .feature-tile {
    padding: .65rem .6rem;
    border-radius: 14px;
    font-size: .95rem;
  }
  body:not(.chat-mode) #tiles .tile-emoji { font-size: 1.1rem; }
}



/* ========== Mini sticky header ========== */
.mini-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
/* CHAT PAGE AVATAR ANIMATION */
.mini-avatar {
    width: 60px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;

    /* animation */
    animation: avatarPopIn 0.45s ease-out forwards;
    transform-origin: center;
}

/* Start big → shrink to normal */
@keyframes avatarPopIn {
    0% {
        transform: scale(1.80);
        opacity: 0;
    }
    60% {
        transform: scale(1.12);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}
/* Only animate mini-avatar on the chat page */
.chat-view .mini-avatar {
    animation: avatarPopIn 0.45s ease-out forwards;
}


.mini-title { font-weight: 700; }
.chat-mode .mini-header { display: flex; }


/* ========== Chat Area & Bubbles ========== */
.chat-area { display: none; min-height: 40vh; padding-top: 1rem; }
.chat-mode .chat-area { display: block; }
.chat-mode #hero { display: none; }
.ask-area { margin-top: 0.75rem; }

.chat-stream {
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* ✅ don't stretch bubbles across */
  gap: .75rem;
  margin-top: 1rem;
}

.bubble {
  display: inline-flex;                 /* hug content */
  align-items: flex-start;
  padding: .75rem 1rem;
  border-radius: 30px;
  max-width: min(720px, 100%);          /* pills, not full row */
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(15,18,34,.06);
}


/* user messages – right side, narrower */
.bubble.user {
  align-self: flex-end;
  background: #d96048;
  border: 3px solid #d96048;
  color: white;
  max-width: 70%;
}

/* AI text bubbles – left side */
.bubble.ai {
  align-self: flex-start;
  background: #fff;
  border: 3px solid #eee;
  text-align: left;
  letter-spacing: normal;
  word-spacing: normal;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.bubble.ai * { text-align: left; letter-spacing: normal; word-spacing: normal; white-space: normal; word-break: normal; overflow-wrap: anywhere; }

/* Typing bubble - ENHANCED */
.bubble.typing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  border: 3px solid #eee;
  width: 60px;
  min-width: 60px;
  padding: .65rem .85rem;
  border-radius: 30px;
}

.bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bubble.typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  animation: typing-bounce 1s infinite ease-in-out;
}

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

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}


/* ========== Chat Feature Header (above bubbles) ========== */
.chat-feature-header { text-align: center; margin-bottom: 1rem; }
.chat-feature-chip {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-size: .9rem;
  background: #f6f4ff;
  color: var(--accent);
  font-weight: 600;
}

/* Preserve newlines and spacing cleanly */
.bubble,
.bubble.ai,
.bubble.user { white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; letter-spacing: normal; word-spacing: normal; text-align: left; }

/* Tighter lists inside chat bubbles */
.bubble ul { margin: 0.25rem 0 0.25rem 1.25rem; padding-left: 1.2rem; }
.bubble ul ul { margin: 0.15rem 0 0.15rem 1.1rem; }
.bubble li { margin: 0.15rem 0; line-height: 1.4; font-size: 0.95rem; }

/* Compact paragraphs inside bubbles */
.bubble p { margin: 0.25rem 0; line-height: 1.45; }


/* Headings inside bubbles */
.bubble h2 { margin: 0 0 .5rem 0; line-height: 1.25; font-size: 1.25rem; font-weight: 700; }
.bubble h1,
.bubble h3,
.bubble h4,
.bubble h5,
.bubble h6 { margin: .25rem 0; line-height: 1.3; font-size: 1rem; font-weight: 600; }

/* ===== About Me (in-chat cards) ===== */
.bubble .about-wrap { display: grid; gap: 16px; }

/* common card shell */
.bubble .about-card {
  background:#fff;
  border:1px solid #eee;
  border-radius:18px;
  padding:min(24px, 5vw);
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}

/* --- Old Card 1 --- */
.bubble .about-hero {
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(16px, 3vw, 28px);
  align-items:start;
}
@media (max-width: 760px){ .bubble .about-hero { grid-template-columns: 1fr; } }

.bubble .about-title{
  font-size: 2.5rem;
  line-height: .95;
  font-weight: 50%;
  letter-spacing: .5px;
  padding: 2rem;
  margin: 5rem;
}

.bubble .about-copy { font-size: clamp(1rem, 2.1vw, 1.12rem); line-height: 1.75; }
.bubble .about-copy b { font-weight: 800; }
.bubble .about-flag { font-size: 1.05em; vertical-align: -1px; }

.bubble .about-photo {
  width: 80%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

/* location row */
.bubble .about-loc {
  display:flex; align-items:center; gap:10px;
  margin-top: 14px;
  font-size: 1.05rem; font-weight: 600;
  opacity:.9;
}
.bubble .about-pin {
  width: 28px; height: 28px; border-radius:50%;
  display:inline-grid; place-items:center;
  background: #ffe6e0; color:#d96048;
}

/* --- NEW About v2 hero --- */
.bubble .about-card.about-v2 { padding: clamp(20px, 3.5vw, 32px); }
.bubble .about-title.v2 {
  line-height: .95;
  letter-spacing: .5px;
  padding: 1%;

  font-size: 1.5rem; 
  font-weight: 900; 
  margin: 2%; 
  margin-left: 3%;
}
/* Make the right column text more readable */
.bubble .about-hero--v2 {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;  /* a bit more space for text */
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}

/* Text block styling */
.bubble .about-copy.v2 {
  max-width: 40rem;                 /* don't let text be too wide */
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Nicer paragraph spacing */
.bubble .about-copy.v2 p {
  margin: 0 0 0.9rem 0;
}

/* Slightly emphasize the first paragraph intro */
.bubble .about-copy.v2 p:first-of-type {
  font-size: 1.02rem;
  font-weight: 500;
}


.bubble .about-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bubble .about-loc--v2 {
  margin-top: 4px;           /* closer to the photo */
  font-size: 0.98rem;
}


@media (max-width: 760px) { .bubble .about-hero--v2 { grid-template-columns: 1fr; } }
.bubble .about-photo.v2 {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.bubble .about-left {
  display: flex;
  flex-direction: column;
  align-items: left;   /* center BC, Canada under your photo */
  gap: 10px;
}

.bubble .about-copy.v2 { font-size: clamp(1rem, 2.1vw, 1.12rem); line-height: 1.75; }
.bubble .about-loc--v2 { display:flex; align-items:center; gap:10px; margin-top: clamp(12px, 2.4vw, 18px); }
.bubble .loc-text { line-height: 1.1; }
.bubble .loc-city { font-weight: 800; letter-spacing: .5px; font-size: clamp(1.05rem, 2.6vw, 1.25rem); }
.bubble .loc-country { opacity: .9; font-size: clamp(.95rem, 2.2vw, 1.05rem); }

/* --- Card 3: CTA --- */
.cta-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cta-title { font-size: 1.2rem; font-weight: 900; margin-bottom: 1rem; letter-spacing: .5px; }

.bubble .cta-btn {
  display:inline-flex; align-items:center; gap:.6rem;
  border: none; cursor:pointer;
  background: #d96048; color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 1.05rem; font-weight: 700;
  box-shadow: 0 8px 18px rgba(217,96,72,.26);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.bubble .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(217,96,72,.32); background:#c24f39; }

/* ===== Projects 3-up gallery (default page section) ===== */
/* Projects page section: centered, not full width */
.projects-gallery{
  width: min(800px, 96vw);
  margin: 24px auto;     /* centered */
  padding: 0 12px;       /* small side padding */
}

.projects-gallery .heading { line-height: .95;
  letter-spacing: .5px;
  padding: 1%;

  font-size: 1.5rem; 
  font-weight: 900; 
  margin: 2%; 
  margin-left: 3%;}
.project-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; padding: 0 .5rem; }

.project-card{
  height: clamp(220px, 28vw, 300px);
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border .25s ease;
}
.project-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
  border: 2px solid var(--accent);
  border-color: #d96048;
}
.project-card::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.55) 100%); }
.project-card__content { position:absolute; inset:auto 0 0 0; padding: .9rem 1rem 1rem; color:#fff; z-index: 1; }
.project-card__eyebrow { font-size:.8rem; opacity:.9; margin-bottom:.25rem; }
.project-card__title { font-size:1.15rem; font-weight:800; line-height:1.2; }
.project-card__tags { margin-top:.4rem; display:flex; gap:.35rem; flex-wrap:wrap; }
.project-card__tag { font-size:.75rem; padding:.15rem .45rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; backdrop-filter: blur(2px); }

/* ===== Projects INSIDE a chat bubble ===== */
/* Projects INSIDE a chat bubble (cap width like the page) */
.bubble .projects-gallery{
  width: 100%;
  max-width: 800px;     /* or 1000px if you want wider */
  margin: 0 auto;
  padding: 0 16px;
}

.bubble .projects-gallery .heading { padding: 0; margin:  1rem; }
.bubble .project-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; padding: 0; }
.bubble .project-card { height: clamp(180px, 24vw, 260px); }

/* Keep chat + gallery within a nice max width on page sections */
.container.section,
.chat-area,
.projects-gallery { max-width: 800px; margin-left: auto; margin-right: auto; }



/* Make sure scrolling to the gallery doesn't hide it under the sticky header */
.projects-gallery { scroll-margin-top: 96px; margin-bottom: 1.25rem; }

/* ===== Skills collage grid ===== */
/* Skills INSIDE a chat bubble (cap width too) */
.bubble .skills-wrap{
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}
.bubble .skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.bubble .skills-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1 / 1; transition: transform .15s ease, box-shadow .2s ease; }
.bubble .skills-item:hover { transform: scale(1.05); box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.bubble .skills-item img { width: 100%; height: 100%; object-fit: cover; background: #fff; display: block; }
.bubble .skills-caption { display: none; }

/* ===== Skills & Expertise ===== */

.skills-expertise-title {
  font-size: clamp(2rem, 2.4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 2rem;
  padding: 1rem;
  letter-spacing: -0.02em;
}

/* Logo row spacing */
.skills-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

/* Expertise section */
.skills-expertise {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.skills-expertise-group {}

.skills-expertise-heading {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.skills-expertise-icon {
  background: #f1f3f5;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skills-expertise-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skills-chip {
  background: #54504f;
  color: #fff;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* === Certifications row === */
.skills-certs-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;          /* wrap on desktop */
  overflow: visible;        /* allow hover pop-out */
}

/* Card container */
.skills-cert-card {
  position: relative;
  width: 215px;
  height: 150px;
  border-radius: 14px;
  overflow: visible;        /* let the zoom spill outside */
  flex: 0 0 auto;
  cursor: zoom-in;

  transform-origin: center center;
  transition:
    transform 0.25s ease-out,
    box-shadow 0.25s ease-out;
}

/* Thumbnail image */
.skills-cert-card img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;

  transition:
    border-radius 0.25s ease-out,
    object-fit 0.2s ease-out,
    background-color 0.2s ease-out;
}

/* Hover: card pops, image switches to full view */
.skills-cert-card:hover {
  transform: scale(1.9);              /* desktop zoom */
  z-index: 25;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.skills-cert-card:hover img {
  object-fit: contain;
  background-color: #fff;
  border-radius: 18px;
}

/* --- Mobile: horizontal scroll + gentler zoom --- */
@media (max-width: 650px) {

  .skills-chip { white-space: normal; }
  .skills-certs-row {
    flex-wrap: nowrap;
    overflow-x: auto;       /* scroll left-right */
    overflow-y: visible;    /* let the zoom spill out vertically */
    padding-bottom: 16px;   /* room for the shadow */
  }

  .skills-cert-card {
    width: 150px;
    height: 100px;
  }

  .skills-cert-card:hover {
    transform: scale(1.8) translateY(-18px);  /* pop out more + float up */
    z-index: 40;
    box-shadow: 0 14px 30px rgba(0,0,0,0.28);
  }
}

/* ==== Fullscreen cert view (mobile tap) ==== */
.skills-cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.skills-cert-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  background: #fff;
}

/* Tiny hint at the bottom */
.skills-cert-lightbox::after {
  content: "Tap anywhere to close";
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #f5f5f5;
  font-size: 0.8rem;
  opacity: 0.85;
}




/* ===== Docked footer (only active in .chat-mode) ===== */
.chat-mode #ask.docked,
.chat-mode #tiles.docked {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 96vw);
  z-index: 100;
  max-width: 550px;
  margin: 0 auto;
}
.chat-mode #ask.docked { bottom: max(12px, env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.chat-mode #tiles.docked { padding-bottom: env(safe-area-inset-bottom); }

.chat-mode #ask.docked .ask-holder,
.chat-mode #tiles.docked .feature-grid {
  background: transparent;
}

/* Glass container: hug content instead of full-width footer */
.chat-mode .chat-footer{
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);

    /* animation */
  animation: chatFooterPopIn 0.50s ease-out;

  /* 🔑 size to content */
  display: inline-flex;          /* not full-width */
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;

  /* let it grow only as much as children need */
  width: max-content;
  max-width: 96vw;               /* safety on very small screens */

  padding: 10px 14px;
  margin-top: 0;        /* remove the big top gap */
  padding-top: 0;
  border-radius: 20px;
  z-index: 100;

  /* glassmorphism */
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Keep tiles in a single row that doesn't stretch the glass */
.chat-mode .chat-footer #tiles .feature-grid{
  display: inline-flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* one row */
  align-items: center;
  justify-content: center;
}

/* Prevent tiles from forcing the glass to get too big */
.chat-mode .chat-footer #tiles .feature-tile{
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 120px;
}

/* Ask box: don’t stretch to full viewport width inside glass */
.chat-mode .chat-footer #ask .ask-box{
  width: auto;
  max-width: 600px;        /* your preferred cap */
  margin: 0;               /* glass handles spacing via gap */
}




/* Prevent chat content being hidden by docked footer (JS will increase if needed) */
.chat-mode .chat-stream { padding-bottom: 380px; }
/* extra space under the last bubble in chat mode */
.chat-mode .chat-stream .bubble:last-child {
  margin-bottom: 50px;   /* you can try 40–60px */
}
.chat-view {
  padding-bottom: 40px; /* optional small cushion */
}


@keyframes chatFooterPopIn {
  0% {
    transform: translateX(-50%) scale(0.50);
    opacity: 0;
  }
  55% {
    transform: translateX(-50%) scale(1.09);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}


/* ===== Contact bubble ===== */
.bubble .contact-wrap {
  width: 100%;
  max-width: 800px;       /* SAME width cap as projects-gallery */
  margin: 0 auto;         /* center it */
}
/* Make the CONTACT bubble the same width as the projects bubble */
.bubble.contact-wrap {
  display: block;                       /* override inline-block */
  width: min(800px, 100%);              /* same max width as chat area */
  margin: 0 auto;                       /* center it */
}

/* Inner wrapper should just fill the bubble */
.bubble.contact-wrap > .contact-wrap {
  width: 100%;
}
.bubble .contact-title { font-size: 1.5rem; font-weight: 900;
margin: 20px; }

/* ===== Contact: Apple-style list (no cards) ===== */

/* Wrapper for the rows */
.bubble .contact-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 0;
}

/* One row (icon + text [+ optional copy]) */
.bubble .contact-item{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin-left: 30px;
  margin-top: 5px;
}

/* Small monochrome-ish icon on the left */
.bubble .contact-icon{
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  opacity: .9;
}

/* The text/link */
.bubble .contact-text{
  font-weight: 600;
  color: #111;
  text-decoration: none;
  line-height: 1.35;
}

.bubble .contact-text:hover{
  text-decoration: underline;
}

.bubble.ai .email-link{
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  text-decoration: underline;
  color: inherit;
}


/* Copy button sits right after the email text */
.bubble .copy-btn{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  margin-left: 2px;       /* just a small gap from the email */
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: background .15s ease, transform .12s ease, opacity .2s ease;
}

.bubble .copy-btn:hover{ background: rgba(0,0,0,.04); transform: translateY(-1px); }
.bubble .copy-btn img{ width: 18px; height: 18px; opacity: .7; }
.bubble .copy-btn:hover img{ opacity: 1; }

/* “Copied!” micro tooltip */
.bubble .copy-btn.copied::after{
  content: "Copied!";
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: .75rem;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}




/* LinkedIn logo centered under cards */
/* LinkedIn logo centered under cards */
.bubble .linkedin-row{
  margin-top: 30px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.bubble .linkedin-logo{
  width: 60px;
  height: auto;
  size: 100px;
  opacity: .9;
  transition: transform .14s ease, opacity .14s ease, filter .14s ease;
  margin-top: 5%;
}

.bubble .linkedin-link:hover .linkedin-logo{
  transform: translateY(-1px) scale(1.04);
  opacity: 1;
  filter: saturate(1.1);
}


/* ===== Project Modal (floating sheet powered by FLIP) ===== */
body.modal-open { overflow: hidden; }

/* Flex-center container — JS animates transforms relative to this center */
#project-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;               /* toggled by JS */
  align-items: center;
  justify-content: center;
}

/* Backdrop fades via JS */
#project-modal .pm-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;                  /* JS animates to 1 */
}

/* Panel (no translate centering; JS applies translate/scale) */
#project-modal .pm-panel{
  position: relative;
  width: min(980px, 92vw);
  max-height: 86vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  overflow: hidden;
  transform: none;
  transform-origin: center center;
  will-change: transform, opacity;
}

/* Scroll area inside panel */
#project-modal .pm-scroller{
  overflow: auto;
  max-height: 86vh;
  padding: 28px 28px 22px;
}

/* Close button */
#project-modal .pm-close{
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.06);
  font-size: 22px; line-height: 36px;
  cursor: pointer;
}
#project-modal .pm-close:hover { background: rgba(0,0,0,.12); }

/* Content styling */
#project-modal .pm-header { margin: 6px 4px 14px; }
#project-modal .pm-eyebrow { color:#666; font-size:.9rem; margin-bottom:2px; }
#project-modal .pm-title { margin:0 0 6px; font-size:2.1rem; line-height:1.1; }

#project-modal .pm-tags { display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.4rem; }
#project-modal .pm-tags span {
  font-size:.8rem; padding:.2rem .5rem; border-radius:999px;
  background:#f1f1f5; border:1px solid #eee;
}

#project-modal .pm-image{
  width:80%; height:auto; border-radius:12px; margin: 6px 0 14px; display:block;
}
#project-modal .pm-gallery img{
  width:80%; height:auto; border-radius:12px; margin: 6px 0 14px; display:block;
}

#project-modal .pm-links { margin-top:10px; }
#project-modal .pm-links a { color:#4c5bdc; text-decoration:none; font-weight:600; }
#project-modal .pm-links a:hover { text-decoration:underline; }

/* ================================= */

/* --- Mobile only Landing page (not chat-mode): stack tiles 1 per row --- */
@media (max-width: 600px) {
  body:not(.chat-mode) #tiles .feature-grid {
    grid-template-columns: 1fr; /* one per row */
    gap: 0.8rem;
    margin-top: 0.2%;

  }

  .chat-mode .chat-stream {
    padding-bottom: 380px;   /* bump this until it feels right */
  }
  /* extra space under the last bubble in chat mode */
.chat-mode .chat-stream .bubble:last-child {
  margin-bottom: 50px;   /* you can try 40–60px */
}

  body:not(.chat-mode) .feature-tile{
    border-radius: 50px;

  }

  body:not(.chat-mode) .ask-box {
    max-width: 400px;
    margin: 0.5rem auto 0.5rem;
  }

  /* Mobile typography adjustments */
  #hero h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  #hero .lead {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .container.section,
  .chat-area,
  .projects-gallery { max-width: 400px; margin-left: auto; margin-right: auto; }

/* --- Chat mode: tiles in one fixed row, no wrap --- */
/* --- Chat mode: tiles in one fixed row, auto-resize on mobile --- */
.chat-mode #tiles.tiles-compact .feature-grid {
  display: flex;
  flex-wrap: nowrap;        /* stay in one row */
  justify-content: center;
  align-items: center;
  gap: 12px;                 /* space between tiles */
}

.chat-mode #tiles.tiles-compact .feature-tile {
  flex: 0 0 auto;              /* all tiles share row equally */
  min-width: 80;             /* allow shrinking */
  max-width: 400px;         /* don’t grow too large on desktop */
  text-align: center;
}
.bubble .about-photo {
  width: 80%;
  aspect-ratio: 1 / 2;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
}
/* small phones: make tiles a hair smaller */
@media (max-width: 380px){
  .chat-mode #tiles.tiles-compact .feature-tile{
    min-width: 78px;
    max-width: 100px;
  }
}

/* --- Force AI bubbles to behave like normal text blocks --- */
.bubble.ai {
  display: inline-block !important;   /* kill any flex / grid that might be applied */
  white-space: normal;                /* let text wrap normally */
}

.bubble.ai p {
  display: block !important;          /* stack paragraphs vertically */
  width: 100%;
}



