/* =========================================================
   ALIREZA NEZAMI PORTFOLIO — style.css v2
   Design tokens · Layout · Apple-style transitions · RTL
   ========================================================= */

/* ─── DESIGN TOKENS ──────────────────────────────────── */
:root {
  --bg:           #0A0C10;
  --surface-rgb:  18, 21, 28;
  --surface:      #12151C;
  --surface-2:    #1A1E28;
  --surface-3:    #22273A;
  --text:         #EDEEF0;
  --text-muted:   #8A8F98;
  --kotlin:       #7F52FF;
  --flutter:      #13B9FD;
  --amber-accent: #FFB800;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(127,82,255,0.45);
  --card-bg:      rgba(18, 21, 28, 0.92);
  --glass-bg:     rgba(18, 21, 28, 0.42);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --radius:       16px;
  --radius-sm:    10px;
  --nav-h:        80px;
  --section-pad:  clamp(80px, 10vw, 140px);
  --container:    1300px;
  --gutter:       clamp(24px, 5vw, 72px);
  --dur:          0.55s;
}

[data-theme="light"] {
  --bg:           #F0F2F7;
  --surface-rgb:  255, 255, 255;
  --surface:      #FFFFFF;
  --surface-2:    #E8EDF5;
  --surface-3:    #DBE3F0;
  --text:         #0F172A;
  --text-muted:   #475569;
  --kotlin:       #6B38E8;
  --flutter:      #0288D1;
  --amber-accent: #D97706;
  --border:       rgba(0,0,0,0.08);
  --border-hover: rgba(107,56,232,0.4);
  --card-bg:      rgba(255, 255, 255, 0.94);
  --glass-bg:     rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ─── LIQUID GLASS MATERIAL SYSTEM ───────────────────── */
/* Drifting Background Color Orbs */
.liquid-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
  animation: orb-float 22s ease-in-out infinite alternate;
}
.orb-kotlin {
  width: 520px; height: 520px;
  background: var(--kotlin);
  opacity: 0.28;
  top: -120px; left: -100px;
  animation-duration: 25s;
}
.orb-flutter {
  width: 580px; height: 580px;
  background: var(--flutter);
  opacity: 0.24;
  bottom: 5%; right: -140px;
  animation-duration: 28s;
  animation-delay: -8s;
}
.orb-amber {
  width: 440px; height: 440px;
  background: var(--amber-accent);
  opacity: 0.14;
  top: 45%; left: 35%;
  animation-duration: 20s;
  animation-delay: -14s;
}
@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 90px) scale(1.1); }
  100% { transform: translate(-60px, -50px) scale(0.95); }
}

/* Tier 1 Glass Baseline */
.glass-surface {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  position: relative;
}

/* Specular Rim Light Layer */
.glass-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(127, 82, 255, 0.25) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.4s ease, background 0.4s ease;
}

.glass-surface:hover::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(19, 185, 253, 0.4) 50%, rgba(127, 82, 255, 0.5) 100%);
}

/* Tier 2 True Refraction (Chromium) */
@supports (backdrop-filter: url(#liquid-glass-filter)) or (-webkit-backdrop-filter: url(#liquid-glass-filter)) {
  .glass-tier-2 {
    backdrop-filter: url(#liquid-glass-filter) blur(20px) saturate(160%);
    -webkit-backdrop-filter: url(#liquid-glass-filter) blur(20px) saturate(160%);
  }
}

/* ─── RTL SUPPORT ────────────────────────────────────── */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .hero-content {
  margin-inline-start: 0;
  margin-inline-end: max(var(--gutter), calc((100vw - var(--container)) / 2 + 20px));
}
[dir="rtl"] .devices-wrapper {
  inset-inline-end: auto;
  inset-inline-start: max(60px, calc((100vw - var(--container)) / 2 + 20px));
}
[dir="rtl"] .nav-link::after { left: auto; right: 0; }
[dir="rtl"] .project-block--right .project-visual { order: initial; }
[dir="rtl"] .project-block--right .project-content { order: initial; }
[dir="rtl"] .project-block { direction: rtl; }
[dir="rtl"] .project-block--right { direction: ltr; }
[dir="rtl"] .footer-inner { flex-direction: row-reverse; }

/* Farsi font override */
[lang="fa"] body,
[lang="fa"] h1, [lang="fa"] h2, [lang="fa"] h3,
[lang="fa"] p, [lang="fa"] span, [lang="fa"] a {
  font-family: 'Vazirmatn', 'Inter', sans-serif !important;
}
/* Arabic font override */
[lang="ar"] body,
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3,
[lang="ar"] p, [lang="ar"] span, [lang="ar"] a {
  font-family: 'Amiri', 'Georgia', serif !important;
}
/* Urdu font override */
[lang="ur"] body,
[lang="ur"] h1, [lang="ur"] h2, [lang="ur"] h3,
[lang="ur"] p, [lang="ur"] span, [lang="ur"] a {
  font-family: 'Noto Nastaliq Urdu', 'Vazirmatn', 'Amiri', 'Inter', sans-serif !important;
}
/* Hindi font override */
[lang="hi"] body,
[lang="hi"] h1, [lang="hi"] h2, [lang="hi"] h3,
[lang="hi"] p, [lang="hi"] span, [lang="hi"] a {
  font-family: 'Noto Sans Devanagari', 'Inter', sans-serif !important;
}
/* Bengali font override */
[lang="bn"] body,
[lang="bn"] h1, [lang="bn"] h2, [lang="bn"] h3,
[lang="bn"] p, [lang="bn"] span, [lang="bn"] a {
  font-family: 'Noto Sans Bengali', 'Inter', sans-serif !important;
}
/* Chinese font override */
[lang="zh"] body,
[lang="zh"] h1, [lang="zh"] h2, [lang="zh"] h3,
[lang="zh"] p, [lang="zh"] span, [lang="zh"] a {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  overflow-x: hidden;
  /* Let JS handle scroll; no scroll-behavior here (breaks GSAP ST) */
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── RIPPLE CANVAS ──────────────────────────────────── */
#ripple-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  width: 100%;
  height: 100%;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
.section-heading {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-label {
  margin-bottom: 24px;
  display: inline-block;
}

.comment, .eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--kotlin);
  background: var(--glass-bg, rgba(18, 21, 28, 0.42));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.16));
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  cursor: pointer;
  user-select: none;
  opacity: 1;
}

.comment::before, .eyebrow-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flutter);
  box-shadow: 0 0 8px var(--flutter);
  flex-shrink: 0;
}

.comment:hover, .eyebrow-tag:hover {
  color: #FFFFFF;
  border-color: var(--kotlin);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(127, 82, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn > * {
  position: relative;
  z-index: 2;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  z-index: -1;
  pointer-events: none;
}
.btn-primary {
  background: linear-gradient(135deg, rgba(127, 82, 255, 0.92), rgba(19, 185, 253, 0.92));
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 28px rgba(127, 82, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary,
.btn-primary *,
.btn-primary:link,
.btn-primary:visited {
  color: #ffffff !important;
}
.btn-primary::before {
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
}
.btn-primary:hover {
  color: #ffffff !important;
  box-shadow: 0 14px 40px rgba(127, 82, 255, 0.6), 0 0 55px rgba(19, 185, 253, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-2px) scale(1.02);
}
.btn-primary:hover * {
  color: #ffffff !important;
}
.btn-primary:hover::before { opacity: 1; }
.btn-ghost {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.btn-ghost:hover {
  background: rgba(var(--surface-rgb), 0.65);
  color: var(--text);
  border-color: var(--border-hover);
  box-shadow: 0 10px 32px rgba(127, 82, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-large { padding: 18px 44px; font-size: 17px; }
.magnetic { will-change: transform; }

/* ─── NAV ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 12px;
  left: max(var(--gutter), calc((100vw - var(--container)) / 2 + 10px));
  right: max(var(--gutter), calc((100vw - var(--container)) / 2 + 10px));
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

@supports (backdrop-filter: url(#liquid-glass-filter)) or (-webkit-backdrop-filter: url(#liquid-glass-filter)) {
  #nav {
    backdrop-filter: url(#liquid-glass-filter) blur(24px) saturate(160%);
    -webkit-backdrop-filter: url(#liquid-glass-filter) blur(24px) saturate(160%);
  }
}

#nav.scrolled {
  background: rgba(var(--surface-rgb), 0.75);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.nav-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}
/* Logo icon mark */
.nav-logo-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-icon svg { width: 38px; height: 38px; overflow: visible; }
.nav-mark-initials {
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.nav-mark-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--flutter);
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-size: 16px; font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
  letter-spacing: -0.01em;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--kotlin), var(--flutter));
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1);
  border-radius: 2px;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }
.nav-cta {
  background: transparent;
  border: 1px solid rgba(127,82,255,0.4);
  color: var(--kotlin);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 15px; font-weight: 700;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}
.nav-cta:hover {
  background: var(--kotlin);
  color: #fff;
  border-color: var(--kotlin);
  box-shadow: 0 0 20px rgba(127,82,255,0.4);
}

/* Theme toggle */
.theme-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text); font-size: 18px;
  transition: all var(--dur);
}
.theme-toggle-btn:hover { border-color: var(--kotlin); transform: scale(1.08); }

/* Language dropdown */
.lang-select-wrap { position: relative; display: inline-flex; align-items: center; }
.lang-icon { position: absolute; left: 10px; pointer-events: none; color: var(--kotlin); z-index: 1; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 28px 8px 30px !important;
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; outline: none;
  transition: all var(--dur);
}
.lang-select-wrap::after {
  content: '▾';
  position: absolute;
  inset-inline-end: 10px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted); font-size: 11px;
}
.lang-select:hover { border-color: var(--flutter); }

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 32px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-link {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--text);
}
.mobile-controls { display: flex; align-items: center; gap: 16px; margin-top: 12px; }

/* ─── HERO SECTION ───────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100%;
  z-index: 0; pointer-events: none;
}
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1;
}

/* ── HERO VIDEO ILLUSTRATION ── */
.hero-video-container {
  position: absolute;
  inset-inline-end: max(40px, calc((100vw - var(--container)) / 2 + 20px));
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  max-width: 48vw;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-video-element {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 50px rgba(127, 82, 255, 0.35));
}

/* ─── TOP-RIGHT GAME CHALLENGE BOX & ANIMATED VECTOR ARROW ─── */
.hero-game-challenge {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  inset-inline-end: max(var(--gutter), calc((100vw - var(--container)) / 2 + 10px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 280px;
  animation: challenge-fade-in 1s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(-10px);
}

/* Animated Vector Arrow pointing dynamically to Game tab */
.dynamic-challenge-arrow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1005;
  overflow: visible;
}

.arrow-line-path,
.arrow-head-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-vector-arrow 3.5s infinite ease-in-out;
}

@keyframes draw-vector-arrow {
  0% {
    stroke-dashoffset: 600;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  50%, 75% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

/* Glowing Glass Challenge Box */
.challenge-card {
  background: var(--glass-bg, rgba(18, 21, 28, 0.84));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--kotlin, #7F52FF);
  box-shadow: 0 12px 36px rgba(127, 82, 255, 0.35), 0 0 20px rgba(127, 82, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 16px 18px;
  animation: challenge-glow-pulse 4s infinite ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.challenge-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 44px rgba(127, 82, 255, 0.5), 0 0 30px rgba(19, 185, 253, 0.4);
}

.challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(127, 82, 255, 0.18);
  border: 1px solid rgba(127, 82, 255, 0.35);
  color: var(--kotlin, #7F52FF);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.challenge-text {
  font-size: 0.875rem;
  color: var(--text, #EDEEF0);
  line-height: 1.45;
  margin-bottom: 12px;
}

.challenge-text strong {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.challenge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--kotlin, #7F52FF), var(--flutter, #13B9FD));
  color: #FFFFFF !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(127, 82, 255, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.challenge-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(19, 185, 253, 0.5);
}

@keyframes challenge-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes challenge-glow-pulse {
  0%, 100% {
    border-color: rgba(127, 82, 255, 0.5);
    box-shadow: 0 12px 36px rgba(127, 82, 255, 0.35), 0 0 20px rgba(127, 82, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    border-color: rgba(19, 185, 253, 0.8);
    box-shadow: 0 16px 44px rgba(19, 185, 253, 0.5), 0 0 30px rgba(19, 185, 253, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

/* Hero text */
.hero-content {
  position: relative; z-index: 3;
  padding: calc(var(--nav-h) + 60px) var(--gutter) 80px;
  max-width: min(640px, 55%);
  margin-inline-start: max(var(--gutter), calc((100vw - var(--container)) / 2 + 20px));
}
.hero-eyebrow { margin-bottom: 20px; }
.eyebrow-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--kotlin); background: rgba(127,82,255,0.12);
  border: 1px solid rgba(127,82,255,0.25);
  padding: 6px 14px; border-radius: 50px;
}
.hero-headline {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.025em; color: var(--text);
  margin-bottom: 24px;
}
.hero-headline .word {
  display: inline-block;
  opacity: 0; transform: translateY(30px);
  will-change: opacity, transform;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted); line-height: 1.6;
  margin-bottom: 40px; max-width: 520px;
  opacity: 0; will-change: opacity;
}
.typewriter-cursor {
  display: inline-block; width: 2px; height: 1.1em;
  background: var(--flutter); vertical-align: middle;
  margin-left: 2px; animation: blink 0.8s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
  will-change: opacity, transform;
}
.hero-scroll-hint {
  position: absolute;
  inset-inline-start: max(var(--gutter), calc((100vw - var(--container)) / 2 + 20px));
  bottom: 30px; display: flex; align-items: center; gap: 12px;
  opacity: 0; animation: hint-appear 1s 1.5s forwards;
}
.scroll-line {
  width: 1px; height: 40px; background: var(--text-muted); opacity: 0.4;
  animation: scroll-line 2s infinite; transform-origin: top;
}
.scroll-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em; color: var(--text-muted);
  text-transform: uppercase;
}
@keyframes hint-appear { to { opacity: 0.6; } }
@keyframes scroll-line {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(1.5); opacity: 1; }
}

/* ─── SCROLL REVEALS ─────────────────────────────────── */
.reveal-block, .reveal-project {
  opacity: 0;
  transform: translateY(44px);
  transition:
    opacity 0.75s cubic-bezier(0.16,1,0.3,1),
    transform 0.75s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.reveal-block.visible,
.reveal-project.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Profile card: scale entrance */
.profile-card {
  opacity: 0;
  transform: scale(0.93) translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1), transform 0.85s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.profile-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Project blocks: slide visual from one side, content from other. */
.project-block .project-visual {
  transform: translateX(-44px);
  transition: transform 0.75s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
}
.project-block--right .project-visual { transform: translateX(44px); }
.project-block .project-content {
  transform: translateX(44px);
  transition: transform 0.75s 0.1s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
}
.project-block--right .project-content { transform: translateX(-44px); }
.reveal-project.visible .project-visual,
.reveal-project.visible .project-content {
  transform: translateX(0);
}

/* Section heading underline sweep */
.section-heading-wrap { position: relative; display: inline-block; }
.section-heading-wrap::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 3px;
  background: linear-gradient(90deg, var(--kotlin), var(--flutter));
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal-block.visible .section-heading-wrap::after { width: 100%; }

/* ─── ABOUT ──────────────────────────────────────────── */
#about {
  padding: var(--section-pad) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center; margin-bottom: 60px;
}
.profile-card {
  width: 280px;
  height: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
  box-shadow: 0 20px 50px rgba(127,82,255,0.35);
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1), box-shadow 0.55s ease;
  margin: 0 auto;
}
.profile-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 25px 60px rgba(127,82,255,0.5);
}
.profile-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
}
.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.about-text p { color: var(--text-muted); font-size: clamp(1rem,1.5vw,1.1rem); line-height: 1.75; margin-bottom: 20px; }
.about-text p:last-child { margin-bottom: 0; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }

/* ── Eye-Catching Glowing Skill Tags ── */
@keyframes skill-glow-pulse {
  0%, 100% {
    border-color: rgba(127, 82, 255, 0.3);
    box-shadow: 0 0 6px rgba(127, 82, 255, 0.15);
    transform: translateY(0);
  }
  50% {
    border-color: var(--flutter);
    box-shadow: 0 0 16px rgba(19, 185, 253, 0.65), 0 0 28px rgba(127, 82, 255, 0.45);
    transform: translateY(-3px) scale(1.04);
  }
}
.skill-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--text);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  padding: 8px 16px; border-radius: 50px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: skill-glow-pulse 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.22s);
}

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.stat-card {
  background: var(--glass-inner-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 36px) clamp(20px, 3vw, 26px);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--kotlin), var(--flutter));
  opacity: 0.85;
}
.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(127, 82, 255, 0.35);
}
.stat-number-wrap {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.6rem, 4.8vw, 3.8rem);
  font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--kotlin), var(--flutter));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--text); font-weight: 700; letter-spacing: 0.06em; }

/* ─── PROJECTS ───────────────────────────────────────── */
#projects {
  padding: var(--section-pad) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
#projects > .section-heading { margin-bottom: 40px; }

.project-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
  margin-bottom: clamp(24px, 4vw, 44px);
  padding-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
}
.project-block:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.project-block--right .project-visual { order: 2; }
.project-block--right .project-content { order: 1; }

.project-visual {
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--surface-rgb), 0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius); padding: 32px 20px;
  min-height: 520px;
  transition: border-color var(--dur), box-shadow var(--dur);
  overflow: hidden;
}
.project-visual:hover { border-color: var(--border-hover); box-shadow: 0 20px 50px rgba(127,82,255,0.25); }

/* ── 9:16 Swiper Slider (Taller screenshot frame) ── */
.slider-916 {
  width: 270px;
  max-width: 100%;
  aspect-ratio: 9 / 18.5;
  max-height: 520px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
  position: relative;
  background: rgba(var(--surface-rgb), 0.4);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.slider-916:hover {
  border-color: var(--border-hover);
  box-shadow: 0 24px 60px rgba(127, 82, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.slider-916 .swiper-wrapper {
  height: 100%;
}
.slider-916 .swiper-slide {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-916 .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slider-916 .swiper-pagination {
  bottom: 10px !important;
}
.slider-916 .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.5;
  width: 7px;
  height: 7px;
  transition: all 0.3s ease;
}
.slider-916 .swiper-pagination-bullet-active {
  background: var(--flutter);
  opacity: 1;
  width: 18px;
  border-radius: 4px;
}

/* Project content */
.project-number { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--kotlin); margin-bottom: 8px; }
.project-title { font-family: 'Sora', sans-serif; font-size: clamp(1.7rem,3.5vw,2.4rem); font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.project-subtitle { font-size: 14px; color: var(--flutter); font-weight: 500; margin-bottom: 18px; }
.project-desc { color: var(--text-muted); font-size: 15px; line-height: 1.75; margin-bottom: 24px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.project-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-muted); background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px;
}
.project-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* See All Projects CTA */
.projects-cta {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding-top: 40px; text-align: center;
}
.projects-cta-sub { font-size: 14px; color: var(--text-muted); }

/* ─── REVIEWS ────────────────────────────────────────── */
/* ─── REVIEWS ────────────────────────────────────────── */
#reviews { padding: var(--section-pad) 0; overflow: hidden; background: transparent; }
.reviews-header { max-width: var(--container); margin: 0 auto 60px; padding: 0 var(--gutter); }
.marquee-container { display: flex; flex-direction: column; gap: 24px; width: 100%; background: transparent; }
.marquee-row { display: flex; overflow: hidden; user-select: none; width: 100%; background: transparent; }

.marquee-track-left {
  display: flex; gap: 24px; width: max-content;
  animation: marquee-left 40s linear infinite;
  will-change: transform;
  background: transparent;
}
.marquee-track-right {
  display: flex; gap: 24px; width: max-content;
  animation: marquee-right 40s linear infinite;
  will-change: transform;
  background: transparent;
}
.marquee-row:hover .marquee-track-left,
.marquee-row:hover .marquee-track-right {
  animation-play-state: paused;
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.review-card {
  width: clamp(340px, 40vw, 440px); flex-shrink: 0;
  background: var(--glass-inner-bg);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius); padding: 28px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur);
}
.review-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(127, 82, 255, 0.3);
}
.review-quote { font-size: 16px; line-height: 1.65; color: var(--text); margin-bottom: 24px; font-style: italic; }
.review-author-wrap, .review-author { display: flex; align-items: center; gap: 14px; }
.review-avatar, .review-avatar-img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--flutter);
  box-shadow: 0 4px 15px rgba(19,185,253,0.3);
}
.author-name { font-size: 15px; font-weight: 700; color: var(--text); }
.author-role { font-size: 13px; color: var(--text-muted); }

/* ─── RESUME ─────────────────────────────────────────── */
#resume {
  padding: var(--section-pad) var(--gutter);
  max-width: var(--container); margin: 0 auto;
}
.resume-card {
  background: var(--glass-inner-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 50px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px;
}
.resume-info h3 { font-family: 'Sora', sans-serif; font-size: clamp(1.5rem,3vw,2rem); font-weight: 800; margin-bottom: 10px; }
.resume-info p { color: var(--text-muted); font-size: 15px; max-width: 480px; }
.resume-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ─── CONTACT ────────────────────────────────────────── */
#contact {
  padding: var(--section-pad) var(--gutter);
  max-width: var(--container); margin: 0 auto;
}
.contact-inner {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px); align-items: start;
}
.contact-desc { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin-bottom: 32px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }

@keyframes button-stroke-glow-vertical {
  0% {
    border-color: rgba(127, 82, 255, 0.25);
    box-shadow: 0 0 6px rgba(127, 82, 255, 0.1);
    transform: translateY(0);
  }
  12% {
    border-color: var(--flutter);
    box-shadow: 0 0 24px rgba(19, 185, 253, 0.75), 0 0 38px rgba(127, 82, 255, 0.5), inset 0 0 16px rgba(19, 185, 253, 0.2);
    transform: translateY(-4px) scale(1.025);
  }
  28%, 100% {
    border-color: rgba(127, 82, 255, 0.25);
    box-shadow: 0 0 6px rgba(127, 82, 255, 0.1);
    transform: translateY(0);
  }
}

.contact-links .btn {
  border: 1px solid var(--glass-border);
  position: relative;
  animation: button-stroke-glow-vertical 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  justify-content: flex-start;
  padding: 14px 22px;
}

.contact-links .btn:nth-child(1) { animation-delay: 0s; }
.contact-links .btn:nth-child(2) { animation-delay: 1.5s; }
.contact-links .btn:nth-child(3) { animation-delay: 3.0s; }

.contact-links .btn:hover {
  animation-play-state: paused;
  border-color: var(--kotlin);
  box-shadow: 0 0 25px rgba(127, 82, 255, 0.8), 0 0 42px rgba(19, 185, 253, 0.55), inset 0 0 15px rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) scale(1.03);
}

.resume-preview-wrap {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  background: var(--surface);
}
.resume-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.rph-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.rph-link {
  font-size: 13px;
  color: var(--kotlin);
  font-weight: 600;
  transition: color 0.2s;
  text-decoration: none;
}
.rph-link:hover { color: var(--flutter); }
.resume-preview-body {
  width: 100%;
  height: 650px;
  background: #111;
}
.resume-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.calendly-inline-widget {
  min-width: 320px;
  width: 100% !important;
  height: 750px !important;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ─── FLOATING GLASS ASK AI WIDGET ──────────────────────── */
.ai-floating-widget {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 1100; /* above nav (1000) and ripple canvas, below mobile menu (9999) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px; /* gap between toggle btn and card when both visible */
}

/* Collapsed Toggle Button */
.ai-widget-toggle-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-bg, rgba(18, 21, 28, 0.75));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--text, #EDEEF0);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: phone-vibrate-ring 4s infinite ease-in-out;
}

.ai-widget-toggle-btn:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--kotlin, #7F52FF);
  box-shadow: 0 12px 32px rgba(127, 82, 255, 0.35);
  animation-play-state: paused;
}

.ai-toggle-sparkle {
  font-size: 1rem;
}

/* Floating Glass Card */
.ai-floating-card {
  width: min(320px, calc(100vw - 32px));
  background: var(--glass-bg, rgba(18, 21, 28, 0.78));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 18px 20px;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  animation: ai-card-glow-pulse 4s infinite ease-in-out;
}

.ai-floating-card:hover {
  animation-play-state: paused;
}

/* Attention Animation: Phone Ring Vibration + Neon Glow */
@keyframes phone-vibrate-ring {
  0%, 82%, 100% {
    transform: rotate(0deg) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: var(--glass-border, rgba(255, 255, 255, 0.2));
  }
  84% {
    transform: rotate(-5deg) scale(1.04);
    box-shadow: 0 12px 32px rgba(127, 82, 255, 0.6), 0 0 25px rgba(127, 82, 255, 0.7);
    border-color: var(--kotlin, #7F52FF);
  }
  86% {
    transform: rotate(5deg) scale(1.04);
    box-shadow: 0 12px 32px rgba(19, 185, 253, 0.6), 0 0 25px rgba(19, 185, 253, 0.7);
    border-color: var(--flutter, #13B9FD);
  }
  88% {
    transform: rotate(-4deg) scale(1.03);
    box-shadow: 0 12px 32px rgba(127, 82, 255, 0.6), 0 0 25px rgba(127, 82, 255, 0.7);
    border-color: var(--kotlin, #7F52FF);
  }
  90% {
    transform: rotate(4deg) scale(1.03);
    box-shadow: 0 12px 32px rgba(19, 185, 253, 0.6), 0 0 25px rgba(19, 185, 253, 0.7);
    border-color: var(--flutter, #13B9FD);
  }
  92% {
    transform: rotate(-2deg) scale(1.02);
    box-shadow: 0 10px 28px rgba(127, 82, 255, 0.4);
  }
  94% {
    transform: rotate(2deg) scale(1.01);
  }
  96% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes ai-card-glow-pulse {
  0%, 100% {
    border-color: var(--glass-border, rgba(255, 255, 255, 0.2));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    border-color: rgba(127, 82, 255, 0.6);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(127, 82, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

[data-theme="light"] .ai-floating-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Collapsed State */
.ai-floating-widget.collapsed .ai-floating-card {
  display: none;
}
.ai-floating-widget.collapsed .ai-widget-toggle-btn {
  display: flex;
}

.ai-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ai-floating-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-header-sparkle {
  font-size: 1.1rem;
}

.ai-floating-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text, #EDEEF0);
  line-height: 1.2;
}

.ai-widget-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #8A8F98);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.ai-widget-close-btn:hover {
  color: var(--text, #EDEEF0);
  background: rgba(255, 255, 255, 0.1);
}

.ai-floating-subtitle {
  font-size: 0.775rem;
  color: var(--text-muted, #8A8F98);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Vertical Stack of White Pills inside floating card */
.ai-floating-card .ai-platform-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-floating-card .ai-pill-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #FFFFFF;
  color: #0F172A !important;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-floating-card .ai-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.25);
}

.ai-floating-card .ai-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-floating-card .ai-pill-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.ai-floating-card .ai-pill-name {
  color: #0F172A;
  font-size: 0.85rem;
  font-weight: 600;
}

.ai-floating-card .ai-pill-arrow {
  font-size: 0.95rem;
  color: #64748B;
  font-weight: 700;
}

@media (max-width: 600px) {
  .ai-floating-widget {
    bottom: 20px;
    left: 16px;
  }
  .ai-floating-card {
    width: min(290px, calc(100vw - 32px));
  }
}

/* Toast Notification for Clipboard Copy */
.ai-toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--glass-bg, rgba(18, 21, 28, 0.92));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--kotlin, #7F52FF);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(127, 82, 255, 0.3);
  color: var(--text, #EDEEF0);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.ai-toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── FOOTER ─────────────────────────────────────────── */
#footer { border-top: 1px solid var(--border); padding: 40px var(--gutter); }
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-muted);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .devices-wrapper { inset-inline-end: var(--gutter); scale: 0.82; transform-origin: right center; }
  .hero-content { max-width: min(500px, 52%); }
  .about-grid { grid-template-columns: 1fr; }
  .profile-card { max-width: 300px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .devices-wrapper { display: none; }
  .hero-content { max-width: 100%; margin-inline-start: 0; padding-left: var(--gutter); padding-right: var(--gutter); }
  .about-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .project-block { grid-template-columns: 1fr; gap: 40px; }
  .project-block--right .project-visual { order: -1; }
  .project-block--right .project-content { order: 0; }
  .resume-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}
