/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  --bg:        #050508;
  --bg2:       #0c0c16;
  --surface:   rgba(255, 255, 255, 0.03);
  --border:    rgba(99, 102, 241, 0.18);
  --accent:    #6366f1;
  --accent2:   #8b5cf6;
  --glow:      rgba(99, 102, 241, 0.35);
  --txt:       #f1f5f9;
  --txt2:      #94a3b8;
  --txt3:      #475569;
  --radius:    14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip; /* clip is safer than hidden — won't break sticky/fixed */
  scroll-padding-top: 90px;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: clip;
  max-width: 100vw;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

img { max-width: 100%; display: block; }

strong { color: var(--txt); font-weight: 600; }

section {
  padding: 100px 0;
  position: relative;
  overflow: hidden; /* prevent any child from leaking horizontally */
}

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

/* ─── GRADIENT TEXT ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── SECTION TITLE ─── */
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-sub {
  text-align: center;
  color: var(--txt2);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  max-width: 560px;
  margin: -36px auto 48px;
  padding: 0 16px;
}

/* ─── NAVBAR ─── */
#navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(900px, calc(100% - 32px));
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 20px;
  gap: 16px;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--txt2);
  padding: 7px 14px;
  border-radius: 50px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.06);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--txt2);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 8, 0.97);
  backdrop-filter: blur(24px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--txt2);
  padding: 12px 40px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.05);
}

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  overflow: hidden;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blob-drift 10s ease-in-out infinite alternate;
}

/* ─── BLOB BACKGROUND ─── */
.blob-1 {
  width: min(600px, 80vw); height: min(600px, 80vw);
  background: radial-gradient(circle, #6366f1, transparent);
  top: -20%; left: -10%;
  animation-delay: 0s;
}

.blob-2 {
  width: min(500px, 70vw); height: min(500px, 70vw);
  background: radial-gradient(circle, #8b5cf6, transparent);
  bottom: -10%; right: -10%;
  animation-delay: -4s;
}

/* fix blob-3: keyframes will override the translate(-50%,-50%) so use wrapper approach */
.blob-3 {
  width: min(400px, 60vw); height: min(400px, 60vw);
  background: radial-gradient(circle, #4f46e5, transparent);
  top: 50%; left: 50%;
  margin-top: calc(min(400px, 60vw) / -2);
  margin-left: calc(min(400px, 60vw) / -2);
  animation-delay: -7s;
  opacity: 0.1;
}

/* Blob animation — Y-axis only to prevent horizontal overflow */
@keyframes blob-drift {
  0%   { transform: scale(1)         translateY(0); }
  50%  { transform: scale(1.05)      translateY(-30px); }
  100% { transform: scale(0.95)      translateY(20px); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  padding: 0 24px;
  margin: 0 auto;
  text-align: left;
}



/* Hero Text */
.hero-greeting {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-title-wrap {
  font-size: clamp(0.95rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--txt2);
  height: 2rem;
  margin-bottom: 24px;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-summary {
  color: var(--txt2);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--txt3);
}

.meta-item.available { color: #4ade80; }

.meta-item .dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* ─── HERO CULTURES ROW ─── */
.hero-cultures {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.cultures-label {
  font-size: 0.8rem;
  color: var(--txt3);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cultures-flags {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cultures-flags span {
  font-size: 1.4rem;
  line-height: 1;
  cursor: default;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: grayscale(20%);
}

.cultures-flags span:hover {
  transform: translateY(-3px) scale(1.2);
  filter: grayscale(0%) drop-shadow(0 4px 8px rgba(99, 102, 241, 0.5));
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 28px;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--txt2);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 28px;
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.btn-outline:hover {
  color: var(--txt);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 28px;
  border-radius: 50px;
  border: 1.5px solid var(--accent);
  transition: var(--transition);
  text-decoration: none;
}

.btn-cv:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* ─── HERO PHOTO COLUMN ─── */

/* Animated gradient border wrapper */
.hp-border-wrap {
  position: relative;
  border-radius: 28px;
  padding: 3px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
  background-size: 300% 300%;
  animation: gradient-spin 4s linear infinite;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.35), 0 0 80px rgba(139, 92, 246, 0.15);
  width: 100%;
  max-width: 300px;
}

@keyframes gradient-spin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hp-photo-inner {
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
}

.hp-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.hp-border-wrap:hover .hp-photo {
  transform: scale(1.03);
}

/* ─── FLOATING STAT BADGES ─── */
.hp-badge {
  position: absolute;
  background: rgba(8, 8, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  min-width: 80px;
}

.hp-badge-1 {
  top: 20px; right: -8px;
  animation: badge-float 3.2s ease-in-out infinite;
}
.hp-badge-2 {
  bottom: 50px; left: -8px;
  animation: badge-float 3.8s ease-in-out infinite 0.8s;
}
.hp-badge-3 {
  top: 46%; right: -10px;
  animation: badge-float 3.5s ease-in-out infinite 1.5s;
}
.hp-badge-4 {
  bottom: 16px; right: -8px;
  animation: badge-float 4s ease-in-out infinite 0.4s;
  min-width: 100px;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-7px); }
}

.hp-badge-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.hp-badge-lbl {
  font-size: 0.68rem;
  color: var(--txt3);
  white-space: nowrap;
  font-weight: 500;
}

.hp-badge-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.hp-badge-flags {
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 1px;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--txt3);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { opacity: 1; transform: scaleY(1) translateY(0); }
  100% { opacity: 0; transform: scaleY(0.5) translateY(20px); }
}

/* ─── ABOUT ─── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 56px;
  align-items: start;
}

/* ─── ABOUT PHOTO ─── */
.about-photo-col {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.photo-frame {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.photo-border {
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,0.15), transparent);
  z-index: 0;
}

.about-lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 500;
  color: var(--txt);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-body {
  color: var(--txt2);
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.8;
  margin-bottom: 36px;
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition);
}

.stat-box:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
}

.stat-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--txt3);
  margin-top: 4px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--txt2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
}

/* ─── SKILLS ─── */
#skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), transparent);
  opacity: 0;
  transition: var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.skill-card:hover::before { opacity: 1; }

.skill-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  font-size: 0.8rem;
  color: var(--txt2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  transition: var(--transition);
}

.skill-card:hover .skill-tags span {
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--txt);
}

/* ─── EXPERIENCE (TIMELINE) ─── */
#experience { background: var(--bg2); }

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(99,102,241,0.1));
}

.tl-item {
  position: relative;
  padding-left: 64px;
  margin-bottom: 40px;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: 12px;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1;
}

.tl-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: var(--transition);
}

.tl-item:hover .tl-dot {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: var(--transition);
}

.tl-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
  /* removed translateX to prevent horizontal overflow on mobile */
}

.tl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tl-head h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--txt);
}

.tl-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.3);
}

.tl-company {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.tl-date {
  font-size: 0.8125rem;
  color: var(--txt3);
  margin-bottom: 14px;
}

.tl-card ul { padding: 0; }

.tl-card ul li {
  font-size: 0.9rem;
  color: var(--txt2);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}

.tl-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 2px;
}

/* ─── PROJECTS ─── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Featured / key projects — accent border top */
.proj-card--featured {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99,102,241,0.06), var(--surface));
}

.proj-card--featured::before {
  content: '★ Key Project';
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.8;
}

.proj-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transition: var(--transition);
}

.proj-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.12);
}

.proj-card:hover::after { transform: scaleX(1); }

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.proj-icon { font-size: 2rem; }

.proj-year {
  font-size: 0.75rem;
  color: var(--txt3);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 3px 10px;
}

.proj-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--txt);
}

.proj-card p {
  font-size: 0.875rem;
  color: var(--txt2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.proj-tags span {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  padding: 3px 9px;
}

.proj-services {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-services li {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.4;
}
.proj-services li strong { color: var(--text); }

/* ─── CONTACT ─── */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.contact-card.no-link { cursor: default; }
.contact-card.no-link:hover { transform: none; box-shadow: none; }

.contact-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: var(--transition);
}

.contact-card:hover .contact-icon-wrap {
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.contact-info { display: flex; flex-direction: column; gap: 4px; }

.contact-label {
  font-size: 0.75rem;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.contact-value {
  font-size: 0.875rem;
  color: var(--txt2);
  word-break: break-all;
  overflow-wrap: anywhere;
}

.contact-card:hover .contact-value { color: var(--txt); }

/* ─── FOOTER ─── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--txt3);
}

/* ─── SCROLL REVEAL ANIMATIONS ─── */
[data-reveal],
[data-reveal-right] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal].visible,
[data-reveal-right].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── SCROLL PROGRESS BAR ─── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
  z-index: 9999;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ─── HERO ENTRANCE STAGGER ─── */
.hero-stagger {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-stagger.hero-visible {
  opacity: 1;
  transform: translateY(0);
}



#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#hero-particles.visible {
  opacity: 1;
}

/* ─── CUSTOM CURSOR (desktop only) ─── */
#cursor-dot {
  position: fixed;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, background 0.2s ease;
  mix-blend-mode: screen;
}

#cursor-ring {
  position: fixed;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(99, 102, 241, 0.55);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.25s ease, height 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
}

#cursor-ring.hovering {
  width: 50px; height: 50px;
  border-color: rgba(139, 92, 246, 0.8);
  background: rgba(99, 102, 241, 0.05);
}

@media (hover: none) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ─── TIMELINE LINE DRAW ─── */
.tl-line-fill {
  position: absolute;
  left: 20px;
  top: 0;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent), rgba(99, 102, 241, 0.1));
  transition: height 1.6s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 0;
}

/* hide the CSS ::before since JS injects .tl-line-fill */
.timeline::before { display: none; }

/* ─── SECTION TITLE SHIMMER ─── */
@keyframes title-shimmer {
  0%   { text-shadow: none; }
  35%  { text-shadow: 0 0 24px rgba(99, 102, 241, 0.7), 0 0 60px rgba(139, 92, 246, 0.35); }
  100% { text-shadow: none; }
}

.section-title.shimmering {
  animation: title-shimmer 1.6s ease forwards;
}

/* ─── MAGNETIC BUTTON (cursor follows) ─── */
.magnetic {
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow var(--transition);
  will-change: transform;
}

/* ─── STAGGER DELAY HELPERS (used by JS) ─── */
.stagger-1  { transition-delay: 0.05s !important; }
.stagger-2  { transition-delay: 0.12s !important; }
.stagger-3  { transition-delay: 0.19s !important; }
.stagger-4  { transition-delay: 0.26s !important; }
.stagger-5  { transition-delay: 0.33s !important; }
.stagger-6  { transition-delay: 0.40s !important; }
.stagger-7  { transition-delay: 0.47s !important; }

/* ─── RESPONSIVE ─── */

/* Tablet landscape (≤1100px) */
@media (max-width: 1100px) {
  .skills-grid   { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid     { gap: 32px; }
}

/* Tablet portrait (≤900px): stack hero */
@media (max-width: 900px) {
  section { padding: 80px 0; }

  .hero-grid     { text-align: center; }
  .hero-meta      { justify-content: center; }
  .hero-cultures  { justify-content: center; }
  .hero-cta       { justify-content: center; }
  .hero-summary   { margin: 0 auto 28px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-photo-col { display: flex; justify-content: center; }
  .photo-frame { max-width: 220px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Large phone (≤768px) */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  #navbar { top: 12px; }

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

  .timeline::before { left: 14px; }
  .tl-item { padding-left: 44px; }
  .tl-dot  { left: 6px; }

  .section-title { margin-bottom: 40px; }
  .scroll-hint   { display: none; }
}

/* Small phone (≤480px) */
@media (max-width: 480px) {
  section { padding: 64px 0; }

  .container { padding: 0 16px; }

  .hero-name { font-size: clamp(2.4rem, 10vw, 3.5rem); }

  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-num  { font-size: 1.4rem; }

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

  .badge-row { flex-direction: column; }

  .tl-card { padding: 18px 16px; }

  .proj-card   { padding: 20px 18px; }
  .skill-card  { padding: 20px 18px; }

  .nav-inner { padding: 8px 14px; }

  .btn-primary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .hero-cta      { flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto; }
  .hero-cta .btn-primary,
  .hero-cta .btn-cv,
  .hero-cta .btn-outline { width: 100%; justify-content: center; }
  .hero-cultures { flex-direction: column; align-items: center; gap: 8px; }

  /* Hide floating badges on very small screens */
  .hp-badge { display: none; }
  .hp-border-wrap { max-width: 220px; }
}

/* Very small phone (≤360px) */
@media (max-width: 360px) {
  .hero-name { font-size: 2.2rem; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   CHATBOT WIDGET
   ═══════════════════════════════════════════ */

/* Toggle button */
#cb-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease;
  color: #fff;
}

#cb-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 32px rgba(99, 102, 241, 0.7);
}

/* Icon toggle */
#cb-toggle .cb-icon-chat  { display: block; font-size: 1.5rem; transition: opacity 0.2s, transform 0.2s; }
#cb-toggle .cb-icon-close { display: none;  opacity: 0; font-size: 1.4rem; transform: rotate(-90deg); transition: opacity 0.2s, transform 0.3s; }

#cb-toggle.cb-active .cb-icon-chat  { display: none; opacity: 0; }
#cb-toggle.cb-active .cb-icon-close { display: block; opacity: 1; transform: rotate(0deg); }

/* Pulse ring on button */
#cb-toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.4);
  animation: cb-pulse 2s ease-in-out infinite;
}

@keyframes cb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.2); opacity: 0; }
}

/* Chat window */
#cb-window {
  position: fixed;
  bottom: 104px;
  right: 28px;
  z-index: 8999;
  width: min(380px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 140px));
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(.34,1.56,.64,1);
  transform-origin: bottom right;
}

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

/* Header */
.cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cb-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.cb-header-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--txt1);
}

.cb-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--txt3);
  margin-top: 2px;
}

.cb-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
  animation: cb-online 2s ease-in-out infinite;
}

@keyframes cb-online {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

#cb-close {
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

#cb-close:hover {
  color: var(--txt1);
  background: rgba(255,255,255,0.06);
}

/* Message log */
.cb-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.cb-log::-webkit-scrollbar { width: 4px; }
.cb-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Messages */
.cb-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: cb-msg-in 0.25s ease;
}

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

.cb-user { flex-direction: row-reverse; }

.cb-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}

.cb-bot .cb-bubble {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--txt1);
  border-bottom-left-radius: 4px;
}

.cb-user .cb-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing dots */
.cb-typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.cb-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: cb-dot 1.2s ease-in-out infinite;
}

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

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

/* Quick chips */
.cb-chips {
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cb-chip {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.75rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.cb-chip:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Input row */
.cb-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 14px;
  flex-shrink: 0;
}

#cb-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--txt1);
  font-size: 0.875rem;
  font-family: inherit;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s;
}

#cb-input::placeholder { color: var(--txt3); }
#cb-input:focus { border-color: var(--accent); }

#cb-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

#cb-send:hover { transform: scale(1.1); }
#cb-send:active { transform: scale(0.95); opacity: 0.8; }

/* Mobile adjustments */
@media (max-width: 480px) {
  #cb-toggle { bottom: 20px; right: 16px; }
  #cb-window { bottom: 92px; right: 16px; }
  #cb-nudge  { right: 16px; bottom: 92px; max-width: calc(100vw - 96px); }
}

/* ─── NUDGE NOTIFICATION BUBBLE ─── */
#cb-nudge {
  position: fixed;
  bottom: 104px;
  right: 28px;
  z-index: 9001;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px 10px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--txt1);
  font-weight: 500;
  /* entrance */
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}

#cb-nudge.cb-nudge-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

#cb-nudge.cb-nudge-hide {
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  pointer-events: none;
}

/* accent left border */
#cb-nudge::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2));
}

/* little tail pointing to button */
#cb-nudge::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 22px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 0 solid transparent;
  border-top: 8px solid var(--border);
}

#cb-nudge-close {
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
#cb-nudge-close:hover { color: var(--txt1); }

/* ─── SOCIAL SIDEBAR ─── */
.social-sidebar {
  position: fixed;
  left: 24px;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.social-sidebar__link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt2);
  font-size: 1rem;
  border-radius: 8px;
  transition: color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  text-decoration: none;
}

.social-sidebar__link:hover {
  color: var(--accent);
  transform: translateY(-4px);
}

/* Tooltip */
.social-sidebar__link::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg2);
  color: var(--txt1);
  font-size: 0.72rem;
  font-family: var(--font-body);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.social-sidebar__link:hover::after {
  opacity: 1;
}

.social-sidebar__line {
  display: block;
  width: 1px;
  height: 80px;
  background: var(--border);
  margin-top: 4px;
}

/* Hide on small screens */
@media (max-width: 900px) {
  .social-sidebar { display: none; }
}
