:root {
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --accent-blue: #67e8f9;
  --accent-purple: #c4b5fd;
  --accent-glow: rgba(103, 232, 249, 0.22);
  --text-main: #f5f5f5;
  --text-muted: #a3a3a3;
  --font-main: 'Manrope', sans-serif;
  --font-heading: 'Sora', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, #181818 100%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 3.5rem;
  text-align: center;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-purple);
  text-shadow: 0 0 10px var(--accent-glow);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glassmorphism Utilities */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(46, 158, 247, 0.3);
  box-shadow: 0 10px 40px var(--accent-glow);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  background: var(--accent-blue);
  color: #071014;
  border: 1px solid rgba(255,255,255,0.16);
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, background 0.28s ease;
}

.btn:hover {
  background: #9ef5ff;
  box-shadow: 0 10px 24px rgba(103, 232, 249, 0.18);
  color: #071014;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  border-color: rgba(255,255,255,0.14);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  box-shadow: none;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

/* Section Spacing */
section {
  padding: 8rem 0;
}

/* Hero Section */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 6rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 6rem auto auto 6vw;
  width: min(34vw, 420px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.08);
  filter: blur(70px);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker {
  color: var(--accent-blue);
  font-weight: 800;
  margin-bottom: 1.15rem;
  animation: fadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  max-width: 780px;
  text-wrap: balance;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
  opacity: 0;
}

.hero-subtitle {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.65;
  margin-bottom: 1rem;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.16s forwards;
  opacity: 0;
}

.typing-container {
  font-family: 'Fira Code', monospace;
  font-size: clamp(0.92rem, 1.8vw, 1.1rem);
  color: var(--accent-blue);
  min-height: 1.8rem;
  margin-bottom: 1.6rem;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.45rem;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
  opacity: 0;
}

.hero-socials {
  display: flex;
  gap: 0.7rem;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.34s forwards;
  opacity: 0;
}

.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text-main);
  font-size: 1.18rem;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.28s ease, color 0.28s ease;
}

.hero-socials a:hover {
  background: var(--accent-blue);
  color: #071014;
  transform: translateY(-3px);
  box-shadow: none;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  animation: fadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.portrait-card {
  position: absolute;
  inset: 0 0 4.6rem 3.2rem;
  overflow: hidden;
  border-radius: 22px;
}

.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.03) contrast(1.04);
}

.proof-panel {
  position: absolute;
  left: 0;
  bottom: 6.5rem;
  width: min(270px, 72%);
  padding: 1rem;
}

.proof-panel span,
.proof-chip span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.proof-panel strong {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.25;
}

.proof-grid {
  position: absolute;
  right: 0.5rem;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 0.55rem;
  width: min(360px, 88%);
}

.proof-chip {
  padding: 0.8rem 0.7rem;
  border-radius: 12px;
  background: rgba(8, 13, 18, 0.78);
  border: 1px solid rgba(255,255,255,0.1);
}

.proof-chip strong {
  display: block;
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 0.25rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  pointer-events: none;
}

.about-text ul {
  list-style-type: none;
  margin-top: 1.5rem;
}

.about-text li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about-text li i {
  color: var(--accent-blue);
  margin-top: 5px;
}

/* Competencies Section */
.competencies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.competency-card {
  padding: 2rem;
  text-align: left;
}

.competency-icon {
  font-size: 2.5rem;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  background: -webkit-linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.competency-card ul {
  list-style: none;
  margin-top: 1rem;
}

.competency-card li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.competency-card li::before {
  content: '→';
  color: var(--accent-purple);
  font-size: 0.8rem;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.skill-bar {
  margin-bottom: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 4px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.badges-group {
  margin-bottom: 2rem;
}

.badges-group h4 {
  margin-bottom: 1rem;
  color: var(--text-main);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badges img {
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.badges img:hover {
  transform: scale(1.1);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.project-icon {
  font-size: 2rem;
  color: var(--accent-purple);
}

.project-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
}

.project-links a:hover {
  color: var(--accent-blue);
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--accent-blue);
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.stats-grid img {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
  border-radius: 10px;
}

/* Footer Section */
footer {
  padding: 4rem 0 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.philosophy {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-socials a {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.footer-socials a:hover {
  color: var(--accent-purple);
  transform: translateY(-3px);
}

.copyright {
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .about-grid, .skills-container {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .nav-links {
    display: none; /* Add mobile menu later if needed */
  }
}

/* Timeline Section */
.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-left {
  left: 0;
}

.timeline-right {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-primary);
  border: 3px solid var(--accent-blue);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-right::after {
  left: -8px;
}

.timeline-content {
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px var(--accent-glow);
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.timeline-content h4 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-family: var(--font-main);
  font-weight: 500;
}

.timeline-content p, .timeline-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-content ul {
  padding-left: 1.2rem;
  margin-top: 0.8rem;
  text-align: left;
}

.timeline-content li {
  margin-bottom: 0.5rem;
}

@media screen and (max-width: 768px) {
  .timeline::before {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-right {
    left: 0%;
  }
  .timeline-item::after {
    left: 23px;
  }
}

/* Certificates Grid */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.certificate-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cert-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cert-image-container i {
  font-size: 4rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.certificate-card:hover .cert-image-container img {
  transform: scale(1.05);
}

.certificate-card:hover .cert-image-container i {
  color: var(--accent-blue);
}

.cert-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cert-issuer {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Skill Pills Redesign */
.skills-category {
  margin-bottom: 2.5rem;
}

.skills-category h3 {
  margin-bottom: 1.5rem;
  color: var(--text-main);
  text-align: center;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.skill-pill {
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: var(--text-main);
}

.skill-pill i, .skill-pill img {
  font-size: 1.1rem;
  width: 16px;
  height: 16px;
}

.skill-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Contact Form */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}

.contact-container p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-control {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-control::placeholder {
  color: rgba(255,255,255,0.2);
}

.form-control:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.contact-form .btn {
  margin-top: 1rem;
  padding: 1rem;
  width: 100%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */

#chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
}

/* --- Bubble --- */
#chat-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #000;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  animation: chat-pulse 3s ease-in-out infinite;
}

#chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
}

@keyframes chat-pulse {
  0%,  100% { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 0   rgba(240,240,240,0.25); }
  50%        { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 10px rgba(240,240,240,0);   }
}

.chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* --- Panel --- */
#chat-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 360px;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.9) translateY(8px);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#chat-panel.chat-panel--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

/* --- Header --- */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.chat-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.2;
}

.chat-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

#chat-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

#chat-close-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

/* --- Messages --- */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scroll-behavior: smooth;
  min-height: 160px;
  max-height: 280px;
}

#chat-messages::-webkit-scrollbar        { width: 3px; }
#chat-messages::-webkit-scrollbar-track  { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.1); border-radius: 2px; }

.chat-msg {
  max-width: 86%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  word-wrap: break-word;
  animation: msg-in 0.18s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.chat-msg--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.chat-msg--user {
  align-self: flex-end;
  background: rgba(240, 240, 240, 0.12);
  border: 1px solid rgba(240, 240, 240, 0.15);
  color: var(--text-main);
  border-bottom-right-radius: 4px;
}

.chat-msg--typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.75rem 1rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: dot-bounce 1.2s infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

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

/* --- Suggestion chips --- */
#chat-suggestions {
  padding: 0.5rem 1rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  white-space: nowrap;
}

.chip:hover {
  background: rgba(240, 240, 240, 0.1);
  border-color: rgba(240, 240, 240, 0.25);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* --- Input --- */
#chat-form {
  padding: 0.65rem 1rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.chat-input-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

#chat-input::placeholder { color: var(--text-muted); opacity: 0.7; }

#chat-input:focus {
  border-color: rgba(240, 240, 240, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

#chat-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #000;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

#chat-send:hover  { transform: scale(1.08); box-shadow: 0 0 12px var(--accent-glow); }
#chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  min-height: 1.4em;
}
.form-status.success { color: #4ade80; }
.form-status.error   { color: #f87171; }

/* --- Mobile --- */
@media (max-width: 768px) {
  #chat-widget { bottom: 1rem; right: 1rem; }
  #chat-panel  { width: calc(100vw - 2rem); right: 0; bottom: 68px; }
  #chat-messages { max-height: 45vh; }
}

/* Recruiter-brand polish pass */
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2::after {
  width: 44px;
  height: 2px;
  background: var(--accent-blue);
  opacity: 0.9;
}

nav {
  padding: 0.85rem 0;
  background: rgba(9, 11, 15, 0.78);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.logo {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.nav-links {
  gap: 1.35rem;
}

.nav-links a {
  color: rgba(245,245,245,0.78);
  font-size: 0.94rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-blue);
  text-shadow: none;
}

section {
  padding: clamp(5.5rem, 10vw, 8rem) 0;
}

.about-text,
.timeline-content,
.certificate-card,
.project-card,
.competency-card {
  position: relative;
  overflow: hidden;
}

.about-text::before,
.timeline-content::before,
.certificate-card::before,
.project-card::before,
.competency-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(103,232,249,0.075), transparent 34%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.about-text:hover::before,
.timeline-content:hover::before,
.certificate-card:hover::before,
.project-card:hover::before,
.competency-card:hover::before {
  opacity: 1;
}

.about-image {
  border-radius: 18px;
}

.about-image img,
.about-image::after {
  border-radius: 18px;
}

.competencies-grid,
.certificates-grid {
  gap: clamp(1rem, 2vw, 1.5rem);
}

.competency-card,
.project-card {
  padding: clamp(1.35rem, 2.2vw, 1.8rem);
}

.competency-icon,
.project-icon {
  color: var(--accent-blue);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.project-card--featured {
  grid-column: span 2;
  min-height: 310px;
  background:
    linear-gradient(145deg, rgba(103, 232, 249, 0.12), rgba(255,255,255,0.035) 38%, rgba(196, 181, 253, 0.07)),
    rgba(255,255,255,0.035);
}

.project-card--featured .project-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
}

.project-card--featured .project-desc {
  font-size: 1rem;
  max-width: 68ch;
}

.project-header {
  position: relative;
  z-index: 1;
}

.project-links {
  display: flex;
  gap: 0.6rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 1.1rem;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.project-links a:hover {
  background: var(--accent-blue);
  color: #071014;
  transform: translateY(-2px);
  text-shadow: none;
}

.project-title,
.project-desc,
.project-tech {
  position: relative;
  z-index: 1;
}

.project-desc {
  line-height: 1.7;
}

.project-tech span {
  font-size: 0.76rem;
  line-height: 1;
  padding: 0.42rem 0.55rem;
  border-radius: 999px;
  background: rgba(103,232,249,0.09);
  border: 1px solid rgba(103,232,249,0.14);
}

.form-control {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.14);
  color: var(--text-main);
}

.form-control::placeholder {
  color: rgba(245,245,245,0.62);
}

.form-control:focus {
  border-color: rgba(103,232,249,0.72);
  box-shadow: 0 0 0 3px rgba(103,232,249,0.12);
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .hero-visual {
    min-height: 480px;
    max-width: 520px;
    width: 100%;
  }

  .portrait-card {
    inset: 0 0 4.6rem 2rem;
  }

  .project-card--featured {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 7rem;
  }

  .hero-title {
    font-size: clamp(2.45rem, 13vw, 3.8rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 420px;
  }

  .portrait-card {
    inset: 0 0 5.2rem 0;
  }

  .proof-panel {
    bottom: 5.4rem;
    width: min(250px, 82%);
  }

  .proof-grid {
    left: 0;
    right: 0;
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 1.1rem;
  }

  .hero-title {
    letter-spacing: -0.025em;
  }

  .hero-visual {
    min-height: 360px;
  }

  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .proof-chip {
    padding: 0.7rem 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* Final theme overrides */
body {
  background-image:
    radial-gradient(circle at 8% 18%, rgba(103, 232, 249, 0.12) 0%, transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(196, 181, 253, 0.12) 0%, transparent 32%),
    radial-gradient(circle at 62% 88%, rgba(45, 212, 191, 0.08) 0%, transparent 36%),
    linear-gradient(135deg, #0d0f12 0%, #14161d 52%, #101114 100%);
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.28);
  box-shadow: 0 12px 34px rgba(0,0,0,0.22);
}
/* Hero fit and contrast refinements */
.hero-title,
.hero-subtitle,
.typing-container,
.hero-actions,
.hero-socials,
.hero-visual {
  opacity: 1;
}

.hero-title {
  font-size: clamp(3.4rem, 6.4vw, 5.4rem);
  max-width: 720px;
}

.hero-subtitle {
  color: rgba(245,245,245,0.78);
  max-width: 62ch;
}

.portrait-card img {
  filter: brightness(1.18) saturate(1.08) contrast(1.05);
}

.proof-panel,
.proof-chip {
  background: rgba(8, 13, 18, 0.88);
}

.proof-panel span,
.proof-chip span {
  color: rgba(245,245,245,0.68);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2.7rem, 12vw, 3.45rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.55;
  }

  .typing-container {
    min-height: 1.4rem;
    margin-bottom: 1.1rem;
  }
}