/* ============================================================
   Ahammed Nizar — Portfolio
   Dark navy panel-stack design.
   Palette from the profile photo's dress code:
   navy suit → backgrounds | white shirt → text | steel-blue tie → accent
   ============================================================ */

:root {
  --bg: #080e1a;            /* darkest navy (suit shadow) */
  --surface-1: #0b1424;     /* hero */
  --surface-2: #101b30;     /* about / skills */
  --surface-3: #0d1728;     /* experience / feedback */
  --surface-4: #0c1526;     /* projects */
  --surface-5: #0a1220;     /* contact */
  --text: #eef2f8;          /* shirt white */
  --muted: #97a6bc;
  --accent: #7db0e8;        /* tie blue */
  --accent-soft: #a9c9ef;
  --silver: #c9d4e2;        /* subtle silver secondary */
  --line: rgba(238, 242, 248, 0.1);
  --card: rgba(238, 242, 248, 0.04);
  --radius: 28px;
  --header-h: 72px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* No scroll-behavior:smooth on html — Chrome swallows programmatic
   window.scrollTo on this sticky-panel layout when it's set; smooth
   scrolling is done in JS instead. Likewise no overflow-x rule on
   html/body: hidden turns body into a scroll container and clip blocks
   window.scrollTo. Panels have overflow:hidden, so nothing overflows. */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); margin-bottom: 1.5rem; white-space: pre-line; }
h3 { font-size: 1.3rem; }

a { color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.accent { color: var(--accent); font-style: italic; }

::selection { background: rgba(125, 176, 232, 0.3); }

/* ============ Page loader ============ */
.page-loader {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: var(--font-display);
  font-size: 2.4rem; color: var(--accent);
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  animation: loaderPulse 1.2s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125, 176, 232, 0.3); }
  50% { box-shadow: 0 0 0 16px rgba(125, 176, 232, 0); }
}

/* ============ Header ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.site-header.scrolled {
  background: rgba(8, 14, 26, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-decoration: none;
  display: flex; align-items: baseline;
}
.logo-dot { color: var(--accent); }
.logo-name { font-size: 1.05rem; color: var(--muted); font-family: var(--font-body); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.9rem); }
.site-nav a {
  text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.25s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[data-nav]::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.site-nav a[data-nav]:hover::after,
.site-nav a[data-nav].active::after { transform: scaleX(1); }
.site-nav a[data-nav].active { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.5rem 1.15rem !important;
  border-radius: 999px;
  font-weight: 600 !important;
  transition: background 0.25s ease !important;
}
.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 10px; z-index: 120;
}
.nav-toggle span {
  width: 25px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Sliding stacked panels ============ */
.stack { position: relative; }

.panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
  padding: calc(var(--header-h) + 2rem) 0 3.5rem;
  overflow: hidden;
}

.panel-hero       { background: var(--surface-1); border-radius: 0; }
.panel-about      { background: var(--surface-2); }
.panel-experience { background: var(--surface-3); }
.panel-skills     { background: var(--surface-2); }
.panel-projects   { background: var(--surface-4); }
.panel-feedback   { background: var(--surface-3); }
.panel-contact    { background: var(--surface-5); }

.panel-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section-label {
  color: var(--accent);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ============ Reveal animations ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ Hero ============ */
.panel-hero {
  background:
    radial-gradient(ellipse 55% 45% at 82% 18%, rgba(125, 176, 232, 0.1), transparent),
    radial-gradient(ellipse 45% 40% at 12% 88%, rgba(201, 212, 226, 0.05), transparent),
    var(--surface-1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  color: var(--silver);
  font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  margin-top: 1.4rem;
  max-width: 34em;
}
.lead strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 12px 34px -12px rgba(125, 176, 232, 0.55);
}
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.1rem; }
.hero-badges li {
  font-size: 0.82rem; font-weight: 500;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--silver);
}

/* hero entrance (staggered by JS adding .in to .panel-hero) */
.hero-text > *, .hero-photo {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.panel-hero.in .hero-text > *, .panel-hero.in .hero-photo { opacity: 1; transform: none; }
.panel-hero.in .hero-text > *:nth-child(1) { transition-delay: 0.05s; }
.panel-hero.in .hero-text > *:nth-child(2) { transition-delay: 0.15s; }
.panel-hero.in .hero-text > *:nth-child(3) { transition-delay: 0.28s; }
.panel-hero.in .hero-text > *:nth-child(4) { transition-delay: 0.4s; }
.panel-hero.in .hero-text > *:nth-child(5) { transition-delay: 0.52s; }
.panel-hero.in .hero-photo { transition-delay: 0.3s; }

.photo-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  max-width: 380px;
  margin-left: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(238, 242, 248, 0.14);
  pointer-events: none;
}
.photo-frame img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.photo-frame:hover img { transform: scale(1.05); }

.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid var(--muted);
  border-radius: 14px;
  opacity: 0.6;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 7px;
  width: 4px; height: 8px; border-radius: 4px;
  background: var(--muted);
  transform: translateX(-50%);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0% { opacity: 0; transform: translate(-50%, 0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}
.about-copy p:first-child { color: var(--text); font-size: 1.1rem; }

.stats { display: grid; gap: 1rem; }
.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.05rem 1.4rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stats li:hover { transform: translateY(-3px); border-color: rgba(125, 176, 232, 0.4); }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.1rem; color: var(--accent);
  display: block; line-height: 1.2;
}
.stat-label { font-size: 0.87rem; color: var(--muted); }

.credentials {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.credential {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.credential-medal {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(125, 176, 232, 0.14); color: var(--accent);
  font-size: 0.95rem;
}
.credential p { font-size: 0.9rem; font-weight: 500; line-height: 1.35; }
.credential span { display: block; font-size: 0.79rem; font-weight: 400; color: var(--muted); }

/* ============ Experience / timeline ============ */
.timeline { margin-top: 1.5rem; display: grid; gap: clamp(2rem, 4vw, 2.8rem); }

.job {
  border-left: 2px solid rgba(125, 176, 232, 0.35);
  padding-left: clamp(1.2rem, 3vw, 1.8rem);
  max-width: 760px;
  position: relative;
}
.job::before {
  content: "";
  position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(125, 176, 232, 0.18);
}

.job-meta {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--silver);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.job-meta .job-place { color: var(--muted); font-weight: 500; letter-spacing: 0.06em; text-transform: none; }
.job h3 { margin: 0.35rem 0 0.2rem; font-size: 1.4rem; }
.job-co { color: var(--accent); font-style: italic; font-weight: 400; }
.job-summary { color: var(--muted); font-size: 0.97rem; margin: 0.4rem 0 0.9rem; }

.job ul { display: grid; gap: 0.5rem; }
.job li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.job li::before {
  content: "◆";
  position: absolute; left: 0; top: 0.45em;
  color: var(--accent);
  font-size: 0.55rem;
}

/* ============ Skills ============ */
.skills-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.3rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: rgba(125, 176, 232, 0.4); }
.skill-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.skill-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(125, 176, 232, 0.12); color: var(--accent);
}
.skill-icon svg { width: 21px; height: 21px; }
.skill-card h3 { font-size: 1.15rem; }
.skill-card ul { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skill-card li {
  font-size: 0.83rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(238, 242, 248, 0.05);
  border: 1px solid var(--line);
  color: var(--silver);
}

/* ============ Projects ============ */
.projects-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(var(--accent), transparent);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.45s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(125, 176, 232, 0.4); }
.project-card:hover::before { transform: scaleY(1); }
.project-tag {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--silver);
  margin-bottom: 0.6rem;
}
.project-card h3 { margin-bottom: 0.55rem; font-size: 1.2rem; }
.project-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.project-highlight {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem; font-weight: 500;
  color: var(--accent);
  display: flex; align-items: baseline; gap: 0.5rem;
}
.project-highlight::before { content: "✦"; font-size: 0.75rem; }

/* ============ Feedback (auto-sliding carousel) ============ */
.feedback-slider { margin-top: 2rem; }
.feedback-viewport { overflow: hidden; }
.feedback-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.65s cubic-bezier(0.45, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .feedback-track { transition: none; }
}
.feedback-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  padding: 4px 2px; /* room for the card's hover lift & border glow */
}
.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2rem 2.1rem 1.6rem;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex; flex-direction: column;
  transition: border-color 0.3s ease;
}
.quote-card:hover { border-color: rgba(125, 176, 232, 0.4); }
.quote-mark {
  font-family: var(--font-display);
  font-size: 3.2rem; line-height: 1;
  color: rgba(125, 176, 232, 0.45);
  margin-bottom: 0.5rem;
}
.quote-card blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}
.quote-src {
  margin-top: 1.4rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.quote-src strong { display: block; color: var(--accent); font-weight: 600; }
.quote-src span { color: var(--muted); }

.feedback-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.fb-arrow {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.fb-arrow:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.06); }
.fb-arrow svg { width: 18px; height: 18px; }
.fb-dots { display: flex; align-items: center; gap: 0.55rem; }
.fb-dot {
  width: 8px; height: 8px;
  border-radius: 99px;
  border: 0; padding: 0;
  background: rgba(238, 242, 248, 0.22);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
}
.fb-dot:hover { background: rgba(238, 242, 248, 0.45); }
.fb-dot.active { background: var(--accent); width: 24px; }

/* ============ Contact ============ */
.panel-contact {
  background:
    radial-gradient(ellipse 55% 50% at 85% 12%, rgba(125, 176, 232, 0.08), transparent),
    var(--surface-5);
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-cards { display: grid; gap: 1rem; margin-top: 2rem; }
.contact-card {
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.15rem 1.4rem;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(125, 176, 232, 0.45); }
.cc-icon {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(125, 176, 232, 0.12); color: var(--accent);
}
.cc-icon svg { width: 24px; height: 24px; }
.cc-label { display: block; font-size: 0.8rem; color: var(--muted); }
.cc-value { font-weight: 600; font-size: 1rem; word-break: break-all; }

.footer-line {
  margin-top: 2.4rem;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---- Chat panel ---- */
.chat-panel {
  background: rgba(238, 242, 248, 0.03);
  border: 1px solid var(--line);
  border-radius: 24px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.chat-head {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1.15rem 1.4rem;
  background: linear-gradient(120deg, rgba(125, 176, 232, 0.22), rgba(125, 176, 232, 0.07));
  border-bottom: 1px solid var(--line);
}
.chat-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(125, 176, 232, 0.18); color: var(--accent);
  font-size: 1.05rem;
}
.chat-title { font-family: var(--font-display); font-size: 1.08rem; }
.chat-sub { font-size: 0.8rem; color: var(--muted); }

.chat-log {
  height: 300px;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble {
  max-width: 84%;
  padding: 0.65rem 1rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  animation: bubbleIn 0.3s ease;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.msg-bot .bubble {
  background: rgba(238, 242, 248, 0.06);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.msg-user .bubble {
  background: var(--accent); color: var(--bg);
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.bubble.error { border-color: rgba(232, 125, 125, 0.4); color: #eba9a9; }
.bubble code {
  font-size: 0.85em;
  background: rgba(238, 242, 248, 0.1);
  padding: 0.1em 0.35em; border-radius: 4px;
}
.bubble a { color: var(--accent); }

.bubble.typing { display: flex; gap: 5px; padding: 0.8rem 1rem; }
.bubble.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0 1.2rem 0.9rem;
}
.chat-suggestions.hidden { display: none; }
.suggestion {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--silver);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.suggestion:hover { border-color: var(--accent); color: var(--accent); }

.chat-form {
  display: flex; gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
  background: rgba(8, 14, 26, 0.4);
}
.chat-form input {
  flex: 1;
  font-family: var(--font-body); font-size: 0.94rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(238, 242, 248, 0.05);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(125, 176, 232, 0.15);
}
.chat-form input:disabled { opacity: 0.55; }
.chat-form button {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.chat-form button svg { width: 20px; height: 20px; }
.chat-form button:hover:not(:disabled) { background: var(--accent-soft); transform: scale(1.06); }
.chat-form button:disabled { opacity: 0.5; cursor: default; }

/* ============ Responsive ============ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; display: flex; flex-direction: column; align-items: center; }
  .hero-photo { order: 1; }
  .photo-frame { margin: 0 auto; max-width: min(300px, 66vw); }
  .lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .scroll-hint { display: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 0; right: 0;
    height: 100dvh; width: min(300px, 82vw);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem 2.4rem;
    background: var(--surface-1);
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--line);
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 110;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a { font-size: 1.12rem; }
  .logo-name { display: none; }
  .chat-log { height: 270px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-text > *, .hero-photo { opacity: 1; transform: none; }
}

/* ============ Floating "Ask my AI" button ============ */
.chat-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  isolation: isolate;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid rgba(125, 176, 232, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 27, 48, 0.94), rgba(11, 20, 36, 0.94));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(125, 176, 232, 0.06);
  transition: opacity 0.35s ease, transform 0.35s ease,
              border-color 0.3s ease, box-shadow 0.3s ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 20px rgba(125, 176, 232, 0.22);
}
/* Expanding halo ring behind the button */
.chat-fab::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  animation: fab-ring 2.4s cubic-bezier(0.25, 0.6, 0.4, 1) infinite;
}
@keyframes fab-ring {
  0%   { box-shadow: 0 0 0 0 rgba(125, 176, 232, 0.5); }
  75%  { box-shadow: 0 0 0 16px rgba(125, 176, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 176, 232, 0); }
}
.chat-fab-icon {
  color: var(--accent);
  font-size: 1.1rem; line-height: 1;
  animation: fab-twinkle 2.4s ease-in-out infinite;
}
@keyframes fab-twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.3); }
}
.chat-fab.is-hidden {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}
.chat-fab.is-hidden::after { animation: none; }
@media (max-width: 560px) {
  .chat-fab {
    width: 62px; height: 62px;
    padding: 0;
    display: grid; place-items: center;
  }
  .chat-fab-label { display: none; }
  .chat-fab-icon { font-size: 1.8rem; }
}
