/* ==========================================================================
   EHSAN KHODADUST — MASTER RESPONSIVE STYLESHEET & DESIGN SYSTEM
   Ultra-Fluid Architecture from 320px Mobile to 4K Displays
   Aesthetics: Deep Obsidian / Clean Slate, Glassmorphism, Bento Grid,
   Preloader, Magnetic Cursor, 3D Stage, Jelly Pills, Marquee & Modal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties & Dynamic Theming Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Default: Deep Obsidian Dark Mode */
  --bg-canvas: #05070c;
  --bg-surface: #0a0d16;
  --bg-surface-elevated: #0f1422;
  --bg-card: rgba(13, 17, 28, 0.72);
  --bg-card-hover: rgba(20, 26, 43, 0.92);
  --bg-card-solid: #0d111c;
  --bg-header: rgba(9, 12, 20, 0.85);
  --bg-modal: rgba(10, 14, 24, 0.96);

  /* Borders & Dividers */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(99, 102, 241, 0.45);
  --border-glass-strong: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.04);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #ffffff;

  /* Accents & Gradients */
  --accent-primary: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-primary-hover: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --gradient-accent-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);

  /* Glows & Shadows */
  --glow-primary: rgba(99, 102, 241, 0.35);
  --glow-cyan: rgba(6, 182, 212, 0.25);
  --shadow-glass: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 16px 36px -12px rgba(0, 0, 0, 0.7);
  --shadow-card-hover: 0 24px 48px -10px rgba(99, 102, 241, 0.22);

  /* Typography */
  --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --font-en: 'Plus Jakarta Sans', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Vazirmatn', monospace;
  --font-main: var(--font-fa);

  /* Layout Sizing */
  --container-width: 1240px;
  --container-padding: clamp(1rem, 3.5vw, 2rem);
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.18s ease;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-card-solid: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.88);
  --bg-modal: rgba(255, 255, 255, 0.98);

  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-hover: rgba(99, 102, 241, 0.45);
  --border-glass-strong: rgba(15, 23, 42, 0.12);
  --border-subtle: rgba(15, 23, 42, 0.04);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-highlight: #020617;

  --shadow-glass: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 20px 45px -10px rgba(99, 102, 241, 0.15);
}

html[dir="ltr"] {
  --font-main: var(--font-en);
}

/* --------------------------------------------------------------------------
   2. Reset & Viewport Safeguards
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  transition: background-color 0.35s ease, color 0.35s ease;
}

::selection {
  background-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure icons maintain proper proportions in flex containers */
i.bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* --------------------------------------------------------------------------
   3. Preloader Screen
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem;
  max-width: 90vw;
}

.preloader__logo {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 2px;
  animation: pulse-logo 1.5s infinite ease-in-out;
}
.preloader__logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.preloader__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan);
  flex-shrink: 0;
}

.preloader__bar {
  width: min(200px, 60vw);
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.preloader__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  animation: load-bar 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.preloader__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  color: var(--text-dim);
  text-align: center;
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.4)); }
}
@keyframes load-bar {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* --------------------------------------------------------------------------
   4. Custom Desktop Magnetic Cursor
   -------------------------------------------------------------------------- */
.custom-cursor {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99990;
}

.custom-cursor__dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.08s ease;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.custom-cursor__ring {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.custom-cursor--hover .custom-cursor__ring {
  width: 50px;
  height: 50px;
  border-color: var(--accent-cyan);
  background-color: rgba(6, 182, 212, 0.1);
}

@media (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   5. Ambient Background Glows
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: var(--transition-smooth);
}
[data-theme="light"] .ambient-glow {
  opacity: 0.18;
}

.ambient-glow--top {
  top: -120px;
  right: 10%;
  width: min(550px, 80vw);
  height: min(550px, 80vw);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
}

.ambient-glow--middle {
  top: 45%;
  left: -120px;
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, transparent 70%);
}

.ambient-glow--bottom {
  bottom: -120px;
  right: 5%;
  width: min(550px, 80vw);
  height: min(550px, 80vw);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
}

.ambient-grid-pattern {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
[data-theme="light"] .ambient-grid-pattern {
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   6. Typography & Utility Classes
   -------------------------------------------------------------------------- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.font-mono {
  font-family: var(--font-mono);
}

.highlight-num {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. Buttons & Actions
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn i {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--glow-primary);
}
.btn--primary:hover {
  background: var(--gradient-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow-primary);
}

.btn--glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-primary);
  opacity: 0.45;
  filter: blur(10px);
  z-index: -1;
  transition: var(--transition-smooth);
}
.btn--glow:hover::before {
  opacity: 0.85;
  filter: blur(14px);
}

.btn--glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-strong);
  color: var(--text-main);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn--icon-glass {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-strong);
  color: var(--text-muted);
  font-size: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn--icon-glass:hover {
  color: #ffffff;
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
}

/* Jobvision CV Button with Shimmer & Glow */
.btn--resume {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22);
  font-weight: 600;
}
.btn--resume:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 182, 212, 0.28) 100%);
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.38);
  color: #ffffff;
}
.btn--resume i {
  color: var(--accent-emerald);
  font-size: 1.1rem;
}
.btn--resume:hover i {
  color: #ffffff;
}
.btn__badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.18rem 0.48rem;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald);
  color: #090d16;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-inline-start: 0.25rem;
}

/* Animated Shimmer Sweep Effect */
.btn--shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  transform: rotate(30deg);
  animation: btn-shimmer 4.5s infinite linear;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0% { transform: translate(-100%, -100%) rotate(30deg); }
  25%, 100% { transform: translate(100%, 100%) rotate(30deg); }
}

/* --------------------------------------------------------------------------
   8. Master Header & Floating Island
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-inline: var(--container-padding);
  pointer-events: none;
}

.header__inner {
  pointer-events: auto;
  max-width: var(--container-width);
  margin-inline: auto;
  height: var(--header-height);
  padding: 0 1.15rem;
  border-radius: var(--radius-pill);
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: var(--transition-smooth);
}

.header.scrolled .header__inner {
  background: var(--bg-surface-elevated);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.7);
}

/* Brand Logo */
.header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-main);
  flex-shrink: 0;
}
.brand-logo__symbol {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-logo__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  flex-shrink: 0;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
  white-space: nowrap;
  flex-shrink: 0;
}
.status-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Desktop Navigation */
.header__nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.nav-link i {
  font-size: 0.9rem;
  opacity: 0.75;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-weight: 600;
}
[data-theme="light"] .nav-link.active {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-strong);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; color: var(--accent-cyan); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; color: var(--accent-amber); }

/* Language Switch */
.lang-toggle-wrapper {
  display: inline-flex;
  flex-shrink: 0;
}

.lang-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-pill);
  padding: 4px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.lang-toggle-btn__indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 28px;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
  box-shadow: 0 2px 8px var(--glow-primary);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

html[lang="fa"] .lang-toggle-btn__indicator { transform: translateX(0); right: 3px; }
html[lang="en"] .lang-toggle-btn__indicator { transform: translateX(-28px); right: 3px; }
html[dir="ltr"][lang="en"] .lang-toggle-btn__indicator { transform: translateX(28px); left: 3px; right: auto; }
html[dir="ltr"][lang="fa"] .lang-toggle-btn__indicator { transform: translateX(0); left: 3px; right: auto; }

.lang-toggle-btn__label {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

html[lang="fa"] .lang-toggle-btn__label--fa,
html[lang="en"] .lang-toggle-btn__label--en {
  color: #ffffff;
}

/* Header Direct CTA */
.btn--header-cta {
  padding: 0.42rem 1.05rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.btn--header-cta:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--glow-primary);
  transform: translateY(-1px);
}
.cta-icon-dir {
  font-size: 1.05rem;
  flex-shrink: 0;
}
html[dir="ltr"] .cta-icon-dir {
  transform: rotate(180deg);
}

/* Mobile Toggle */
.menu-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-strong);
  color: var(--text-main);
  padding: 0;
  flex-shrink: 0;
}
.menu-toggle-btn__bar {
  width: 17px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-smooth);
}
.menu-toggle-btn.active .menu-toggle-btn__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle-btn.active .menu-toggle-btn__bar:nth-child(2) { opacity: 0; }
.menu-toggle-btn.active .menu-toggle-btn__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   9. Mobile Drawer Overlay
   -------------------------------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.35s ease;
}

.mobile-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mobile-drawer.open .mobile-drawer__backdrop {
  opacity: 1;
}

.mobile-drawer__panel {
  position: relative;
  z-index: 2;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--bg-surface-elevated);
  border-inline-start: 1px solid var(--border-glass-strong);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
html[dir="rtl"] .mobile-drawer__panel {
  transform: translateX(-100%);
}
.mobile-drawer.open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-glass);
}
.mobile-drawer__close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.mobile-nav-link i {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-highlight);
}

.mobile-drawer__footer {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.mobile-drawer__socials {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
}
.mobile-drawer__socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.mobile-drawer__socials a:hover {
  color: #ffffff;
  background: var(--gradient-primary);
}

/* --------------------------------------------------------------------------
   10. Hero Section & Portrait Stage
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100dvh;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  width: 100%;
  margin-block: auto;
}

.hero-content {
  min-width: 0;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.15rem;
  max-width: 100%;
}
.hero-pill-badge__icon {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.7rem;
  letter-spacing: -0.5px;
  word-break: break-word;
}
.hero-title__greeting {
  display: block;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.hero-title__name {
  font-weight: 900;
}
.hero-title__role {
  font-weight: 600;
  color: var(--text-muted);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  margin-inline-start: 0.35rem;
}
.hero-title__role:empty {
  display: none;
}

.hero-typewriter-box {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.typewriter-cursor {
  color: var(--accent-cyan);
  font-weight: 300;
  animation: blink 0.9s infinite;
}

.hero-description {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.75rem;
  max-width: 620px;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.stack-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.stack-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.stack-tag i {
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.stack-tag:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
  transform: translateY(-2px);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Hero Portrait Visual Stage */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  width: 100%;
  max-width: 100%;
}

.hero-stage {
  position: relative;
  width: min(440px, 100%);
  height: clamp(330px, 45vw, 470px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-stage__aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(240px, 40vw, 360px);
  height: clamp(240px, 40vw, 360px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(6, 182, 212, 0.25) 45%, transparent 70%);
  filter: blur(45px);
  z-index: 1;
  animation: aura-breathe 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes aura-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-stage__mesh-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(260px, 42vw, 400px);
  height: clamp(260px, 42vw, 400px);
  border-radius: 50%;
  border: 1.5px dashed rgba(99, 102, 241, 0.25);
  box-shadow: inset 0 0 40px rgba(6, 182, 212, 0.08);
  z-index: 1;
  animation: rotate-ring 35s linear infinite;
  pointer-events: none;
}

@keyframes rotate-ring {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-stage__portrait-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 100%);
}

.hero-stage__portrait {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.7));
  user-select: none;
  pointer-events: none;
}

/* Orbiting Jelly Skill Capsules */
.jelly-pill {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  font-size: clamp(0.72rem, 1.5vw, 0.82rem);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-highlight);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

.jelly-pill:hover {
  transform: scale(1.12) !important;
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--glow-cyan);
  z-index: 10;
}

.jelly-pill__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.jelly-pill--1 { top: 4%; right: -2%; animation: jelly-float-1 5.2s infinite ease-in-out; }
.jelly-pill--2 { top: 6%; left: -2%; animation: jelly-float-2 6s infinite ease-in-out 0.4s; }
.jelly-pill--3 { top: 42%; right: -8%; animation: jelly-float-3 5.5s infinite ease-in-out 0.8s; }
.jelly-pill--4 { top: 46%; left: -8%; animation: jelly-float-1 6.4s infinite ease-in-out 1.2s; }
.jelly-pill--5 { bottom: 8%; right: -2%; animation: jelly-float-2 5.8s infinite ease-in-out 1.6s; }
.jelly-pill--6 { bottom: 6%; left: -2%; animation: jelly-float-3 5.3s infinite ease-in-out 0.9s; }

@keyframes jelly-float-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1deg) scale(1.02); }
  66% { transform: translateY(5px) rotate(-1deg) scale(0.98); }
}

@keyframes jelly-float-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(7px) rotate(-1.5deg) scale(0.99); }
  66% { transform: translateY(-8px) rotate(1deg) scale(1.02); }
}

@keyframes jelly-float-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1.5deg) scale(1.02); }
}

/* Marquee Ticker Subtitle */
.hero-ticker-container {
  width: 100%;
  max-width: 480px;
  margin-top: 1.25rem;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-strong);
  padding: 0.55rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
  z-index: 3;
}

.hero-ticker-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: ticker-slide 22s linear infinite;
  user-select: none;
}
.hero-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

html[dir="rtl"] .hero-ticker-track {
  animation: ticker-slide-rtl 22s linear infinite;
}
@keyframes ticker-slide-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.ticker-item i {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.ticker-dot-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.6;
  flex-shrink: 0;
}

/* Scroll Cue */
.scroll-cue {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}
.scroll-cue a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
}
.scroll-cue a:hover {
  color: var(--accent-cyan);
}
.scroll-cue__mouse {
  width: 18px;
  height: 28px;
  border-radius: 9px;
  border: 1.5px solid var(--text-dim);
  display: flex;
  justify-content: center;
  padding-top: 4px;
}
.scroll-cue__wheel {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent-cyan);
  animation: scroll-wheel 1.8s infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}

/* --------------------------------------------------------------------------
   11. Section Common Headings & Metrics Strip
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section-badge i {
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-highlight);
  margin-bottom: 0.65rem;
}

.section-subtitle {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.7;
}

/* Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.metric-box {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  transition: var(--transition-smooth);
}
.metric-box:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
}

.metric-box__num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1.2;
}
.metric-box__plus {
  color: var(--accent-primary);
  font-size: 0.75em;
}
.metric-box__label {
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   12. Bento Grid Layout
   -------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.bento-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.bento-card--story {
  grid-row: span 2;
}

.bento-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.bento-card__icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bento-card__title {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--text-highlight);
}

.bento-card__body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: clamp(0.9rem, 1.6vw, 0.98rem);
}
.bento-card__body p:last-child {
  margin-bottom: 0;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.4rem;
}
.spec-label {
  font-size: 0.88rem;
  color: var(--text-dim);
}
.spec-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.bento-card--mini {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}
.bento-mini-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.bento-mini-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.15rem;
}
.bento-mini-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Services Section
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.service-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.service-card__icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 18px var(--glow-primary);
  flex-shrink: 0;
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.65rem;
}

.service-card__desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.service-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-glass);
}
.service-card__techs span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.08);
}

/* --------------------------------------------------------------------------
   14. Skills Section
   -------------------------------------------------------------------------- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.skill-category-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  transition: var(--transition-smooth);
}

.skill-category-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.skill-category-card--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%), var(--bg-card);
  border-color: rgba(99, 102, 241, 0.35);
}

.skill-category-card__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}
.skill-category-card__header i {
  color: var(--accent-cyan);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.skill-category-card__header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-highlight);
}

.skill-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-fast);
}
.skill-pill:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
  transform: translateY(-2px);
}

.skill-pill--gold {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #ffffff;
  font-weight: 700;
}
.skill-pill--gold:hover {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.2);
}

.skill-pill__badge {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-gold);
  color: #000000;
  font-weight: 800;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   15. Projects Section & Glass Modal
   -------------------------------------------------------------------------- */
.projects-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2.25rem;
}

.filter-pill {
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  touch-action: manipulation;
}
.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--border-glass-strong);
}
.filter-pill.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--glow-primary);
}

.projects-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Featured Project Hero Card (AI-PLATE) */
.featured-project-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.06) 100%), var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-card-hover);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.featured-project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--glow-primary);
  flex-shrink: 0;
}
.featured-tag i {
  flex-shrink: 0;
}

.featured-project-card__title {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--text-highlight);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.featured-project-card__simple-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.featured-project-card__deep-desc {
  font-size: clamp(0.88rem, 1.6vw, 0.98rem);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.featured-project-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}
.featured-tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass-strong);
  color: var(--text-main);
}

.featured-project-card__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Regular Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.project-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.15rem, 2.5vw, 1.65rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.project-card__cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.project-card__github-link {
  color: var(--text-dim);
  font-size: 1.25rem;
  transition: var(--transition-fast);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.project-card__github-link:hover {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-card__footer {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.project-card__tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.project-card__tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.project-card__view-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.project-card__view-btn:hover {
  color: #ffffff;
}

/* Compact Projects Box */
.projects-compact-box {
  margin-top: 0.5rem;
}
.projects-compact-box__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.85rem;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0.75rem;
}

.compact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  transition: var(--transition-fast);
}
.compact-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-elevated);
}
.compact-item__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}
.compact-item__desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* Glass Modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition-smooth);
}
.project-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(650px, 94vw);
  max-height: 85dvh;
  max-height: 85vh;
  background: var(--bg-modal);
  border: 1px solid var(--border-glass-strong);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
}
.project-modal.open .project-modal__dialog {
  transform: scale(1);
}

.project-modal__close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
  z-index: 3;
}
.project-modal__close:hover {
  background: var(--accent-rose);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   16. Experience & University Timeline
   -------------------------------------------------------------------------- */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.timeline-block {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.timeline-block__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.timeline-block__header i {
  color: var(--accent-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.timeline-block__header h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--text-highlight);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-card {
  position: relative;
  padding-inline-start: 1.35rem;
  border-inline-start: 2px solid var(--border-glass-strong);
}

.timeline-card__pin {
  position: absolute;
  top: 0.35rem;
  inset-inline-start: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  flex-shrink: 0;
}

.timeline-card__pin--active {
  background: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald);
}

.timeline-card__status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  font-size: 0.72rem;
  font-weight: 700;
}

.timeline-card__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.3rem;
}

.timeline-card__role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.timeline-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.timeline-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(6, 182, 212, 0.08);
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.timeline-link i {
  flex-shrink: 0;
}
.timeline-link:hover {
  background: rgba(6, 182, 212, 0.2);
  color: #ffffff;
}

.timeline-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Education Feature Banner */
.education-banner {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%), var(--bg-card);
  border: 1px solid var(--border-glass-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.education-banner__icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px var(--glow-primary);
  flex-shrink: 0;
}

.education-banner__info {
  flex-grow: 1;
  min-width: 0;
}
.education-banner__tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
}
.education-banner__degree {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  font-weight: 800;
  color: var(--text-highlight);
  margin-top: 0.15rem;
  line-height: 1.35;
}
.education-banner__uni {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.education-banner__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.education-banner__period {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-dim);
}
.education-banner__status {
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   17. Why Work With Me Section
   -------------------------------------------------------------------------- */
.why-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.why-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.why-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.why-card__num {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.25rem;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--border-glass-strong);
  pointer-events: none;
}

.why-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.why-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-highlight);
  margin-bottom: 0.55rem;
  line-height: 1.4;
  padding-inline-end: 2rem;
}

.why-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   18. Contact Section & Direct Channels
   -------------------------------------------------------------------------- */
.contact-channels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 960px;
  margin-inline: auto;
  width: 100%;
}

.contact-cards-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  width: 100%;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  min-width: 0;
  width: 100%;
}
.contact-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-card__info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}
.contact-card__label {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.contact-card__val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  word-break: break-all;
}
.contact-card__val:hover {
  color: var(--accent-cyan);
}

.btn-copy, .contact-card__action {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.btn-copy:hover, .contact-card__action:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Featured Contact Card (Jobvision CV) */
.contact-card--featured {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.contact-card--featured:hover {
  border-color: var(--accent-emerald);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.25);
  transform: translateY(-3px);
}
.contact-card__icon--cv {
  background: rgba(16, 185, 129, 0.16) !important;
  color: var(--accent-emerald) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.contact-card__action--highlight {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--accent-emerald) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.contact-card__action--highlight:hover {
  background: var(--accent-emerald) !important;
  color: #090d16 !important;
  transform: translateY(-2px);
}

.social-pill--cv {
  border-color: rgba(16, 185, 129, 0.35);
}
.social-pill--cv:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

/* --------------------------------------------------------------------------
   19. Footer Section
   -------------------------------------------------------------------------- */
.footer {
  padding: clamp(3rem, 6vw, 4rem) 0 2rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
  width: 100%;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  max-width: 400px;
}
.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 0.45rem;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
  border: 1px solid var(--border-glass);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.social-pill i {
  font-size: 1.05rem;
  flex-shrink: 0;
}
.social-pill:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.75rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.back-to-top:hover {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   20. Scroll Progress Ring & Floating Button
   -------------------------------------------------------------------------- */
.scroll-progress-btn {
  position: fixed;
  bottom: 1.75rem;
  inset-inline-end: 1.75rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  transition: var(--transition-smooth);
  color: var(--text-main);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.scroll-progress-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.scroll-progress-btn:hover {
  transform: scale(1.08);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.scroll-progress-btn:active {
  transform: scale(0.95);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.progress-ring__circle {
  stroke: var(--accent-primary);
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.15s ease;
}
.scroll-progress-btn i {
  font-size: 1rem;
  line-height: 1;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}
.scroll-progress-btn:hover i {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   21. Toast Notification
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 1.75rem;
  inset-inline-start: 1.75rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  color: var(--text-highlight);
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}
.toast i {
  color: var(--accent-emerald);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   22. Scroll Reveal Animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Above-the-fold Hero elements are instantly visible */
.hero-section .reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* --------------------------------------------------------------------------
   23. Comprehensive Multi-Device Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Extra Large Screens & 4K (1440px to 2560px+) */
@media (min-width: 1440px) {
  :root {
    --container-width: 1320px;
  }
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Large Tablets & Small Laptops (992px to 1180px) */
@media (max-width: 1180px) {
  .header__nav {
    display: none;
  }
  .btn--header-cta {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .hero-pill-badge, .hero-typewriter-box {
    margin-inline: auto;
    justify-content: center;
  }
  .hero-description {
    margin-inline: auto;
    max-width: 580px;
  }
  .hero-stack {
    align-items: center;
  }
  .stack-tags {
    justify-content: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card--story {
    grid-row: auto;
  }
  .experience-grid {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    margin-inline: auto;
  }
}

/* Medium Tablets (768px to 991px) */
@media (max-width: 991px) {
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stage {
    max-width: min(440px, 100%);
    height: clamp(340px, 45vw, 420px);
  }
  .jelly-pill--3 { right: 0%; }
  .jelly-pill--4 { left: 0%; }
}

/* Phablets & Mobiles (up to 767px) */
@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }
  .header {
    top: 0.5rem;
  }
  .status-badge {
    display: none;
  }
  .hero-section {
    padding-top: calc(var(--header-height) + 2.5rem);
    min-height: 100dvh;
    min-height: 100vh;
    padding-bottom: 2.5rem;
  }

  /* Hero Portrait & Stage Mobile Fit */
  .hero-visual {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-inline: auto;
    padding: 0.25rem;
  }
  .hero-stage {
    width: 100%;
    max-width: min(380px, 92vw);
    height: clamp(300px, 55vw, 360px);
    margin-inline: auto;
  }
  .hero-stage__aura {
    width: clamp(200px, 55%, 260px);
    height: clamp(200px, 55%, 260px);
    filter: blur(35px);
  }
  .hero-stage__mesh-ring {
    width: clamp(220px, 60%, 280px);
    height: clamp(220px, 60%, 280px);
  }
  .hero-stage__portrait {
    max-height: 95%;
  }

  /* Jelly Floating Pills — safely positioned inside stage */
  .jelly-pill {
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    gap: 0.3rem;
  }
  .jelly-pill__icon {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
  .jelly-pill--1 { top: 3%; right: 1%; left: auto; }
  .jelly-pill--2 { top: 3%; left: 1%; right: auto; }
  .jelly-pill--3 { top: 40%; right: 0%; left: auto; }
  .jelly-pill--4 { top: 40%; left: 0%; right: auto; }
  .jelly-pill--5 { bottom: 5%; right: 2%; left: auto; }
  .jelly-pill--6 { bottom: 5%; left: 2%; right: auto; }

  .hero-ticker-container {
    max-width: 100%;
    margin-top: 1rem;
  }

  /* Section Spacing & Headings */
  .section {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
  }
  .section-head {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .services-grid, .skills-container, .projects-grid, .why-cards-grid {
    grid-template-columns: 1fr;
  }
  .education-banner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }
  .education-banner__meta {
    align-items: center;
  }

  /* Contact Mobile Optimization */
  .contact-channels {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .contact-cards-group {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .contact-card {
    padding: 0.9rem 1rem;
  }
  .contact-card__val {
    white-space: normal;
    word-break: break-all;
    text-overflow: unset;
    overflow: visible;
  }

  /* Footer */
  .footer-top, .footer-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }
  .footer-socials {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* UI Widgets & Indicators */
  .toast {
    inset-inline-start: 1rem;
    inset-inline-end: 1rem;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.75rem 1.1rem;
  }
  .scroll-progress-btn {
    bottom: max(1.25rem, env(safe-area-inset-bottom, 1.25rem));
    inset-inline-end: max(1.25rem, env(safe-area-inset-right, 1.25rem));
    width: 44px;
    height: 44px;
  }

  /* Project filter buttons */
  .projects-filter-bar {
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .filter-pill {
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Modal adjustments */
  .project-modal__dialog {
    width: min(94vw, 650px);
    max-height: 90dvh;
    max-height: 90vh;
    border-radius: var(--radius-xl);
  }
}

/* Medium-Small Mobiles (481px to 576px) */
@media (max-width: 576px) {
  .hero-title {
    font-size: clamp(1.9rem, 7.5vw, 2.3rem);
  }
  .hero-title__greeting {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
  }
  .hero-stage {
    max-width: min(340px, 90vw);
    height: clamp(280px, 52vw, 330px);
  }
  .hero-description {
    font-size: 0.95rem;
  }
  .bento-card, .service-card, .skill-category-card,
  .featured-project-card, .timeline-block, .why-card {
    padding: 1.2rem;
  }
  .jelly-pill--5 { bottom: 3%; right: 1%; }
  .jelly-pill--6 { bottom: 3%; left: 1%; }
}

/* Small Mobiles (up to 480px) */
@media (max-width: 480px) {
  .header__inner {
    padding: 0 0.85rem;
    gap: 0.5rem;
  }
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2rem);
  }
  .hero-title__greeting {
    font-size: 1.15rem;
  }
  .hero-stage {
    max-width: min(300px, 88vw);
    height: clamp(260px, 50vw, 300px);
  }
  .hero-stage__aura {
    width: clamp(170px, 50%, 220px);
    height: clamp(170px, 50%, 220px);
  }
  .hero-stage__mesh-ring {
    width: clamp(190px, 55%, 240px);
    height: clamp(190px, 55%, 240px);
  }
  .hero-stage__portrait {
    max-height: 92%;
  }

  .jelly-pill {
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
  }
  /* Hide bottom pills to reduce clutter */
  .jelly-pill--5, .jelly-pill--6 {
    display: none;
  }
  .jelly-pill--3 { right: 1%; }
  .jelly-pill--4 { left: 1%; }

  .btn {
    padding: 0.7rem 1.25rem;
    font-size: 0.88rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-actions .btn:not(.btn--icon-glass) {
    width: 100%;
  }
  .hero-actions .btn--icon-glass {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-inline: auto;
  }

  .featured-project-card__actions {
    flex-direction: column;
    width: 100%;
  }
  .featured-project-card__actions .btn {
    width: 100%;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .bento-card, .service-card, .skill-category-card,
  .featured-project-card, .timeline-block, .why-card {
    padding: 1.1rem;
  }
  .section-head {
    margin-bottom: 1.75rem;
  }
}

/* Extra Narrow Mobiles (<=360px) */
@media (max-width: 360px) {
  .header__inner {
    padding: 0 0.65rem;
    gap: 0.35rem;
  }
  .header__actions {
    gap: 0.35rem;
  }
  .brand-logo {
    font-size: 1.15rem;
  }
  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
  .menu-toggle-btn {
    width: 38px;
    height: 38px;
  }
  .lang-toggle-btn {
    padding: 3px;
  }
  .lang-toggle-btn__indicator {
    width: 24px;
  }
  .lang-toggle-btn__label {
    width: 24px;
    font-size: 0.68rem;
  }
  html[lang="en"] .lang-toggle-btn__indicator { transform: translateX(-24px); }
  html[dir="ltr"][lang="en"] .lang-toggle-btn__indicator { transform: translateX(24px); }

  .hero-title {
    font-size: clamp(1.45rem, 8vw, 1.75rem);
  }
  .hero-title__greeting {
    font-size: 1rem;
  }
  .hero-stage {
    max-width: min(270px, 86vw);
    height: clamp(240px, 48vw, 270px);
  }
  .hero-stage__portrait {
    max-height: 90%;
  }
  .jelly-pill {
    font-size: 0.6rem;
    padding: 0.22rem 0.42rem;
  }
  .jelly-pill--3, .jelly-pill--4 {
    display: none;
  }
  .metrics-strip {
    grid-template-columns: 1fr;
  }
  .hero-description {
    font-size: 0.88rem;
  }
  .footer-socials {
    gap: 0.45rem;
  }
  .social-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
  }
  .contact-card {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }
  .contact-card__icon {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
  .btn-copy, .contact-card__action {
    width: 38px;
    height: 38px;
  }
}

/* Ultra Small Mobiles (320px) */
@media (max-width: 325px) {
  :root {
    --container-padding: 0.75rem;
  }
  .hero-title {
    font-size: 1.4rem;
  }
  .metrics-strip {
    grid-template-columns: 1fr;
  }
  .spec-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
