/* =========================================
   Variables
   ========================================= */
:root {
  --bg: #0a0505;
  --bg-soft: #150808;
  --card: #1a0a0a;
  --card-2: #240d0d;
  --border: #4a1a1a;
  --text: #f5e5e5;
  --muted: #b08a8a;
  --primary: #ef4444;
  --primary-2: #b91c1c;
  --primary-3: #7f1d1d;
  --rain-color: rgba(239, 68, 68, 0.35);
  --grad-card: linear-gradient(135deg, #1a0a0a 0%, #240d0d 50%, #1a0505 100%);
  --grad-shell: linear-gradient(135deg, #1a0707 0%, #250c0c 50%, #1a0505 100%);
  --grad-primary: linear-gradient(135deg, #ef4444, #b91c1c);
  --grad-glow: linear-gradient(135deg, rgba(239,68,68,.15), rgba(185,28,28,.05));
}

[data-theme="light"] {
  --bg: #fdf5f5;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-2: #fff5f5;
  --border: #e8b8b8;
  --text: #1a0808;
  --muted: #8a6a6a;
  --primary: #dc2626;
  --primary-2: #991b1b;
  --primary-3: #7f1d1d;
  --rain-color: rgba(220, 38, 38, 0.2);
  --grad-card: linear-gradient(135deg, #ffffff 0%, #fff5f5 50%, #ffeaea 100%);
  --grad-shell: linear-gradient(135deg, #fff8f8 0%, #fff0f0 50%, #ffe5e5 100%);
  --grad-primary: linear-gradient(135deg, #dc2626, #991b1b);
  --grad-glow: linear-gradient(135deg, rgba(220,38,38,.08), rgba(153,27,27,.03));
}

/* =========================================
   Reset & Base
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(239,68,68,.15), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(185,28,28,.12), transparent 45%),
    var(--bg);
  color: var(--text);
  line-height: 1.9;
  transition: background 0.5s, color 0.5s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
html[dir="ltr"] body { font-family: 'Segoe UI', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }

/* =========================================
   Splash Screen
   ========================================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background:
    radial-gradient(circle at 30% 30%, rgba(239,68,68,.25), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(185,28,28,.2), transparent 50%),
    linear-gradient(135deg, #0a0505 0%, #1a0a0a 50%, #0a0202 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  cursor: pointer;
  overflow: hidden;
}

#splash::before,
#splash::after {
  content: "";
  position: absolute;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(239, 68, 68, 0.15) 60deg,
    transparent 120deg
  );
  animation: splash-rotate 12s linear infinite;
  pointer-events: none;
}
#splash::after {
  animation-direction: reverse;
  animation-duration: 18s;
  opacity: 0.5;
}
@keyframes splash-rotate {
  to { transform: rotate(360deg); }
}

#splash.hide {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 30px;
  animation: splash-fade-in 0.8s ease-out;
}

@keyframes splash-fade-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-logo {
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  box-shadow:
    0 0 30px rgba(239,68,68,.7),
    0 0 80px rgba(239,68,68,.4),
    inset 0 0 30px rgba(0,0,0,.3);
  animation: splash-pulse 2s ease-in-out infinite;
}
.splash-logo i {
  text-shadow: 0 0 20px rgba(255,255,255,.8);
  animation: splash-bob 2s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(239,68,68,.7),
      0 0 80px rgba(239,68,68,.4),
      inset 0 0 30px rgba(0,0,0,.3);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 50px rgba(239,68,68,1),
      0 0 120px rgba(239,68,68,.6),
      inset 0 0 30px rgba(0,0,0,.3);
    transform: scale(1.05);
  }
}
@keyframes splash-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.splash-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
  letter-spacing: 1px;
  text-shadow:
    0 0 10px #ef4444,
    0 0 20px #ef4444,
    0 0 40px #b91c1c,
    0 0 80px #7f1d1d;
  animation: neon-flicker 4s ease-in-out infinite alternate;
}

.splash-subtitle {
  font-size: 1rem;
  color: rgba(245, 229, 229, 0.7);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.splash-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(239,68,68,.7),
    0 0 40px rgba(239,68,68,.4),
    0 10px 30px rgba(0,0,0,.5);
  animation: splash-btn-pulse 2s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}
.splash-btn i {
  font-size: 0.95rem;
  transition: transform 0.3s;
}
.splash-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: splash-shine 3s infinite;
}
@keyframes splash-shine {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}
@keyframes splash-btn-pulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(239,68,68,.7),
      0 0 40px rgba(239,68,68,.4),
      0 10px 30px rgba(0,0,0,.5);
  }
  50% {
    box-shadow:
      0 0 30px rgba(239,68,68,1),
      0 0 70px rgba(239,68,68,.6),
      0 10px 30px rgba(0,0,0,.5);
  }
}
.splash-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 0 40px rgba(239,68,68,1),
    0 0 80px rgba(239,68,68,.7),
    0 15px 40px rgba(0,0,0,.6);
}
.splash-btn:hover i {
  transform: translateX(-3px);
}
.splash-btn:active {
  transform: translateY(-1px) scale(0.99);
}

.splash-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.82rem;
  color: rgba(176, 138, 138, 0.7);
}
.splash-hint i {
  color: #ef4444;
  animation: splash-sound-wave 1.2s ease-in-out infinite;
}
@keyframes splash-sound-wave {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@media (max-width: 480px) {
  .splash-logo { width: 90px; height: 90px; font-size: 2.4rem; }
  .splash-title { font-size: 1.7rem; }
  .splash-subtitle { font-size: 0.9rem; }
  .splash-btn { padding: 14px 28px; font-size: 0.95rem; }
  .splash-hint { font-size: 0.75rem; }
}

/* =========================================
   Loading Screen
   ========================================= */
#loading {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}
#loading.hide { opacity: 0; visibility: hidden; }
.loader {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 25px rgba(239,68,68,.6);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   Rain Canvas
   ========================================= */
#rain-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* =========================================
   Navigation
   ========================================= */
nav {
  position: relative;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.logo {
  font-weight: 800; font-size: 1rem;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
  filter: drop-shadow(0 0 8px rgba(239,68,68,.6));
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.logo i {
  -webkit-text-fill-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 10px rgba(239,68,68,.8);
}
.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  transition: 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.nav-links a i { font-size: 0.78rem; }
.nav-links a:hover { color: var(--primary); text-shadow: 0 0 12px rgba(239,68,68,.7); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--grad-card);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.25s;
}
.nav-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 18px rgba(239,68,68,.5);
  transform: translateY(-1px);
}
.nav-btn i { font-size: 0.85rem; }
.nav-btn .lbl { font-size: 0.75rem; letter-spacing: 0.5px; }

.nav-btn.playing {
  color: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
  animation: music-pulse 1.5s ease-in-out infinite;
}
.nav-btn.playing i {
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.9));
}
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.9); }
}

/* =========================================
   Shell Container
   ========================================= */
.shell-container {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 20px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.shell {
  width: 100%;
  max-width: 1200px;
  background: var(--grad-shell);
  border: 2px solid var(--border);
  border-radius: 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(239, 68, 68, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  position: relative;
}
.shell::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px rgba(239,68,68,.9);
  z-index: 3;
  pointer-events: none;
}

/* =========================================
   Layout Grid
   ========================================= */
.wrapper {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.content-panel {
  grid-column: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 24px;
  min-width: 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.content-panel::-webkit-scrollbar { width: 8px; }
.content-panel::-webkit-scrollbar-track { background: transparent; }
.content-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.content-panel::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  background-clip: padding-box;
}

.profile-panel {
  grid-column: 2;
  padding: 28px 20px;
  overflow: hidden;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-inline-start: 1px solid var(--border);
}

/* =========================================
   Sections
   ========================================= */
section { margin-bottom: 24px; }
section:last-child { margin-bottom: 0; }

.section-title {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 5px; height: 20px; border-radius: 4px;
  background: var(--grad-primary);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(239,68,68,.8);
}
.section-title i {
  color: var(--primary);
  font-size: 1rem;
  text-shadow: 0 0 10px rgba(239,68,68,.8);
}

/* =========================================
   Cards
   ========================================= */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,.6), transparent);
  opacity: 0.6;
}
.card:hover {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow: 0 8px 30px rgba(239,68,68,.2);
}

/* =========================================
   Profile Card
   ========================================= */
.profile-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 20px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  width: 100%;
  max-width: 340px;
}
.profile-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 95px;
  background: linear-gradient(135deg, rgba(239,68,68,.22), rgba(127,29,29,.12), transparent);
  z-index: 0;
  pointer-events: none;
}
.profile-card::after {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px rgba(239,68,68,.9);
  pointer-events: none;
}
.profile-card:hover {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow: 0 12px 40px rgba(239,68,68,.35);
}
.profile-card > * { position: relative; z-index: 1; }

.profile-card .avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  position: relative;
  margin: 6px auto 14px;
  padding: 4px;
  background: var(--grad-primary);
  box-shadow: 0 0 20px rgba(239,68,68,.5), 0 0 40px rgba(185,28,28,.25);
  border: 4px solid var(--card);
  animation: pulse-avatar 3s ease-in-out infinite;
  overflow: hidden;
}
.profile-card .avatar .fallback {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  z-index: 0;
}
.profile-card .avatar img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--card-2);
  transition: transform 0.5s ease;
}
.profile-card .avatar:hover img { transform: scale(1.08); }

@keyframes pulse-avatar {
  0%, 100% { box-shadow: 0 0 20px rgba(239,68,68,.5), 0 0 40px rgba(185,28,28,.25); }
  50% { box-shadow: 0 0 30px rgba(239,68,68,.7), 0 0 55px rgba(185,28,28,.4); }
}

.profile-card h1 {
  font-size: 1.35rem; font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px #ef4444, 0 0 10px #ef4444, 0 0 20px #b91c1c;
  animation: neon-flicker 4s ease-in-out infinite alternate;
}
[data-theme="light"] .profile-card h1 {
  color: #7f1d1d;
  text-shadow: 0 0 5px rgba(220,38,38,.6), 0 0 10px rgba(220,38,38,.4);
}
@keyframes neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 0 0 5px #ef4444, 0 0 10px #ef4444, 0 0 20px #b91c1c;
  }
  20%, 24%, 55% { text-shadow: 0 0 3px #ef4444; }
}

.profile-card .role {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(239,68,68,.6);
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.6;
}
.profile-card .role .divider { opacity: 0.5; margin: 0 2px; }
.profile-card .bio {
  color: var(--muted);
  font-size: 0.83rem;
  text-align: center;
  margin-bottom: 16px;
}
.profile-card .btn-row {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.profile-card .btn { padding: 8px 14px; font-size: 0.8rem; }

/* =========================================
   Buttons
   ========================================= */
.btn {
  padding: 10px 20px; border-radius: 10px; font-weight: 600;
  transition: 0.3s; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; white-space: nowrap;
  position: relative;
}
.btn i { font-size: 0.85rem; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(239,68,68,.5), 0 0 20px rgba(239,68,68,.3), 0 4px 15px rgba(239,68,68,.4);
  animation: neon-btn-pulse 2.5s ease-in-out infinite;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(239,68,68,.8), 0 0 30px rgba(239,68,68,.6), 0 8px 25px rgba(239,68,68,.6);
}
@keyframes neon-btn-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(239,68,68,.5), 0 0 20px rgba(239,68,68,.3), 0 4px 15px rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 15px rgba(239,68,68,.8), 0 0 30px rgba(239,68,68,.5), 0 4px 15px rgba(239,68,68,.5); }
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--grad-glow);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(239,68,68,.5);
}

/* =========================================
   Skills
   ========================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 22px;
}
.skill { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.skill-label { display: flex; justify-content: space-between; align-items: center; }
.skill-label span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.skill-label span:first-child i {
  color: var(--primary);
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(239,68,68,.7);
  width: 16px; text-align: center;
}
.skill-label span:last-child {
  color: var(--primary); font-weight: 700;
  text-shadow: 0 0 10px rgba(239,68,68,.7);
}
.skill-bar {
  height: 6px; border-radius: 3px;
  background: rgba(239,68,68,.1);
  overflow: hidden;
  border: 1px solid rgba(239,68,68,.2);
}
.skill-bar > span {
  display: block; height: 100%; border-radius: 3px;
  background: var(--grad-primary);
  transition: width 1s ease;
  box-shadow: 0 0 12px rgba(239,68,68,.9);
}

/* =========================================
   Projects
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.project-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,.6), transparent);
  opacity: 0.6;
}
.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(239,68,68,.4);
}
.project-card h3 {
  font-size: 0.92rem; font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.project-card h3 i { color: var(--primary); text-shadow: 0 0 8px rgba(239,68,68,.7); font-size: 0.85rem; }
.project-card p { color: var(--muted); font-size: 0.8rem; margin-bottom: 10px; flex: 1; }

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.project-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; color: var(--primary);
  background: rgba(239,68,68,.12);
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(239,68,68,.3);
}
.project-tag i { font-size: 0.65rem; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  transition: 0.25s;
  white-space: nowrap;
}
.project-link i { font-size: 0.7rem; transition: transform 0.25s; }
.project-link:hover {
  background: var(--grad-primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(239,68,68,.7);
}
.project-link:hover i { transform: translate(2px, -2px); }

/* =========================================
   Contact
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.contact-item {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  transition: 0.3s;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.contact-item::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,.5), transparent);
  opacity: 0.5;
}
.contact-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239,68,68,.4);
}
.contact-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  box-shadow: 0 0 18px rgba(239,68,68,.6);
}
.contact-item .lbl { font-size: 0.72rem; color: var(--muted); }
.contact-item .val { font-weight: 600; font-size: 0.85rem; word-break: break-all; }
.contact-item > div:last-child { min-width: 0; }



/* =========================================
   Content Footer
   ========================================= */
.content-footer {
  text-align: center;
  padding: 26px 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap;
}
.content-footer i.fa-heart {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(239,68,68,.8);
  animation: heart-beat 1.4s ease-in-out infinite;
}
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* =========================================
   Back to Top
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: max(30px, calc((100vw - 1200px) / 2 + 30px));
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--grad-card);
  color: var(--primary);
  cursor: pointer;
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s, border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  font-size: 1rem;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(239,68,68,.6), 0 0 25px rgba(239,68,68,.4);
}
.back-to-top i { transition: transform 0.25s; }
.back-to-top:hover i { transform: translateY(-2px); }
.back-to-top .progress-ring {
  position: absolute; inset: -3px;
  width: calc(100% + 6px); height: calc(100% + 6px);
  transform: rotate(-90deg);
  pointer-events: none;
}
.back-to-top .progress-ring circle { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.back-to-top .progress-ring .bg-circle { stroke: var(--border); }
.back-to-top .progress-ring .fg-circle {
  stroke: var(--primary);
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 5px rgba(239,68,68,.9));
}

/* =========================================
   Fade-up Animation
   ========================================= */
.fade-up { opacity: 0; transform: translateY(20px); transition: 0.6s; }
.fade-up.visible { opacity: 1; transform: none; }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
  .wrapper { grid-template-columns: minmax(0, 1fr) 280px; }
  .content-panel { padding: 24px 20px; }
  .profile-panel { padding: 24px 16px; }
}

@media (max-width: 820px) {
  body { overflow-y: auto; height: auto; min-height: 100vh; }
  .shell-container { padding: 12px; display: block; }
  .shell { border-radius: 20px; display: block; }
  .wrapper { display: flex; flex-direction: column; height: auto; }
  .content-panel { overflow: visible; padding: 20px 16px; order: 2; }
  .profile-panel {
    padding: 20px 16px 0;
    overflow: visible;
    order: 1;
    border-inline-start: none;
  }
}

@media (max-width: 720px) {
  .nav-inner { padding: 8px 12px; gap: 8px; }
  .logo { font-size: 0.9rem; }
  .logo span { display: none; }
  .logo i { font-size: 1.1rem; }
  .nav-links { gap: 14px; font-size: 0.78rem; justify-content: flex-start; }
  .nav-links a span { display: none; }
  .nav-links a i { font-size: 0.95rem; }
  .nav-btn { height: 34px; min-width: 34px; padding: 0 8px; font-size: 0.8rem; }
  .nav-btn .lbl { font-size: 0.7rem; }
}

@media (max-width: 640px) {
  .back-to-top {
    width: 44px; height: 44px;
    bottom: 20px;
    right: 20px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .profile-card .avatar { width: 95px; height: 95px; }
}

@media (max-width: 380px) {
  .nav-btn .lbl { display: none; }
}

/* =========================================
   Accessibility
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .fade-up { opacity: 1; transform: none; }
  .profile-card h1 { text-shadow: 0 0 10px #ef4444; }
}