*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
:root {
  --font-en:
    "Inter",
    -apple-system,
    sans-serif;
  --font-fa:
    "Vazirmatn",
    "Inter",
    Tahoma,
    sans-serif;
  --radius-lg: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --blur: 4px;
  --blur-hover: 6px;
  --navbar-blur: 26px;
  --ease-soft: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --ease: 0.3s ease;
  --stop-ice: #D3E8FF;
  --stop-blue: #C7E2FE;
  --stop-sky: #C4EBFC;
  --stop-turquoise: #BEEFEA;
  --stop-mint: #C2F2E0;
  --text-primary: #241F33;
  --text-secondary: #5B5570;
  --accent-a: #5B34D6;
  --accent-rgb:
    91,52,214;
  --ic-1: #5B34D6;
  --ic-2: #29B6F6;
  --ic-3: #26A69A;
  --ic-4: #FF8A65;
  --accent-b: #29B6F6;
  --glass-bg: rgba(255,255,255,0.46);
  --glass-bg-strong: rgba(255,255,255,0.68);
  --glass-border: rgba(255,255,255,0.65);
  --shadow-card: 0 12px 36px rgba(65,45,110,0.18);
  --shadow-card-hover: 0 26px 58px rgba(65,45,110,0.3);
  --navbar-h: 72px;
}
[data-theme=dark] {
  --text-primary: #EEF2F8;
  --text-secondary: #B3C0D2;
  --accent-a: #7DB3EA;
  --accent-b: #4A8BD0;
  --accent-deep: #3A78BF;
  --accent-rgb:
    58,120,191;
  --ic-1: #2F6DB5;
  --ic-2: #4FA3D9;
  --ic-3: #3A8F9E;
  --ic-4: #C09A5B;
  --glass-bg: rgba(255,255,255,0.07);
  --glass-bg-strong: rgba(255,255,255,0.11);
  --glass-border: rgba(255,255,255,0.16);
  --shadow-card: 0 14px 42px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  --shadow-card-hover: 0 30px 64px rgba(58,120,191,0.34), inset 0 1px 0 rgba(255,255,255,0.14);
  --bg-dark-1: #0f1b2d;
  --bg-dark-2: #172a45;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-en);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  transition: color var(--ease);
}
[dir=rtl] body {
  font-family: var(--font-fa);
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
}
p {
  margin: 0;
}
.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}
.section {
  padding-block: clamp(64px, 8vw, 96px);
  position: relative;
}
.section.alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.32),
      rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}
[data-theme=dark] .section.alt::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0));
}
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: clamp(28px, 4vw, 44px);
  background:
    linear-gradient(
      90deg,
      var(--accent-a),
      var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    background var(--ease);
  will-change: transform;
}
.btn-primary {
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
  color: #fff;
  box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(var(--accent-rgb), 0.4);
}
.btn-ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  transition:
    transform 0.3s ease,
    background var(--ease-soft),
    backdrop-filter var(--ease-soft);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-hover));
  -webkit-backdrop-filter: blur(var(--blur-hover));
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.32);
  transition: transform var(--ease), box-shadow var(--ease);
  will-change: transform;
}
.pill-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(var(--accent-rgb), 0.45);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-b);
  outline-offset: 3px;
  border-radius: 6px;
}
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      125deg,
      var(--stop-ice),
      var(--stop-blue));
  transition: background 0.6s ease;
}
.bg-layer::before {
  content: "";
  position: absolute;
  inset: -10% -10%;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(30, 110, 200, 0.2),
      transparent 45%),
    radial-gradient(
      circle at 80% 15%,
      rgba(13, 71, 161, 0.3),
      transparent 45%),
    radial-gradient(
      circle at 22% 82%,
      rgba(0, 77, 64, 0.28),
      transparent 45%),
    radial-gradient(
      circle at 85% 78%,
      rgba(2, 95, 110, 0.24),
      transparent 45%);
  mix-blend-mode: multiply;
  transform: translateY(var(--blob-shift, 0px));
  transition: transform 0.6s ease;
}
[data-theme=dark] .bg-layer {
  overflow: hidden;
}
[data-theme=dark] .bg-layer::before {
  inset: auto;
  left: 0;
  right: 0;
  top: 0;
  height: 300%;
  background:
    linear-gradient(
      180deg,
      #0f1b2d 0%,
      #152842 34%,
      #1c3358 68%,
      #2a4070 100%);
  mix-blend-mode: normal;
  transform: translate3d(0, calc(var(--bg-progress, 0) * -66.667%), 0);
  transition: none;
  will-change: transform;
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.25),
      transparent 60%);
}
[data-theme=dark] .bg-layer {
  background:
    linear-gradient(
      160deg,
      var(--bg-dark-1),
      var(--bg-dark-2));
}
[data-theme=dark] .bg-layer::after {
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(70, 130, 210, 0.24),
      transparent 42%),
    radial-gradient(
      circle at 82% 12%,
      rgba(90, 150, 225, 0.16),
      transparent 42%),
    radial-gradient(
      circle at 25% 85%,
      rgba(75, 115, 195, 0.22),
      transparent 45%),
    radial-gradient(
      circle at 88% 80%,
      rgba(100, 140, 210, 0.16),
      transparent 42%);
  animation: darkGlowBreathe 12s ease-in-out infinite;
}
@keyframes darkGlowBreathe {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-h);
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.32),
      rgba(255, 255, 255, 0.14));
  backdrop-filter: blur(var(--navbar-blur));
  -webkit-backdrop-filter: blur(var(--navbar-blur));
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 32px rgba(65, 45, 110, 0.08);
  transition: background var(--ease), box-shadow var(--ease);
}
[data-theme=dark] .navbar {
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.02));
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 32px rgba(0, 0, 0, 0.45);
}
.navbar.scrolled {
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 30px rgba(60, 40, 100, 0.12);
}
[data-theme=dark] .navbar.scrolled {
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 10px 30px rgba(0, 0, 0, 0.5);
}
.nav-inner {
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.6vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand {
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.4;
  background:
    linear-gradient(
      100deg,
      var(--accent-a),
      var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[dir=rtl] .nav-brand {
  font-family: "Lalezar", var(--font-fa);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.5;
  letter-spacing: 0;
}
@media (max-width: 1100px) {
  [dir=rtl] .nav-brand {
    font-size: 1.35rem;
  }
}
.nav-links {
  --nl-pad: clamp(8px, 1.1vw, 14px);
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.3vw, 4px);
  margin-inline: auto;
  min-width: 0;
  padding: 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links li {
  flex-shrink: 0;
}
.nav-links a {
  position: relative;
  display: block;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.05vw, 0.95rem);
  color: var(--text-primary);
  padding: 8px var(--nl-pad);
  border-radius: var(--radius-pill);
  transition: background var(--ease-soft), color 0.3s ease;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.4);
}
[data-theme=dark] .nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: var(--nl-pad);
  right: var(--nl-pad);
  bottom: 2px;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      var(--accent-a),
      var(--accent-b));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
[dir=rtl] .nav-links a::after {
  transform-origin: right;
}
.nav-links a.active {
  color: var(--accent-a);
}
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0.14));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(65, 45, 110, 0.1);
  color: var(--text-primary);
  transition:
    transform 0.3s ease,
    background var(--ease-soft),
    backdrop-filter var(--ease-soft);
}
[data-theme=dark] .icon-btn {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.icon-btn:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.26));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
[data-theme=dark] .icon-btn:hover {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.06));
}
.lang-btn {
  font-weight: 700;
  font-size: 0.8rem;
  width: auto;
  gap: 6px;
  padding-inline: 14px;
  border-radius: var(--radius-pill);
}
.lang-btn i {
  font-size: 0.85rem;
}
@keyframes iconSwap {
  from {
    transform: rotate(-90deg) scale(0.4);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}
.icon-swap {
  animation: iconSwap 0.4s ease;
}
@media (max-width: 860px) {
  :root {
    --navbar-h: 0px;
  }
  .navbar,
  .navbar.scrolled,
  [data-theme=dark] .navbar,
  [data-theme=dark] .navbar.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }
  .nav-inner {
    position: relative;
    width: fit-content;
    max-width: calc(100% - 24px);
    height: auto;
    margin-inline: auto;
    padding: 5px 6px;
    gap: 6px;
    justify-content: center;
    border-radius: var(--radius-pill);
    background:
      linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.62),
        rgba(255, 255, 255, 0.34));
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 20px rgba(40, 70, 120, 0.16);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    pointer-events: auto;
  }
  [data-theme=dark] .nav-inner {
    background:
      linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.13),
        rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.5);
  }
  .navbar.scrolled .nav-inner {
    background:
      linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.78),
        rgba(255, 255, 255, 0.5));
  }
  [data-theme=dark] .navbar.scrolled .nav-inner {
    background:
      linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.17),
        rgba(255, 255, 255, 0.08));
  }
  .nav-links {
    display: none;
  }
  .nav-brand {
    font-size: 0.92rem;
    padding-inline: 8px 4px;
  }
  [dir=rtl] .nav-brand {
    font-size: 1.2rem;
    padding-inline: 8px 4px;
  }
  .nav-controls {
    gap: 6px;
  }
  .nav-controls .icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text-primary);
  }
  [data-theme=dark] .nav-controls .icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .nav-controls .icon-btn:hover {
    transform: none;
  }
  .nav-controls .lang-btn {
    width: auto;
    padding-inline: 12px;
  }
  .hero.container {
    padding-top: 80px;
  }
  section[id] {
    scroll-margin-top: 64px;
  }
}
.hero {
  min-height: calc(100svh - var(--navbar-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 40px);
  padding-block: clamp(48px, 8vw, 90px);
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  width: 100%;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  flex: 1 1 420px;
  min-width: 280px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
  background:
    linear-gradient(
      100deg,
      var(--accent-a),
      var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 46ch;
}
.hero .intro {
  color: var(--text-secondary);
  max-width: 60ch;
  font-size: 1rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hero-photo {
  flex-shrink: 0;
  width: clamp(180px, 22vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      var(--accent-a),
      var(--accent-b));
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-card-hover), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto 0;
}
[data-theme=dark] .hero-photo {
  background:
    linear-gradient(
      145deg,
      #14304D,
      #2D6FA3);
  border-color: rgba(255, 255, 255, 0.16);
}
.hero-photo i {
  font-size: clamp(3.2rem, 8vw, 5rem);
  color: rgba(255, 255, 255, 0.8);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.99) saturate(1.03);
}
@media (max-width: 640px) {
  .hero-inner {
    justify-content: center;
    text-align: center;
  }
  .hero-text {
    align-items: center;
  }
  .hero-photo {
    margin-inline: auto;
  }
}
.scroll-cue {
  margin-top: clamp(20px, 6vw, 48px);
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-secondary);
  border-radius: 14px;
  opacity: 0.6;
  position: relative;
}
.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: scrollCue 1.6s ease-in-out infinite;
}
@keyframes scrollCue {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(16px);
    opacity: 0;
  }
}
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    backdrop-filter var(--ease),
    background var(--ease);
}
.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -160%;
  width: 62%;
  height: 100%;
  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255, 255, 255, 0.45),
      transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.glass-card:not(.chat-widget):hover {
  transform: translateY(-10px) translateZ(0);
  box-shadow: var(--shadow-card-hover);
  backdrop-filter: blur(var(--blur-hover));
  -webkit-backdrop-filter: blur(var(--blur-hover));
  background: var(--glass-bg-strong);
}
.glass-card:not(.chat-widget):hover::before {
  left: 120%;
}
.chat-widget:hover {
  background: var(--glass-bg-strong);
}
[data-theme=dark] .glass-card:not(.chat-widget),
[data-theme=dark] .chat-widget {
  background:
    linear-gradient(
      155deg,
      var(--glass-bg-strong),
      var(--glass-bg));
}
[data-theme=dark] .glass-card:not(.chat-widget):hover,
[data-theme=dark] .chat-widget:hover {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.13),
      var(--glass-bg-strong));
}
.card-grid {
  --card-gap: clamp(20px, 3vw, 28px);
  display: grid;
  gap: var(--card-gap);
}
.reveal {
  opacity: 0;
  transform: translateX(-52px) translateZ(0);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal:nth-child(even) {
  transform: translateX(52px) translateZ(0);
}
.reveal.visible {
  opacity: 1;
  transform: translateX(0) translateZ(0);
}
.card-grid > .reveal:nth-child(2) {
  transition-delay: 0.06s;
}
.card-grid > .reveal:nth-child(3) {
  transition-delay: 0.12s;
}
.card-grid > .reveal:nth-child(4) {
  transition-delay: 0.18s;
}
.card-grid > .reveal:nth-child(5) {
  transition-delay: 0.24s;
}
.card-grid > .reveal:nth-child(6) {
  transition-delay: 0.3s;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.skills-grid > .skill-card {
  flex: 0 0 calc((100% - 2 * var(--card-gap)) / 3);
  min-width: 0;
}
.skills-grid.cols-2 {
  max-width: 880px;
  margin-inline: auto;
}
.skills-grid.cols-2 > .skill-card {
  flex-basis: calc((100% - var(--card-gap)) / 2);
}
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 26px;
  background:
    linear-gradient(
      155deg,
      var(--glass-bg),
      var(--glass-bg-strong));
}
.skill-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skill-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      var(--icon-a),
      var(--icon-b));
  opacity: 0.15;
}
.skill-icon i {
  position: relative;
  font-size: 1.6rem;
  background:
    linear-gradient(
      135deg,
      var(--icon-a),
      var(--icon-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.sub-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.sub-skills li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.sub-skills li i {
  font-size: 0.6rem;
  color: var(--accent-a);
}
.skills-learning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 40px);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.skills-learning i {
  color: var(--accent-a);
}
.projects-grid {
  grid-template-columns: repeat(2, 1fr);
}
.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.project-card::before {
  transition: left 1.4s ease;
}
.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    linear-gradient(
      135deg,
      var(--proj-a),
      var(--proj-b));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.08);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: brightness(0.95) saturate(1.1);
  transition: opacity 0.5s ease;
}
.project-media img.loaded {
  opacity: 1;
}
.project-title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px;
  background:
    linear-gradient(
      0deg,
      rgba(8, 16, 30, 0.6),
      transparent);
  color: #fff;
}
.project-title-overlay h3 {
  font-size: 1.15rem;
}
.project-title-below {
  display: none;
  padding: 18px 22px 0;
}
.project-body {
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.project-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-a);
}
[data-theme=dark] .tech-pill {
  background: rgba(125, 179, 234, 0.16);
}
.project-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.project-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition:
    transform 0.3s ease,
    background var(--ease-soft),
    backdrop-filter var(--ease-soft);
}
.project-actions a:hover {
  transform: translateY(-2px);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-hover));
  -webkit-backdrop-filter: blur(var(--blur-hover));
}
.project-actions a.primary {
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
  color: #fff;
  border-color: transparent;
}
.project-actions a.primary:hover {
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
}
.virateam-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 48px);
}
.virateam-text h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 8px;
  background:
    linear-gradient(
      90deg,
      var(--accent-a),
      var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.virateam-text p {
  color: var(--text-secondary);
  max-width: 56ch;
  font-size: 0.95rem;
}
.virateam-card .pill-btn {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .virateam-card {
    flex-direction: column;
    text-align: center;
  }
  .virateam-text p {
    max-width: 100%;
  }
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr minmax(420px, 1.15fr);
  gap: clamp(20px, 2.6vw, 28px);
  align-items: stretch;
}
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
.contact-info-box {
  padding: clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-info-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
}
.contact-info-note {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-top: -14px;
}
.contact-info-links {
  display: flex;
  flex-direction: column;
}
.contact-info-links a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-block: 14px;
  border-bottom: 1px solid var(--glass-border);
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.contact-info-links a:first-child {
  padding-top: 0;
}
.contact-info-links a:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.contact-info-links a:hover {
  opacity: 0.6;
}
.contact-info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.contact-info-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}
.contact-socials-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-socials a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.42),
      rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition:
    transform 0.3s ease,
    background var(--ease-soft),
    backdrop-filter var(--ease-soft);
}
[data-theme=dark] .contact-socials a {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.contact-socials a:hover {
  transform: translateY(-3px);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.28));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
[data-theme=dark] .contact-socials a:hover {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.06));
}
.contact-socials i,
.contact-socials .brand-glyph {
  color: var(--text-secondary);
}
.contact-socials a:hover i,
.contact-socials a:hover .brand-glyph {
  background:
    linear-gradient(
      135deg,
      var(--accent-a),
      var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 4vw, 40px);
}
.chat-widget {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  padding: 0;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background var(--ease-soft),
    border-radius 0.3s ease;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      var(--accent-a),
      var(--accent-b));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.chat-title {
  font-weight: 700;
  font-size: 0.98rem;
}
.chat-status {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37D67A;
}
.chat-expand-btn {
  display: none;
  margin-inline-start: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  transition: background var(--ease-soft);
}
.chat-expand-btn:hover {
  background: var(--glass-bg-strong);
}
@media (max-width: 640px) {
  .chat-expand-btn {
    display: flex;
  }
  .chat-widget.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 500;
    width: 100vw;
    min-height: 100dvh;
    border-radius: 0;
  }
  .chat-widget.fullscreen .chat-messages {
    max-height: none;
  }
  .chat-widget.fullscreen {
    background: rgba(246, 249, 255, 0.99);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
    backdrop-filter: blur(26px) saturate(1.2);
  }
  [data-theme=dark] .chat-widget.fullscreen {
    background: rgba(13, 24, 41, 0.99);
  }
  .chat-widget.fullscreen .msg.bot {
    background: rgba(var(--accent-rgb), 0.12);
  }
  [data-theme=dark] .chat-widget.fullscreen .msg.bot {
    background: rgba(125, 179, 234, 0.18);
  }
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: 440px;
}
.msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.bot {
  align-self: flex-start;
  background: rgba(var(--accent-rgb), 0.12);
  border-bottom-left-radius: 4px;
}
[dir=rtl] .msg.bot {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}
[data-theme=dark] .msg.bot {
  background: rgba(125, 179, 234, 0.14);
}
.msg.user {
  align-self: flex-end;
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
  color: #fff;
  border-bottom-right-radius: 4px;
}
[dir=rtl] .msg.user {
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 4px;
}
.msg.typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}
.msg.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-a);
  animation: typingBounce 1s infinite ease-in-out;
}
.msg.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.msg.typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--glass-border);
}
.chat-input-row input {
  flex: 1;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
}
[data-theme=dark] .chat-input-row input {
  background: rgba(255, 255, 255, 0.05);
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--accent-a);
}
.chat-input-row button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background:
    linear-gradient(
      120deg,
      var(--accent-a),
      var(--accent-b));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--ease);
}
[dir=rtl] .chat-input-row button i {
  transform: scaleX(-1);
}
.chat-input-row button:hover {
  transform: translateY(-2px) scale(1.04);
}
.chat-input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
@media (max-width: 980px) {
  .skills-grid > .skill-card,
  .skills-grid.cols-2 > .skill-card {
    flex-basis: calc((100% - var(--card-gap)) / 2);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .chat-widget {
    min-height: 420px;
  }
}
@media (max-width: 640px) {
  .skills-grid > .skill-card,
  .skills-grid.cols-2 > .skill-card {
    flex-basis: 100%;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-title-overlay {
    display: none;
  }
  .project-title-below {
    display: block;
  }
  .section {
    padding-block: 48px;
  }
  .card-grid {
    --card-gap: 20px;
  }
  .container {
    padding-inline: 18px;
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
@media (max-width: 860px), (pointer: coarse) {
  :root {
    --glass-bg: rgba(255,255,255,0.58);
    --glass-bg-strong: rgba(255,255,255,0.7);
    --shadow-card: 0 6px 18px rgba(40,70,120,0.12);
    --shadow-card-hover: var(--shadow-card);
  }
  [data-theme=dark] {
    --glass-bg: rgba(255,255,255,0.085);
    --glass-bg-strong: rgba(255,255,255,0.125);
    --shadow-card: 0 8px 20px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
    --shadow-card-hover: var(--shadow-card);
  }
  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }
  .glass-card,
  .glass-card:not(.chat-widget):hover,
  .btn-ghost,
  .btn-ghost:hover,
  .project-actions a,
  .project-actions a:hover,
  .contact-socials a,
  .contact-socials a:hover {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .glass-card {
    will-change: auto;
  }
  .glass-card::before {
    display: none;
  }
  .glass-card:not(.chat-widget):hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .btn,
  .pill-btn {
    will-change: auto;
  }
  .btn-primary,
  .pill-btn {
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.25);
  }
  .btn:hover,
  .pill-btn:hover,
  .project-actions a:hover,
  .contact-socials a:hover {
    transform: none;
  }
  .reveal,
  .reveal:nth-child(even) {
    transform: translate3d(0, 22px, 0);
    transition-duration: 0.5s;
  }
  .reveal.visible {
    transform: none;
  }
  .bg-layer {
    overflow: hidden;
  }
  .bg-layer::before {
    inset: auto;
    left: 0;
    right: 0;
    top: 0;
    height: 300%;
    background:
      linear-gradient(
        180deg,
        #D3E8FF,
        #C4EBFC,
        #BEEFEA,
        #C2F2E0);
    mix-blend-mode: normal;
    transform: translate3d(0, calc(var(--bg-progress, 0) * -66.667%), 0);
    transition: none;
    will-change: transform;
  }
  [data-theme=dark] .bg-layer::after {
    animation: none;
    transform: none;
  }
  .chat-messages {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 640px) {
  .chat-input-row input {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-cue span {
    animation: none;
  }
  .glass-card,
  .btn,
  .pill-btn,
  .icon-btn,
  .project-actions a,
  .contact-socials a,
  .chat-widget {
    transition: none;
  }
  .glass-card:not(.chat-widget):hover {
    transform: none;
  }
  .msg.typing span {
    animation: none;
  }
  .bg-layer::after {
    animation: none;
  }
  .icon-swap {
    animation: none;
  }
  .reveal {
    transition: none;
    opacity: 1;
    transform: translateZ(0);
  }
}
@media (max-width: 380px) {
  .nav-brand {
    font-size: 0.8rem;
  }
  [dir=rtl] .nav-brand {
    font-size: 1.05rem;
  }
}
