/* ============================================================
   ARXNES.DEV — Design System (arxcode_web_new style)
   ============================================================ */

:root {
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --secondary-gradient: linear-gradient(135deg, #e11d48 0%, #3b82f6 100%);
  --bg-dark: #020617;
  --bg-card: rgba(15, 23, 42, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-red: #e11d48;
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.1);
  --selection-bg: rgba(59, 130, 246, 0.3);
}

/* ── Reset & Base ────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background-color: var(--selection-bg);
  color: white;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: var(--bg-dark);
  scroll-snap-type: y mandatory;
}

html::-webkit-scrollbar {
  display: none;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* NO animation here — opacity/transform on body breaks position:fixed */ 
}

/* Fade-in applied to content wrapper, NOT body */
.page-fade {
  animation: pageFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Background glows ────────────────────────────────────── */
.main-glow {
  position: fixed;
  top: -10%;
  right: -5%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(2, 6, 23, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.secondary-glow {
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(2, 6, 23, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

canvas#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
  pointer-events: none;
}

/* ── Utilities ───────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 2;
  width: 100%;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.95rem;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 8px 24px -6px rgba(59, 130, 246, 0.45);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -6px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding: 1.4rem 0;
  background: rgba(2, 6, 23, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Compact state — activated when hero section leaves viewport */
.navbar.scrolled {
  padding: 0.7rem 0;
  background: rgba(2, 6, 23, 0.97);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: white;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.nav-brand:hover img {
  border-color: rgba(6, 182, 212, 0.55);
  transform: rotate(10deg) scale(1.05);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

/* Lang toggle in nav */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.lang-flag {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}

.mobile-toggle {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0.5rem;
}

/* ── Side Nav Dots (fixed, right side) ──────────────── */
.side-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 500;
}

.nav-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.35s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.3);
}

.nav-dot.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.65);
}

/* ── Sections ────────────────────────────────────────────── */
.section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  z-index: 2;
}

/* ── Section headers ─────────────────────────────────────── */
.section-header {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-blue);
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
  gap: 0;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  margin: 0 auto 1.75rem;
  border: 3px solid rgba(59, 130, 246, 0.35);
  box-shadow:
    0 0 0 6px rgba(59, 130, 246, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-title {
  font-size: clamp(2.25rem, 8vw, 5rem);
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  letter-spacing: clamp(-1px, -0.04em, -2px);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.05;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero social buttons */
.hero-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero-social-btn:hover {
  color: white;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.4);
}

.hero-social-btn i {
  font-size: 1rem;
}

/* ── Friends Grid ────────────────────────────────────────── */
.friends-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.friends-scroll-dots {
  display: none;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.fsd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fsd-dot:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.2);
}

.fsd-dot.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.65);
}

.friend-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 220px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.friend-card:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-10px);
  box-shadow: 0 24px 48px -12px rgba(59, 130, 246, 0.2);
}

.friend-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-blue);
  transition: all 0.3s ease;
}

.friend-card:hover .friend-avatar-wrap {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

/* Keep compatibility with existing friends.js which targets .friend-avatar */
.friend-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-blue);
  transition: all 0.3s ease;
}

.friend-card:hover .friend-avatar {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-info {
  text-align: center;
}

.friend-name {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.friend-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.friend-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.friend-links a:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(59, 130, 246, 0.5);
}

/* ── Projects Grid ────────────────────────────────────────── */
.projects-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 25px calc((100vw - min(1100px, 100vw - 4rem)) / 2);
  gap: 1.5rem;
  justify-content: safe center;
}

.projects-grid::-webkit-scrollbar {
  display: none;
}

.projects-scroll-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.project-card {
  flex-shrink: 0;
  scroll-snap-align: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 290px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.project-card:hover {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-8px);
  box-shadow: 0 16px 32px -8px rgba(6, 182, 212, 0.25);
}

.project-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  border: 2px solid rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  transition: all 0.3s ease;
}

.project-card:hover .project-icon-wrap {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
  transform: rotate(5deg) scale(1.05);
}

.project-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

.project-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  min-height: 64px;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: auto;
}

.project-tech-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  transition: all 0.25s ease;
}

.project-card:hover .project-tech-tag {
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--text-primary);
}

.project-links {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.4rem;
}

.project-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-btn.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.project-btn.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.project-btn.btn-secondary:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.project-btn.disabled {
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--glass-border) !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* ── Contact Icons ───────────────────────────────────────── */
.contact-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.contact-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.75rem 2rem;
  border-radius: 1.25rem;
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  min-width: 110px;
}

.contact-icon-btn i {
  font-size: 1.75rem;
  transition: transform 0.3s ease;
}

.contact-icon-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: white;
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.35);
}

.contact-icon-btn:hover i {
  transform: scale(1.15);
}

.contact-icon-btn.github:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255,255,255,0.25); }
.contact-icon-btn.discord:hover { background: rgba(88, 101, 242, 0.15); border-color: rgba(88, 101, 242, 0.4); }
.contact-icon-btn.email:hover   { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.4); }

/* ── Reveal Animations ───────────────────────────────────── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-on-scroll.delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.delay-2 { transition-delay: 0.2s; }
.reveal-on-scroll.delay-3 { transition-delay: 0.3s; }
.reveal-on-scroll.delay-4 { transition-delay: 0.4s; }
.reveal-on-scroll.delay-5 { transition-delay: 0.5s; }
.reveal-on-scroll.delay-6 { transition-delay: 0.6s; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Fluid layout for all screen sizes
   Breakpoints: 1440 / 1024 / 768 / 480 / 375 / 320
══════════════════════════════════════════════════════════ */

/* ── 1440px+ (large desktops / 2K) ──────────────────────── */
@media (min-width: 1440px) {
  .container { max-width: 1280px; }
  .section-title { font-size: 3.5rem; }
  .profile-avatar { width: 170px; height: 170px; }
  .friend-card { width: 240px; padding: 3rem 2.25rem; }
  .contact-icon-btn { min-width: 130px; padding: 2rem 2.25rem; }
  .contact-icon-btn i { font-size: 2rem; }
  .projects-grid {
    padding: 25px calc((100vw - min(1280px, 100vw - 4rem)) / 2);
  }
}

/* ── 1620px+ (Very large desktops / 4K - center if fits) ── */
@media (min-width: 1620px) {
  .projects-grid {
    justify-content: center;
    padding: 25px 2rem;
    margin: 0 auto;
    width: 100%;
    overflow-x: visible;
  }
  .projects-scroll-dots {
    display: none !important;
  }
}

/* ── 1200px (laptops / tablets landscape) ────────────────── */
@media (max-width: 1200px) {
  html {
    scroll-snap-type: none;
  }

  .section {
    scroll-snap-align: none;
    scroll-snap-stop: unset;
  }

}

/* ── 1024px (small laptops / large tablets landscape) ────── */
@media (max-width: 1024px) {
  .container { max-width: 900px; }
  .friend-card { width: 200px; }
}

/* ── 768px (tablets portrait / large phones landscape) ───── */
@media (max-width: 768px) {
  /* Navbar */
  .nav-links { display: none; }
  .mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
  }

  .nav-links.open a { font-size: 1.05rem; padding: 0.25rem 0; }

  /* Section & typography */
  .section { padding: 90px 1.25rem 50px; }
  .section-title { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .section-subtitle { font-size: 1rem; }

  /* Hero */
  .profile-avatar { width: 130px; height: 130px; }
  .hero-socials { gap: 0.75rem; }
  .hero-social-btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

  /* Side nav — hide on tablet/mobile */
  .side-nav { display: none; }

  /* Friends */
  .friends-grid { gap: 1.25rem; }
  .friend-card { width: 170px; padding: 1.75rem 1.25rem; }

  /* Projects */
  .projects-grid {
    display: grid;
    grid-template-columns: 290px;
    justify-content: center;
    overflow-x: visible;
  }
  .projects-scroll-dots {
    display: none !important;
  }

  /* Contact */
  .contact-icons { gap: 1rem; }
  .contact-icon-btn { min-width: 95px; padding: 1.25rem 1rem; font-size: 0.82rem; }
  .contact-icon-btn i { font-size: 1.5rem; }
}

/* ── 480px (large phones portrait) ──────────────────────── */
@media (max-width: 480px) {
  .section { padding: 80px 1rem 45px; }

  /* Profile */
  .profile-avatar { width: 110px; height: 110px; margin-bottom: 1.25rem; }

  /* Hero buttons — stack on very narrow */
  .hero-socials { gap: 0.6rem; }
  .hero-social-btn { padding: 0.55rem 1rem; font-size: 0.82rem; }

  /* Badge */
  .badge { font-size: 0.8rem; padding: 0.4rem 0.85rem; }

  /* Friends — vertical stack */
  .friends-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .friend-card {
    width: 100%;
    max-width: 280px;
    padding: 1.75rem 1.25rem;
  }

  .friends-scroll-dots {
    display: none !important;
  }

  /* Projects — vertical stack */
  .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.5rem;
    overflow-x: visible;
  }
  .project-card {
    width: 100%;
    max-width: 290px;
    padding: 1.5rem 1.25rem;
  }

  .projects-scroll-dots {
    display: none !important;
  }

  /* Contact */
  .contact-icons { gap: 0.75rem; }
  .contact-icon-btn {
    min-width: 82px;
    padding: 1rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 1rem;
  }
  .contact-icon-btn i { font-size: 1.35rem; }

  /* Navbar */
  .nav-brand { font-size: 1.3rem; }
  .navbar { padding: 1rem 0; }
}

/* ── 375px (standard small phones: iPhone SE / 14 mini) ──── */
@media (max-width: 375px) {
  .section { padding: 75px 0.875rem 40px; }

  .profile-avatar { width: 95px; height: 95px; margin-bottom: 1rem; }

  .hero-socials {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .hero-social-btn {
    width: 100%;
    max-width: 220px;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .friend-card { width: 100%; max-width: 260px; padding: 1.35rem 1rem; }
  .friend-avatar { width: 65px; height: 65px; font-size: 1.6rem; }
  .friend-name { font-size: 1rem; }

  .contact-icons { gap: 0.6rem; }
  .contact-icon-btn { min-width: 75px; padding: 0.9rem 0.6rem; font-size: 0.75rem; }
  .contact-icon-btn i { font-size: 1.25rem; }

  .section-subtitle { font-size: 0.9rem; }
  .badge { font-size: 0.75rem; }
}

/* ── 320px (very small phones: iPhone 5/SE 1st gen) ─────── */
@media (max-width: 320px) {
  .section { padding: 70px 0.75rem 35px; }
  .profile-avatar { width: 80px; height: 80px; }
  .friend-card { width: 100%; max-width: 250px; }
  .contact-icon-btn { min-width: 68px; padding: 0.8rem 0.5rem; font-size: 0.72rem; }
  .contact-icon-btn i { font-size: 1.15rem; }
  .nav-brand { font-size: 1.15rem; }
  .navbar { padding: 0.85rem 0; }
}