/* ==========================================================================
   MUHAMMAD AFAQ - 3D PORTFOLIO DESIGN SYSTEM
   Dark Obsidian & Cyan Theme with Scroll-Driven 3D Animations
   ========================================================================== */

:root {
  --bg-primary: #06080d;
  --bg-secondary: #0b0f19;
  --bg-tertiary: #111726;
  --bg-glass: rgba(13, 19, 33, 0.72);
  --bg-glass-card: rgba(16, 24, 40, 0.65);
  --bg-glass-hover: rgba(22, 33, 55, 0.85);
  
  --accent-cyan: #00f2fe;
  --accent-teal: #4facfe;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  
  --glow-cyan: rgba(0, 242, 254, 0.35);
  --glow-teal: rgba(79, 172, 254, 0.25);
  --glow-purple: rgba(139, 92, 246, 0.25);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(0, 242, 254, 0.2);
  --border-glass-hover: rgba(0, 242, 254, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  --font-display: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-height: 80px;
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: dark; font-size: 16px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent-cyan); color: #050811; }

/* 3D Canvas */
#webgl-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, #0d1527 0%, #06080d 70%);
}

.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #4facfe, #8b5cf6);
  z-index: 200;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; border: 2px solid var(--bg-primary); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* Layout */
.container {
  width: 100%; max-width: var(--container-max);
  margin: 0 auto; padding: 0 24px;
  position: relative; z-index: 2;
}

.content-layer { position: relative; z-index: 2; }

section { padding: 110px 0; position: relative; }

.section-header-centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.section-header-centered .section-subtitle {
  margin: 0 auto;
}

/* Section Tag */
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
  color: var(--accent-cyan); text-transform: uppercase; letter-spacing: 2px;
  padding: 6px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.section-tag .dot {
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.5px; line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 620px; line-height: 1.7;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   SCROLL-DRIVEN 3D REVEAL ANIMATIONS
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal="up"] {
  transform: perspective(800px) translateY(60px) rotateX(8deg);
}

[data-reveal="left"] {
  transform: perspective(800px) translateX(-80px) rotateY(6deg);
}

[data-reveal="right"] {
  transform: perspective(800px) translateX(80px) rotateY(-6deg);
}

[data-reveal="scale"] {
  transform: perspective(800px) scale(0.85) translateZ(-50px);
}

[data-reveal].revealed {
  opacity: 1;
  transform: perspective(800px) translateY(0) translateX(0) rotateX(0) rotateY(0) scale(1) translateZ(0);
}

/* Section Parallax Depth Layer (applied via JS) */
.parallax-section {
  transform-style: preserve-3d;
}

/* ==========================================================================
   SCROLL 3D TRANSITION DIVIDERS
   ========================================================================== */
.scroll-3d-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 0;
  position: relative;
  z-index: 2;
}

.divider-line {
  flex: 1;
  max-width: 260px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.35), transparent);
}

.divider-diamond {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 8px;
  transform: rotate(45deg);
  color: var(--accent-cyan);
  font-size: 0.9rem;
  background: rgba(0, 242, 254, 0.06);
  animation: float-diamond 4s ease-in-out infinite;
}

.divider-diamond i {
  transform: rotate(-45deg);
}

@keyframes float-diamond {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-8px); }
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(6, 8, 13, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 70px;
}

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

.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.5px; color: var(--text-primary);
}

.logo-badge {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #06080d; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.logo-text span { color: var(--accent-cyan); }

.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}

.nav-link {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  transition: var(--transition-fast);
  position: relative; padding: 6px 0;
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); }

.nav-link::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 0%; height: 2px;
  background: var(--accent-cyan);
  transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover, .icon-btn.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border-color: var(--border-glass);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: var(--transition-normal);
  border: none; position: relative; overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #06080d;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-glass);
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); }

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

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px; align-items: center;
}

.hero-badge-group {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 24, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.85rem; color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.hero-badge.status { border-color: rgba(16, 185, 129, 0.3); color: #34d399; }

.hero-badge.status .pulse-green {
  width: 8px; height: 8px;
  background: #10b981; border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-role {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500; color: var(--text-highlight);
  font-family: var(--font-mono); margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}

.hero-role .typing-cursor {
  display: inline-block; width: 2px; height: 1.2em;
  background-color: var(--accent-cyan);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-description {
  font-size: 1.15rem; color: var(--text-secondary);
  line-height: 1.7; max-width: 580px; margin-bottom: 36px;
}

.hero-cta-group {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px; margin-bottom: 48px;
}

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item h3 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1; margin-bottom: 6px;
}

.stat-item p {
  font-size: 0.85rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  font-family: var(--font-mono);
}

/* Hero 3D Card */
.hero-3d-visual {
  position: relative; display: flex;
  justify-content: center; align-items: center;
}

.interactive-mesh-card {
  width: 100%; max-width: 440px;
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  position: relative; transform-style: preserve-3d;
  transition: transform 0.3s ease-out, border-color 0.3s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.interactive-mesh-card:hover { border-color: var(--border-glass); }

.card-hologram-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; font-family: var(--font-mono);
  font-size: 0.8rem; color: var(--accent-cyan);
}

.card-hologram-body { text-align: center; padding: 10px 0 20px; }

.hologram-sphere-container {
  width: 130px; height: 130px;
  margin: 0 auto 20px; position: relative;
  display: flex; align-items: center; justify-content: center;
}

.hologram-ring {
  position: absolute;
  border: 2px dashed rgba(0, 242, 254, 0.4);
  border-radius: 50%;
  animation: rotate-ring 16s linear infinite;
}

.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 75%; height: 75%; border-color: rgba(79, 172, 254, 0.6); animation-direction: reverse; animation-duration: 10s; }
.ring-3 { width: 50%; height: 50%; border-style: solid; border-color: var(--accent-cyan); }

@keyframes rotate-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hologram-avatar {
  font-size: 2.8rem; font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #00f2fe, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 2;
}

.card-features-list { list-style: none; display: flex; flex-direction: column; gap: 12px; text-align: left; }

.card-features-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; color: var(--text-secondary);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-features-list li i { color: var(--accent-cyan); }

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px; margin-top: 48px;
}

.project-card-3d {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden; position: relative;
  transition: var(--transition-normal);
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column;
  transform-style: preserve-3d;
}

.project-card-3d::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0; transition: var(--transition-fast);
}

.project-card-3d:hover {
  transform: translateY(-8px);
  border-color: var(--border-glass);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-cyan);
}

.project-card-3d:hover::before { opacity: 1; }

.project-visual-wrapper {
  position: relative; width: 100%; height: 220px;
  background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.project-preview-mockup {
  width: 88%; height: 80%;
  background: #172033; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.4s ease;
}

.project-card-3d:hover .project-preview-mockup { transform: scale(1.04) translateY(-4px); }

.browser-bar {
  height: 26px; background: #0f1626;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; padding: 0 10px; gap: 6px;
}

.browser-dot { width: 8px; height: 8px; border-radius: 50%; background: #334155; }
.browser-dot.red { background: #ef4444; }
.browser-dot.yellow { background: #f59e0b; }
.browser-dot.green { background: #10b981; }

.browser-url {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  margin-left: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 10px; border-radius: 4px;
  width: 65%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.browser-canvas-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(circle at center, rgba(0, 242, 254, 0.08) 0%, transparent 70%);
}

.project-icon-large { font-size: 2.5rem; margin-bottom: 8px; }

.project-badge-live {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(6, 8, 13, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; color: #34d399;
  backdrop-filter: blur(8px); z-index: 10;
}

.project-content { padding: 28px; display: flex; flex-direction: column; flex: 1; }

.project-category {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--accent-cyan); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-display); font-size: 1.45rem;
  font-weight: 700; color: var(--text-primary); margin-bottom: 12px;
}

.project-description {
  font-size: 0.95rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 20px; flex: 1;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.tech-tag {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }

.project-link-main {
  flex: 1; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: var(--transition-fast);
}

.project-link-main:hover {
  background: var(--accent-cyan); color: #06080d;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.project-btn-preview {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary); cursor: pointer;
  transition: var(--transition-fast);
}

.project-btn-preview:hover { background: rgba(255, 255, 255, 0.1); color: var(--accent-cyan); }

/* ==========================================================================
   ABOUT, EDUCATION, SKILLS
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: start;
}

.about-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(16px);
}

.about-bio p {
  font-size: 1.05rem; color: var(--text-secondary);
  margin-bottom: 20px; line-height: 1.7;
}

.education-timeline {
  margin-top: 32px; display: flex; flex-direction: column;
  gap: 24px; position: relative;
  padding-left: 24px;
  border-left: 2px solid rgba(0, 242, 254, 0.2);
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute; left: -31px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-year {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--accent-cyan); margin-bottom: 4px;
}

.timeline-degree {
  font-family: var(--font-display); font-size: 1.2rem;
  font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
}

.timeline-institution { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 8px; }

.timeline-details { font-size: 0.9rem; color: var(--text-muted); }

/* Skills */
.skills-matrix { display: grid; grid-template-columns: 1fr; gap: 20px; }

.skill-category-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: var(--transition-fast);
}

.skill-category-card:hover {
  border-color: var(--border-glass);
  transform: translateX(4px);
}

.skill-cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.skill-cat-icon {
  width: 36px; height: 36px;
  background: rgba(0, 242, 254, 0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-cyan); font-size: 1.1rem;
}

.skill-cat-title {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary);
}

.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.skill-chip:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

/* ==========================================================================
   CONTACT SECTION (Static — No Form)
   ========================================================================== */
.contact-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.contact-channel-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  backdrop-filter: blur(16px);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.channel-left { display: flex; align-items: center; gap: 16px; }

.channel-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.channel-icon.whatsapp { background: rgba(37, 211, 102, 0.15); color: #25d366; border: 1px solid rgba(37, 211, 102, 0.3); }
.channel-icon.phone { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.channel-icon.linkedin { background: rgba(10, 102, 194, 0.15); color: #0a66c2; border: 1px solid rgba(10, 102, 194, 0.3); }
.channel-icon.email { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.channel-info h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.channel-info p { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); }

.channel-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}

.contact-channel-card:hover .channel-action-btn {
  background: var(--accent-cyan); color: #06080d;
}

/* Copy Actions Bar */
.copy-actions-bar {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 32px;
}

.copy-action-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-action-chip:hover {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   FLOATING DOCK
   ========================================================================== */
.floating-dock {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 99;
  background: rgba(11, 15, 25, 0.88);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 8px 18px; border-radius: var(--radius-full);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.2);
  transition: var(--transition-normal);
}

.dock-item {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text-primary); text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
  position: relative; font-size: 1.2rem;
}

.dock-item:hover { transform: translateY(-4px) scale(1.1); }
.dock-item.whatsapp:hover { background: #25d366; color: #fff; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
.dock-item.linkedin:hover { background: #0a66c2; color: #fff; box-shadow: 0 4px 15px rgba(10, 102, 194, 0.4); }
.dock-item.email:hover { background: #ef4444; color: #fff; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
.dock-item.phone:hover { background: #38bdf8; color: #000; box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4); }

.dock-divider { width: 1px; height: 24px; background: var(--border-subtle); }

.dock-cta {
  font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan); padding: 0 6px; display: none;
}

@media (min-width: 768px) { .dock-cta { display: block; } }

/* ==========================================================================
   MODAL & TOASTS
   ========================================================================== */
.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(4, 6, 11, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
  width: 100%; max-width: 900px; max-height: 90vh;
  background: #0b0f19;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container { transform: scale(1); }

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}

.modal-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }

.modal-close-btn {
  background: none; border: none; color: var(--text-secondary);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
  display: flex; align-items: center; justify-content: center;
}

.modal-close-btn:hover { color: var(--accent-cyan); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

/* Toast */
.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px;
}

.toast {
  background: #111726;
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-cyan);
  font-size: 0.9rem;
  display: flex; align-items: center; gap: 12px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show { transform: translateX(0); }

/* Footer */
footer {
  padding: 60px 0 120px;
  border-top: 1px solid var(--border-subtle);
  text-align: center; position: relative; z-index: 2;
}

.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.footer-text { font-size: 0.9rem; color: var(--text-secondary); }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & MOBILE FIXES
   ========================================================================== */
@media (max-width: 992px) {
  section { padding: 80px 0; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero-badge-group, .hero-cta-group { justify-content: center; }
  .hero-role { justify-content: center; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-stats { max-width: 500px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .projects-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .container {
    padding: 0 16px;
    max-width: 100%;
  }

  section { padding: 60px 0; }

  /* Navbar Mobile */
  .navbar {
    height: 60px;
  }
  .navbar.scrolled {
    height: 56px;
  }
  .nav-container {
    padding: 0;
    gap: 8px;
  }
  .logo {
    font-size: 1.1rem;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }
  .logo-badge {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .logo-text .logo-first-name {
    display: none; /* Shows MA badge + "Afaq" on mobile for zero overflow */
  }

  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  /* WhatsApp button on mobile: compact round circular icon button */
  #nav-cta-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  #nav-cta-btn span {
    display: none; /* Hide text on mobile so button is 100% visible circle */
  }
  #nav-cta-btn i {
    font-size: 1.15rem;
    margin: 0;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    flex-shrink: 0;
  }

  .nav-links {
    position: fixed;
    top: 60px; left: 0; width: 100%;
    background: rgba(6, 8, 13, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column; padding: 24px; gap: 18px;
    transform: translateY(-150%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open { transform: translateY(0); }

  /* Hero Section Mobile */
  .hero-section {
    min-height: auto;
    padding-top: calc(64px + 30px);
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.5px;
    word-break: break-word;
  }

  .hero-role {
    font-size: 1.1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 12px 20px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 20px;
  }

  .stat-item h3 { font-size: 1.5rem; }
  .stat-item p { font-size: 0.7rem; letter-spacing: 0.5px; }

  /* Hologram Card Mobile */
  .interactive-mesh-card {
    padding: 20px 16px;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .hologram-sphere-container {
    width: 100px;
    height: 100px;
    margin-bottom: 14px;
  }

  .hologram-avatar { font-size: 2.2rem; }

  /* Projects Section Mobile */
  .section-title { font-size: clamp(1.75rem, 6vw, 2.4rem); }
  .section-subtitle { font-size: 0.95rem; }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 28px;
  }

  .project-card-3d {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .project-visual-wrapper { height: 180px; }
  .project-content { padding: 20px 16px; }
  .project-title { font-size: 1.25rem; }
  .project-description { font-size: 0.9rem; }

  /* About & Skills Mobile */
  .about-card { padding: 24px 16px; border-radius: var(--radius-md); }
  .about-bio p { font-size: 0.95rem; }
  .education-timeline { padding-left: 18px; gap: 18px; }
  .timeline-dot { left: -25px; width: 10px; height: 10px; }
  .timeline-degree { font-size: 1.05rem; }
  .timeline-details { font-size: 0.85rem; }
  .skill-category-card { padding: 18px 14px; }

  /* Contact Channels Mobile */
  .contact-channels-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }

  .contact-channel-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .channel-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .channel-info h4 { font-size: 0.95rem; }
  .channel-info p { font-size: 0.8rem; word-break: break-all; }

  /* Floating Dock Mobile */
  .floating-dock {
    bottom: 16px;
    padding: 6px 12px;
    gap: 8px;
    max-width: calc(100vw - 32px);
  }

  .dock-item {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .dock-divider { height: 18px; }

  /* Mobile 3D reveal transform safety (prevent horizontal overflow) */
  [data-reveal="left"], [data-reveal="right"] {
    transform: perspective(800px) translateY(35px);
  }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .hero-title { font-size: 2rem; }
  .hero-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat-item h3 { font-size: 1.3rem; }
  .stat-item p { font-size: 0.65rem; }
  .copy-actions-bar { gap: 8px; }
  .copy-action-chip { padding: 8px 14px; font-size: 0.75rem; width: 100%; justify-content: center; }
}
