/* ========================================
   CSS Variables & Theme
   ======================================== */
:root {
  --accent-1: #818cf8;
  --accent-2: #a78bfa;
  --accent-3: #6366f1;
  --gradient-1: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #1e3a5f, #2d1b69);
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: rgba(59, 130, 246, 0.04);
  --bg-nav: rgba(10, 10, 15, 0.88);
  --text-primary: #e8e8ff;
  --text-secondary: #b8b8f0;
  --text-muted: #6b7280;
  --border-color: rgba(99, 102, 241, 0.1);
  --glass-bg: rgba(59, 130, 246, 0.05);
  --glass-border: rgba(99, 102, 241, 0.1);
  --glass-blur: blur(16px);
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 60px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --font-sans: "Google Sans", sans-serif;
  --font-mono: "Google Sans", "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --nav-height: 72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --section-padding: 110px 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  font-weight: bold;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ========================================
   Container
   ======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Loading Screen
   ======================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden { opacity: 0; visibility: hidden; }

.loader-content { text-align: center; }

.loader-logo {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.loader-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-1);
  border-radius: 10px;
  animation: loadBar 1.8s ease-in-out forwards;
}

@keyframes loadBar {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

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

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-1);
  z-index: 9998;
  width: 0%;
  transition: width 0.1s linear;
}

/* ========================================
   Dot Grid Background
   ======================================== */

/* ========================================
   Glassmorphism
   ======================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ========================================
   Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

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

.logo {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 2px;
  transition: transform var(--transition);
}

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

.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

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

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.menu-toggle:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0 12px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   Sections
   ======================================== */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 24px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(109, 129, 150, 0.12);
  border: 1px solid rgba(109, 129, 150, 0.25);
  color: var(--accent-1);
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: blink 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
  min-height: 2.2rem;
}

.typed-text { color: var(--accent-2); }

.cursor {
  color: var(--accent-1);
  animation: cursorBlink 0.8s step-end infinite;
  margin-left: 2px;
}

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

.hero-desc {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 36px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.hero-btns {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(109, 129, 150, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(109, 129, 150, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(109, 129, 150, 0.06);
  transform: translateY(-2px);
}

.btn-block { width: 100%; justify-content: center; }

/* ========================================
   Hero Image / Profile Photo
   ======================================== */
.hero-image {
  flex-shrink: 0;
  animation: fadeInUp 0.6s ease 0.35s forwards;
  opacity: 0;
}

.profile-frame {
  position: relative;
  width: 360px;
  height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.1);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeInUp 0.6s ease 0.6s forwards, bounce 2s ease-in-out infinite 1s;
  opacity: 0;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.wheel {
  width: 3px;
  height: 8px;
  background: var(--accent-1);
  border-radius: 3px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   About
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }

.about-stats {
  display: flex;
  gap: 40px;
  margin: 28px 0;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.about-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tech span {
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(109, 129, 150, 0.08);
  border: 1px solid rgba(109, 129, 150, 0.15);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.about-tech span:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.about-image { display: flex; justify-content: center; }

.image-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

.about-photo {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--gradient-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.profile-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 100%);
}

.profile-placeholder i { font-size: 3rem; opacity: 0.6; }

.profile-placeholder span {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  z-index: 1;
}

.exp-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  text-align: center;
}

.exp-number {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.exp-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* ========================================
   Skills
   ======================================== */
.skills-section { background: var(--bg-secondary); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  text-align: center;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(109, 129, 150, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.skill-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.skill-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.skill-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ========================================
   Projects
   ======================================== */
.project-all-btn {
  text-align: center;
  margin-top: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(109, 129, 150, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.project-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img { transform: scale(1.08); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--gradient-1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  transition: box-shadow var(--transition);
}

.project-link:hover { box-shadow: 0 4px 20px rgba(109, 129, 150, 0.4); }

.project-info { padding: 24px; }

.project-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(109, 129, 150, 0.1);
  color: var(--accent-1);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(109, 129, 150, 0.2);
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 48px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-1);
  border: 3px solid var(--bg-primary);
  z-index: 1;
  box-shadow: 0 0 12px rgba(109, 129, 150, 0.4);
}

.timeline-content {
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition);
}

.timeline-content:hover {
  border-color: rgba(109, 129, 150, 0.3);
  transform: translateX(4px);
}

.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(109, 129, 150, 0.12);
  color: var(--accent-1);
  margin-bottom: 12px;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 0.9rem;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Certifications
   ======================================== */
.cert-section { background: var(--bg-secondary); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.cert-card {
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.cert-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.cert-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.cert-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.cert-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(109, 129, 150, 0.08);
  border: 1px solid rgba(109, 129, 150, 0.15);
  color: var(--accent-1);
}

/* ========================================
   Contact
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
}

.contact-left .contact-socials {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contact-gif {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  padding: 8px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  width: 100%;
}

.social-btn:hover {
  border-color: var(--accent-1);
  transform: translateX(6px);
  background: rgba(59, 130, 246, 0.08);
}

.social-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.contact-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 500;
  margin-top: 12px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 40px;
}

.footer-links-right {
  text-align: right;
  margin-left: auto;
}

.footer-brand p {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent-1); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.footer-bottom .fa-heart { color: #ef4444; }

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-1);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(109, 129, 150, 0.3);
  z-index: 99;
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(109, 129, 150, 0.4);
}

/* ========================================
   Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { flex-direction: column-reverse; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-desc { margin: 0 auto 36px; }
  .hero-btns { justify-content: center; }
  .profile-frame { width: 280px; height: 280px; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }

  .nav-link { display: block; padding: 12px 0; font-size: 1rem; }

  .menu-toggle { display: flex; }

  .section { padding: 80px 0; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image { order: -1; }
  .image-wrapper { width: 220px; height: 220px; }
  .exp-badge { bottom: -15px; right: -15px; padding: 12px 18px; }
  .exp-number { font-size: 1.3rem; }

  .about-stats { gap: 24px; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); max-width: 500px; }
  .projects-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .footer-content { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer-brand p { margin: 12px auto 0; }

  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .profile-frame { width: 240px; height: 240px; }

  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.5rem; }
  .timeline::before { left: 14px; }
  .timeline-item { padding-left: 44px; }
  .timeline-dot { left: 6px; width: 16px; height: 16px; }
  .profile-frame { width: 200px; height: 200px; }
  .cert-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .nav-links { display: flex !important; }
}
