/* ============================================
   RAM PORTFOLIO - STYLE.CSS
   Modern Dark Theme with Blue/Purple Accents
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f2a;
  --bg-card: rgba(15, 15, 42, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.06);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8d;
  --accent-blue: #4f8fff;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06d6a0;
  --gradient-1: linear-gradient(135deg, #4f8fff, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #8b5cf6, #06d6a0);
  --gradient-3: linear-gradient(135deg, #4f8fff, #06d6a0);
  --shadow-glow: 0 0 30px rgba(79, 143, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(79, 143, 255, 0.3); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* ---------- CANVAS BACKGROUND ---------- */
#particleCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ---------- CONTAINER ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(10, 10, 26, 0.95); box-shadow: var(--shadow-glow); }
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height);
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800; color: var(--text-primary);
  font-family: var(--font-mono); letter-spacing: -0.5px;
}
.logo-bracket { color: var(--accent-blue); }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm); transition: var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--accent-blue); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--gradient-1); border-radius: 1px;
}
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 8px;
}
.hamburger .bar {
  width: 25px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: var(--transition);
}
.hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; font-family: var(--font-main);
  cursor: pointer; transition: var(--transition); border: none; position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient-1); color: #fff;
  box-shadow: 0 4px 15px rgba(79, 143, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79, 143, 255, 0.4); }
.btn-secondary {
  background: transparent; color: var(--accent-blue);
  border: 1px solid rgba(79, 143, 255, 0.3);
}
.btn-secondary:hover {
  background: rgba(79, 143, 255, 0.1); border-color: var(--accent-blue);
  transform: translateY(-2px);
}
.btn-icon {
  padding: 12px; border-radius: 50%;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  color: var(--text-secondary); font-size: 1.1rem;
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { color: var(--accent-blue); border-color: var(--accent-blue); transform: translateY(-2px); }

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; z-index: 1; padding: 120px 24px 60px;
  text-align: center;
}
.hero-content { max-width: 800px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(79, 143, 255, 0.1); border: 1px solid rgba(79, 143, 255, 0.2);
  color: var(--accent-blue); font-size: 0.85rem; font-weight: 500;
  margin-bottom: 24px;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 16px; }
.gradient-text {
  background: var(--gradient-1); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-tagline { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 24px; min-height: 1.8em; }
.cursor-blink { animation: blink 1s infinite; color: var(--accent-blue); font-weight: 300; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-description {
  font-size: 1.05rem; color: var(--text-secondary); line-height: 1.8;
  max-width: 650px; margin: 0 auto 32px;
}
.hero-buttons { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 48px; justify-content: center; }
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem; font-weight: 800;
  background: var(--gradient-1); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.scroll-indicator {
  position: absolute; bottom: 32px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; animation: float 3s ease-in-out infinite;
}
.mouse {
  width: 24px; height: 38px; border: 2px solid var(--text-muted);
  border-radius: 12px; position: relative;
}
.wheel {
  width: 3px; height: 8px; background: var(--accent-blue);
  border-radius: 2px; position: absolute; top: 6px; left: 50%;
  transform: translateX(-50%); animation: scroll-wheel 2s infinite;
}
@keyframes scroll-wheel { 0% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(12px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.scroll-indicator span { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- SECTIONS ---------- */
.section {
  padding: 100px 0; position: relative; z-index: 1;
}
.section-title {
  font-size: 2rem; font-weight: 800; margin-bottom: 60px; text-align: center;
}
.title-number {
  font-family: var(--font-mono); color: var(--accent-blue); font-size: 1.1rem;
  font-weight: 600; margin-right: 8px;
}

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: start; overflow: hidden; }
.image-wrapper { position: relative; width: 280px; height: 280px; margin: 0 auto 24px; }
.profile-photo {
  width: 100%; height: 100%; border-radius: var(--radius-lg);
  object-fit: cover; object-position: center top;
  position: relative; z-index: 1;
  border: 2px solid rgba(79, 143, 255, 0.2);
}
.image-border {
  position: absolute; top: 12px; left: 12px; width: 100%; height: 100%;
  border: 2px solid var(--accent-blue); border-radius: var(--radius-lg);
  z-index: 0; transition: var(--transition);
}
.image-wrapper:hover .image-border { top: 8px; left: 8px; }
.about-quick-info { display: flex; flex-direction: column; gap: 12px; }
.info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--bg-glass);
  border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--text-secondary);
}
.info-item i { color: var(--accent-blue); width: 16px; }
.about-text h3 { font-size: 1.5rem; margin-bottom: 20px; }
.about-text p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1rem; }
.highlight { color: var(--accent-blue); font-weight: 600; }
.about-interests { margin-top: 24px; }
.about-interests h4 { font-size: 1rem; color: var(--text-muted); margin-bottom: 12px; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 50px;
  background: rgba(79, 143, 255, 0.08); border: 1px solid rgba(79, 143, 255, 0.15);
  font-size: 0.85rem; color: var(--accent-blue); transition: var(--transition);
}
.tag:hover { background: rgba(79, 143, 255, 0.15); transform: translateY(-2px); }

/* ---------- SKILLS ---------- */
.skills-grid { display: flex; flex-direction: column; gap: 48px; }
.skill-category {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 32px; transition: var(--transition);
}
.skill-category:hover { border-color: rgba(79, 143, 255, 0.2); box-shadow: var(--shadow-glow); }
.category-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.category-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.category-header h3 { font-size: 1.25rem; font-weight: 700; }
.skill-bars { display: flex; flex-direction: column; gap: 20px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-name { font-size: 0.9rem; font-weight: 500; }
.skill-percent { font-size: 0.85rem; color: var(--accent-blue); font-family: var(--font-mono); }
.skill-bar {
  height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden;
}
.skill-fill {
  height: 100%; width: 0; background: var(--gradient-1); border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-fill.animate { width: var(--skill-width); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.tech-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 16px; background: var(--bg-glass);
  border: 1px solid var(--border-glass); border-radius: var(--radius-md);
  transition: var(--transition); cursor: default;
}
.tech-card i { font-size: 2rem; color: var(--accent-blue); transition: var(--transition); }
.tech-card span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.tech-card:hover {
  transform: translateY(-5px); border-color: rgba(79, 143, 255, 0.3);
  box-shadow: 0 8px 24px rgba(79, 143, 255, 0.1);
}
.tech-card:hover i { color: var(--accent-purple); transform: scale(1.15); }
.concept-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.concept-card {
  padding: 24px; background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-md); transition: var(--transition);
}
.concept-card:hover { transform: translateY(-5px); border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1); }
.concept-icon { margin-bottom: 12px; font-size: 1.5rem; color: var(--accent-purple); }
.concept-card h4 { font-size: 1rem; margin-bottom: 8px; }
.concept-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- PROJECTS ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); gap: 32px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition);
  position: relative;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow); border-color: rgba(79, 143, 255, 0.2); }
.project-image { position: relative; height: 220px; overflow: hidden; }
.project-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a3e, #0f0f2a);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--text-muted);
}
.project-image-placeholder i { font-size: 3rem; color: var(--accent-blue); }
.project-image-placeholder span { font-size: 0.9rem; }
.project-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 10, 26, 0.85); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.overlay-links { display: flex; gap: 16px; }
.overlay-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; transition: var(--transition);
}
.overlay-btn:hover { background: var(--accent-blue); border-color: var(--accent-blue); transform: scale(1.1); }
.project-content { padding: 24px; }
.project-featured {
  font-size: 0.8rem; color: var(--accent-cyan); font-weight: 600;
  font-family: var(--font-mono); margin-bottom: 8px; text-transform: uppercase;
  letter-spacing: 1px;
}
.project-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.project-description { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech span {
  padding: 4px 12px; border-radius: 4px; font-size: 0.8rem;
  background: rgba(79, 143, 255, 0.1); color: var(--accent-blue);
  font-family: var(--font-mono);
}

/* ---------- EDUCATION TIMELINE ---------- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent-blue), var(--accent-purple));
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot {
  position: absolute; left: -40px; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; z-index: 1;
  box-shadow: 0 0 20px rgba(79, 143, 255, 0.3);
}
.timeline-content {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 28px;
  transition: var(--transition);
}
.timeline-content:hover { border-color: rgba(79, 143, 255, 0.2); box-shadow: var(--shadow-glow); }
.timeline-badge {
  display: inline-block; padding: 4px 14px; border-radius: 50px;
  background: rgba(79, 143, 255, 0.1); color: var(--accent-blue);
  font-size: 0.8rem; font-family: var(--font-mono); font-weight: 600; margin-bottom: 12px;
}
.timeline-content h3 { font-size: 1.2rem; margin-bottom: 4px; }
.timeline-content h4 { font-size: 0.95rem; color: var(--accent-purple); margin-bottom: 12px; font-weight: 500; }
.timeline-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.timeline-tags span {
  padding: 4px 12px; border-radius: 4px; font-size: 0.8rem;
  background: rgba(139, 92, 246, 0.1); color: var(--accent-purple);
  font-family: var(--font-mono);
}

/* ---------- ACHIEVEMENTS ---------- */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.achievement-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
  transition: var(--transition); position: relative; overflow: hidden;
}
.achievement-card:hover { transform: translateY(-8px); border-color: rgba(79, 143, 255, 0.2); box-shadow: var(--shadow-glow); }
.achievement-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; margin: 0 auto 20px;
}
.achievement-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.achievement-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.achievement-decoration {
  position: absolute; top: -50px; right: -50px; width: 120px; height: 120px;
  border-radius: 50%; background: rgba(79, 143, 255, 0.05);
}

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 1.5rem; margin-bottom: 16px; }
.contact-info > p { color: var(--text-secondary); margin-bottom: 32px; font-size: 1rem; line-height: 1.7; }
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg-glass);
  border: 1px solid var(--border-glass); border-radius: var(--radius-md);
  transition: var(--transition);
}
.contact-item:hover { border-color: rgba(79, 143, 255, 0.2); }
.contact-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff; flex-shrink: 0;
}
.contact-item h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2px; }
.contact-item a { color: var(--text-secondary); font-size: 0.9rem; transition: var(--transition); }
.contact-item a:hover { color: var(--accent-blue); }
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 1.1rem; transition: var(--transition);
}
.social-link:hover { color: #fff; background: var(--gradient-1); border-color: transparent; transform: translateY(-3px); }

/* ---------- CONTACT FORM ---------- */
.contact-form-wrapper {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 32px;
}
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%; padding: 16px; font-size: 0.95rem;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-main); transition: var(--transition); outline: none;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79, 143, 255, 0.1); }
.form-group label {
  position: absolute; left: 16px; top: 16px;
  font-size: 0.95rem; color: var(--text-muted);
  transition: var(--transition); pointer-events: none;
  background: transparent; padding: 0 4px;
}
.form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label, .form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px; left: 12px; font-size: 0.8rem; color: var(--accent-blue);
  background: var(--bg-card);
}
.btn-submit { width: 100%; justify-content: center; padding: 16px; font-size: 1rem; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border-glass); padding: 48px 0;
  position: relative; z-index: 1;
}
.footer-content { text-align: center; }
.footer-logo { font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono); margin-bottom: 12px; }
.footer-text { color: var(--text-muted); margin-bottom: 20px; }
.footer-socials { display: flex; justify-content: center; gap: 16px; margin-bottom: 20px; }
.footer-socials a {
  color: var(--text-muted); font-size: 1.2rem; transition: var(--transition);
}
.footer-socials a:hover { color: var(--accent-blue); transform: translateY(-2px); }
.footer-copyright { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--gradient-1);
  border: none; color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: var(--transition); z-index: 999;
  box-shadow: 0 4px 15px rgba(79, 143, 255, 0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(79, 143, 255, 0.4); }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; top: var(--nav-height); left: 0; width: 100%; height: calc(100vh - var(--nav-height));
    background: rgba(10, 10, 26, 0.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 16px;
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-menu.active { transform: translateX(0); }
  .nav-link { font-size: 1.2rem; padding: 12px 24px; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-quick-info { align-items: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-title { font-size: 2.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .achievements-grid { grid-template-columns: 1fr; }
  .concept-cards { grid-template-columns: 1fr; }
  .interest-tags { justify-content: center; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.5rem; margin-bottom: 40px; }
  .container { padding: 0 16px; }
}

/* ============================================
   ENHANCED JAVASCRIPT-POWERED FEATURES
   ============================================ */

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-primary); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  /* FAILSAFE: auto-hide even if JS crashes */
  animation: preloader-failsafe 0.6s ease 4s forwards;
}
@keyframes preloader-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; animation: none; }
.preloader-inner { text-align: center; }
.preloader-logo {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 800;
  background: var(--gradient-1); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 24px; animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}
.preloader-bar {
  width: 200px; height: 3px; background: rgba(255, 255, 255, 0.08);
  border-radius: 3px; overflow: hidden; margin: 0 auto 16px;
}
.preloader-progress {
  height: 100%; width: 0; background: var(--gradient-1);
  border-radius: 3px; transition: width 0.3s ease;
}
.preloader-text {
  font-size: 0.8rem; color: var(--text-muted); letter-spacing: 2px;
  text-transform: uppercase; animation: fade-pulse 2s ease-in-out infinite;
}
@keyframes fade-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px;
  background: var(--accent-blue); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transition: transform 0.1s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
}
.cursor-outline {
  position: fixed; top: 0; left: 0; width: 36px; height: 36px;
  border: 2px solid rgba(79, 143, 255, 0.4); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-dot.hovering { transform: scale(2.5); background: var(--accent-purple); }
.cursor-outline.hovering {
  width: 56px; height: 56px; border-color: rgba(139, 92, 246, 0.5);
}
.cursor-outline.clicking { transform: scale(0.8); }

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot, .cursor-outline { display: none !important; }
}

/* ---------- 3D TILT / CARD PERSPECTIVE ---------- */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99);
  will-change: transform;
}
[data-tilt] .project-content,
[data-tilt] .achievement-icon,
[data-tilt] h3 {
  transform: translateZ(30px);
}

/* ---------- PROJECT LIVE LINK BUTTON ---------- */
.project-live-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 10px 22px;
  background: var(--gradient-1); color: #fff;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
  transition: var(--transition); position: relative; overflow: hidden;
  box-shadow: 0 4px 15px rgba(79, 143, 255, 0.25);
}
.project-live-link::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}
.project-live-link:hover::before { left: 100%; }
.project-live-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 143, 255, 0.4);
}

/* ---------- FLOATING RIBBON ---------- */
.floating-ribbon {
  position: fixed; bottom: 100px; right: -220px; z-index: 998;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 50px 0 0 50px;
  background: linear-gradient(135deg, #4f8fff, #8b5cf6);
  color: #fff; font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 8px 32px rgba(79, 143, 255, 0.35);
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.floating-ribbon.visible { right: 0; }
.floating-ribbon:hover {
  right: 0; padding-right: 32px;
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}
.floating-ribbon i { font-size: 1.1rem; animation: float 3s ease-in-out infinite; }

/* ---------- MAGNETIC BUTTON EFFECT ---------- */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
}

/* ---------- PARALLAX SECTIONS ---------- */
.section { transition: background-position 0.1s ease; }

/* ---------- STAGGER REVEAL ANIMATION ---------- */
.reveal.stagger-1 { transition-delay: 0.1s; }
.reveal.stagger-2 { transition-delay: 0.2s; }
.reveal.stagger-3 { transition-delay: 0.3s; }
.reveal.stagger-4 { transition-delay: 0.4s; }
.reveal.stagger-5 { transition-delay: 0.5s; }

/* ---------- GLITCH TEXT EFFECT ---------- */
.glitch-text {
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}
@keyframes glitch-skew {
  0%, 100% { transform: skew(0deg); }
  20% { transform: skew(-0.5deg); }
  40% { transform: skew(0.5deg); }
  60% { transform: skew(-0.3deg); }
  80% { transform: skew(0.3deg); }
}

/* ---------- RIPPLE EFFECT ON BUTTONS ---------- */
.btn .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0); animation: ripple-effect 0.6s linear;
  pointer-events: none;
}
@keyframes ripple-effect {
  to { transform: scale(4); opacity: 0; }
}

/* ---------- ENHANCED HOVER GLOW ---------- */
.project-card::after {
  content: ''; position: absolute; inset: -1px;
  border-radius: var(--radius-lg); opacity: 0;
  background: linear-gradient(135deg, rgba(79, 143, 255, 0.15), rgba(139, 92, 246, 0.15));
  transition: opacity 0.4s ease; z-index: -1;
}
.project-card:hover::after { opacity: 1; }

/* ---------- SCROLL PROGRESS BAR ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--gradient-1); z-index: 1001;
  transition: width 0.1s linear; border-radius: 0 2px 2px 0;
}

/* ---------- RESPONSIVE ADJUSTMENTS FOR NEW FEATURES ---------- */
@media (max-width: 768px) {
  .floating-ribbon { bottom: 80px; font-size: 0.8rem; padding: 10px 18px; }
  .floating-ribbon span { display: none; }
  .floating-ribbon.visible { right: 0; }
  .cursor-dot, .cursor-outline { display: none; }
}
