@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap");

:root {
  --bg-color: #030712;
  --card-bg: rgba(17, 24, 39, 0.7);
  --nav-bg: rgba(3, 7, 18, 0.8);
  --nav-menu-bg: rgba(3, 7, 18, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #ffffff;
  --heading-color: #ffffff;
  --glass-rgb: 255, 255, 255;
  --input-bg: rgba(0, 0, 0, 0.2);
  --accent-color: #f9ca24;
  --accent-gradient: linear-gradient(135deg, #f9ca24, #e67e22);
  --accent-hover: linear-gradient(135deg, #e67e22, #d4a017);
  --info-color: #06b6d4;
}

body.light-mode {
  --bg-color: #faf6ee;
  --card-bg: rgba(255, 255, 255, 0.85);
  --nav-bg: rgba(250, 246, 238, 0.9);
  --nav-menu-bg: rgba(250, 246, 238, 0.65);
  --border-color: rgba(217, 119, 6, 0.15);
  --text-main: #2d3748;
  --text-muted: #4a5568;
  --heading-color: #1a202c;
  --glass-rgb: 255, 255, 255;
  --input-bg: rgba(255, 255, 255, 0.95);
  --accent-color: #d97706;
  --accent-gradient: linear-gradient(135deg, #d97706, #b45309);
  --accent-hover: linear-gradient(135deg, #b45309, #92400e);
  --info-color: #0e7490;
}

* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; -webkit-tap-highlight-color: transparent !important; }
button:focus, a:focus { outline: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

body.menu-active,
html.menu-active,
body.loading,
html.loading {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Hide scroll progress and scroll-up button during initial loading to prevent jumping visual artifacts */
html.loading .scroll-progress,
body.loading .scroll-progress,
html.loading .scroll-up-btn,
body.loading .scroll-up-btn {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body::before, body::after {
  content: ''; position: fixed; border-radius: 50%; z-index: -1; pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
body::before { 
  top: 5%; left: -10%; width: 600px; height: 600px; 
  background: radial-gradient(circle, rgba(249, 202, 36, 0.15) 0%, rgba(249, 202, 36, 0) 70%); 
  transform: translate3d(calc(var(--mouse-x, 0) * 30px), calc(var(--mouse-y, 0) * 30px), 0); 
  animation: bgBreathe1 8s infinite alternate ease-in-out; 
}
body::after { 
  top: 35%; right: -10%; width: 700px; height: 700px; 
  background: radial-gradient(circle, rgba(230, 126, 34, 0.12) 0%, rgba(230, 126, 34, 0) 70%); 
  transform: translate3d(calc(var(--mouse-x, 0) * -40px), calc(var(--mouse-y, 0) * -40px), 0); 
  animation: bgBreathe2 10s infinite alternate ease-in-out; 
}

@keyframes bgBreathe1 {
  0% { transform: translate3d(calc(var(--mouse-x, 0) * 30px), calc(var(--mouse-y, 0) * 30px), 0) scale(1); opacity: 0.8; }
  100% { transform: translate3d(calc(var(--mouse-x, 0) * 30px), calc(var(--mouse-y, 0) * 30px), 0) scale(1.1); opacity: 1; }
}
@keyframes bgBreathe2 {
  0% { transform: translate3d(calc(var(--mouse-x, 0) * -40px), calc(var(--mouse-y, 0) * -40px), 0) scale(1); opacity: 0.8; }
  100% { transform: translate3d(calc(var(--mouse-x, 0) * -40px), calc(var(--mouse-y, 0) * -40px), 0) scale(1.05); opacity: 1; }
}

/* ===== HARDWARE GPU ACCELERATION FOR BUTTERY SMOOTH SCROLLING ===== */
.navbar,
.services .box,
.education .box,
.skills-bg,
.cert-card,
.contact .contact-content,
.project-link,
.interest,
.check-bg,
.about .about-content .right a,
.btn-hire {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--accent-gradient); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

section { padding: 40px 0; position: relative; }
.max-width { max-width: 1200px; padding: 0 40px; margin: auto; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--accent-gradient);
  z-index: 10000;
  width: 0%;
  box-shadow: 0 0 10px rgba(249, 202, 36, 0.8);
  will-change: width;
}

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered box reveals */
.reveal .box-container .box {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: opacity, transform;
}
.reveal.active .box-container .box {
  opacity: 1;
  transform: translateY(0);
}
.reveal.active .box-container .box:nth-child(1) { transition-delay: 0.1s, 0.1s, 0s, 0s; }
.reveal.active .box-container .box:nth-child(2) { transition-delay: 0.2s, 0.2s, 0s, 0s; }
.reveal.active .box-container .box:nth-child(3) { transition-delay: 0.3s, 0.3s, 0s, 0s; }
.reveal.active .box-container .box:nth-child(4) { transition-delay: 0.4s, 0.4s, 0s, 0s; }
.reveal.active .box-container .box:nth-child(5) { transition-delay: 0.5s, 0.5s, 0s, 0s; }
.reveal.active .box-container .box:nth-child(6) { transition-delay: 0.6s, 0.6s, 0s, 0s; }

/* ===== SECTION TITLES ===== */
section .title {
  font-family: 'Outfit', sans-serif;
  font-size: 48px; font-weight: 800; text-align: center; margin-bottom: 35px;
  background: var(--accent-gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  position: relative; display: block;
}
section .title::after {
  content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 4px; background: var(--accent-gradient); border-radius: 4px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 999; padding: 20px 0;
  background: var(--nav-bg); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color); transition: all 0.3s ease;
}
.navbar .max-width { display: flex; align-items: center; justify-content: space-between; position: relative; }
.navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: 1.5px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}
.navbar-brand span {
  color: var(--accent-color);
  -webkit-text-fill-color: var(--accent-color);
}
.navbar-brand:hover { opacity: 0.85; }
.navbar .menu { display: flex; align-items: center; gap: 20px; margin-left: 30px; }
.navbar .menu li { list-style: none; }
.navbar .menu .admin-nav-item { display: none; }
.navbar .menu li a {
  color: var(--text-main); font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.8px; transition: color 0.3s ease; position: relative; white-space: nowrap;
}
.navbar .menu li a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; width: 0%; height: 2px;
  background: var(--accent-gradient); transition: width 0.3s ease;
}
@media (hover: hover) {
  .navbar .menu li a:hover::after { width: 100%; }
  .navbar .menu li a:hover { color: var(--accent-color); }
}
.menu-btn { color: var(--heading-color); font-size: 26px; cursor: pointer; display: none; position: absolute; right: 40px; }
.menu-btn i.active:before { content: "\f00d"; }

/* ===== HOME / HERO ===== */
.home { display: flex; align-items: center; min-height: 100vh; padding-top: 80px; }
.home .max-width { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.home .home-content { flex: 1; z-index: 2; }
.home .home-content .text-1 { font-size: 20px; color: var(--accent-color); font-weight: 600; margin-bottom: 15px; letter-spacing: 2px; text-transform: uppercase; }
.home .home-content .text-2 { font-family: 'Outfit', sans-serif; font-size: 80px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; color: var(--heading-color); letter-spacing: -1px; text-shadow: 0 0 40px rgba(var(--glass-rgb),0.3); }
.home .home-content .text-3 { font-size: 32px; font-weight: 500; color: var(--text-muted); margin-bottom: 40px; }
.home .home-content .text-3 span { font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#typewriter::after { content: '|'; animation: blink 1s infinite; color: var(--accent-color); font-weight: 300; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.btn-hire {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-gradient); color: #ffffff !important;
  padding: 14px 28px; border-radius: 14px; font-weight: 600; font-size: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 20px rgba(249, 202, 36, 0.2);
  position: relative; overflow: hidden; letter-spacing: 0.5px;
}
.btn-hire::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-25deg); transition: all 0.6s ease;
}
.btn-hire i { transition: transform 0.3s; }
@media (hover: hover) {
  .btn-hire:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(249, 202, 36, 0.4); }
  .btn-hire:hover::before { left: 150%; }
  .btn-hire:hover i { transform: translateX(5px); }
}

.social_icon { display: flex; gap: 15px; list-style: none; margin-bottom: 0; }
.social_icon li a {
  display: flex; align-items: center; justify-content: center; width: 50px; height: 50px;
  background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px;
  color: var(--text-main); font-size: 20px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}
@media (hover: hover) {
  .social_icon li a:hover {
    background: var(--accent-gradient); border-color: transparent; color: var(--heading-color);
    transform: translateY(-5px); box-shadow: 0 10px 25px rgba(249, 202, 36, 0.4);
  }
}

.hero-photo {
  width: 420px; height: 420px; border-radius: 30px; overflow: visible;
  border: 1px solid rgba(var(--glass-rgb),0.1); padding: 15px;
  background: linear-gradient(135deg, rgba(var(--glass-rgb),0.05), rgba(var(--glass-rgb),0.01));
  backdrop-filter: blur(10px);
  transform: none;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 30px rgba(249, 202, 36, 0.15);
  position: relative;
}
.hero-photo::after {
  content: ''; position: absolute; inset: -2px; border-radius: 32px;
  background: var(--accent-gradient); z-index: -1;
  animation: pulse 3s infinite alternate;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(1.03); opacity: 0.8; box-shadow: 0 0 40px rgba(249, 202, 36, 0.6); }
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 20px; }

/* ===== ABOUT ===== */
.about .about-content { display: flex; gap: 40px; align-items: center; }
.about .about-content .left { flex: 0 0 400px; position: relative; }
.about .about-content .left::before {
  content: ''; position: absolute; inset: -10px; background: var(--accent-gradient);
  border-radius: 30px; z-index: -1; opacity: 0.3; filter: blur(20px);
}
.about .about-content .left img {
  width: 100%; height: 480px; object-fit: cover; object-position: top; border-radius: 24px;
  border: 1px solid var(--border-color); box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.about .about-content .right { flex: 1; }
.about .about-content .right .text { font-family: 'Outfit', sans-serif; font-size: 36px; font-weight: 700; margin-bottom: 25px; }
.about .about-content .right .text span { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about .about-content .right p { font-size: 16px; line-height: 1.8; color: var(--text-muted); margin-bottom: 35px; }

.interest-bg {
  display: flex; flex-wrap: wrap; gap: 15px; align-items: center; margin-bottom: 30px;
  padding: 25px; background: var(--card-bg); border-radius: 20px; border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}
.interest-label { font-weight: 600; color: var(--heading-color); font-size: 16px; width: 100%; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.interest { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; min-width: 80px; }
.interest .i-img {
  width: 55px; height: 55px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-main);
  background: rgba(var(--glass-rgb),0.03); border-radius: 14px; border: 1px solid var(--border-color);
  transition: all 0.3s;
}
.interest p { font-size: 13px; font-weight: 500; color: var(--text-muted); }
@media (hover: hover) {
  .interest:hover .i-img {
    background: var(--accent-gradient); color: #ffffff; border-color: transparent;
    transform: translateY(-5px); box-shadow: 0 10px 20px rgba(249,202,36,0.3);
  }
}

.about .about-content .right a {
  display: inline-block; background: var(--accent-gradient); color: var(--heading-color);
  padding: 16px 36px; border-radius: 12px; font-weight: 600; font-size: 16px;
  transition: all 0.4s ease; box-shadow: 0 10px 20px rgba(249, 202, 36, 0.2);
  position: relative; overflow: hidden;
}
.about .about-content .right a::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(var(--glass-rgb),0.3), transparent);
  transform: skewX(-25deg); transition: all 0.6s ease;
}
@media (hover: hover) {
  .about .about-content .right a:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(249, 202, 36, 0.4); }
  .about .about-content .right a:hover::before { left: 150%; }
}

/* ===== SERVICES / WORKS ===== */
.services .box-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.services .box {
  background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
  padding: 40px 30px; transition: all 0.4s ease; backdrop-filter: blur(12px); position: relative;
}
.services .box:hover {
  border-color: rgba(249, 202, 36, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(249, 202, 36, 0.05);
}
.services .box > span {
  display: inline-block; padding: 6px 14px; background: rgba(249, 202, 36, 0.1);
  color: var(--accent-color); border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px;
}
.services .box i { display: none; }
.services .box h3 { font-family: 'Outfit', sans-serif; font-size: 24px; margin-bottom: 15px; font-weight: 600; color: var(--heading-color); }
.services .box p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 25px; }
.project-link {
  display: inline-flex; align-items: center; color: var(--heading-color); font-weight: 500; font-size: 14px;
  padding: 10px 20px; background: rgba(var(--glass-rgb),0.05); border-radius: 8px; transition: all 0.3s;
}
@media (hover: hover) {
  .project-link:hover { background: var(--accent-gradient); box-shadow: 0 5px 15px rgba(249, 202, 36, 0.3); }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.projects-loading { text-align: center; padding: 60px; color: var(--text-muted); width: 100%; grid-column: 1 / -1; }
.spinner {
  width: 50px; height: 50px; border: 3px solid rgba(var(--glass-rgb),0.1); border-top-color: var(--accent-color);
  border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EDUCATION ===== */
.education .box-container {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px;
}
.education .box {
  background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px;
  padding: 30px 25px; transition: all 0.4s ease; backdrop-filter: blur(10px); position: relative;
  margin-top: 20px;
}
@media (hover: hover) {
  .education .box:hover {
    transform: translateY(-5px); border-color: rgba(249, 202, 36, 0.4);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }
}
.education .box span {
  position: absolute; top: -16px; left: 45px;
  background: #374151; color: #f9ca24; border-radius: 20px;
  padding: 6px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
body.light-mode .education .box span {
  background: #f1f5f9; border: 1px solid var(--border-color); color: #d97706; box-shadow: none;
}
.education .box h3 {
  font-family: 'Outfit', sans-serif; font-size: 24px; margin-bottom: 12px; margin-top: 5px; color: #f9ca24;
}
body.light-mode .education .box h3 { color: #d97706; }
.education .box p { color: var(--text-muted); line-height: 1.6; font-size: 15px; }
.education .box i {
  position: absolute; top: -18px; left: -15px; font-size: 26px; color: var(--heading-color);
  background: var(--bg-color); border-radius: 50%; padding: 5px;
}

/* ===== SKILLS ===== */
.skills .text { text-align: center; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; line-height: 1.6; font-size: 16px; }
.skills-content { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; max-width: 900px; margin: 0 auto; }
.skills-bg {
  width: 110px; height: 110px; display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  position: relative;
}
.skills-bg::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--heading-color);
  color: var(--bg-color);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}
.skills-bg::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border-width: 6px;
  border-style: solid;
  border-color: var(--heading-color) transparent transparent transparent;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.skills1 {
  width: 55px;
  height: 55px;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@media (hover: hover) {
  .skills-bg:hover::after, .skills-bg:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .skills-bg:hover {
    transform: translateY(-10px) scale(1.05); border-color: var(--accent-color);
    background: rgba(249, 202, 36, 0.05); box-shadow: 0 15px 30px rgba(249, 202, 36, 0.2);
  }
  .skills-bg:hover .skills1 {
    transform: scale(1.1);
    filter: drop-shadow(0 8px 15px rgba(249, 202, 36, 0.5));
  }
}
/* Touch haptics and tooltip triggers for touch screens when held/tapped */
.skills-bg:active::after, .skills-bg:active::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.05s ease, transform 0.05s ease !important;
}
.skills-bg:active {
  transform: translateY(-5px) scale(1.05) !important;
  border-color: var(--accent-color) !important;
  background: rgba(249, 202, 36, 0.05) !important;
  box-shadow: 0 10px 20px rgba(249, 202, 36, 0.2) !important;
}
.skills-bg:active .skills1 {
  transform: scale(1.1);
  filter: drop-shadow(0 8px 15px rgba(249, 202, 36, 0.5)) !important;
}

/* ===== CERTIFICATES ===== */
.cert-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 12px;
}
.cert-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--heading-color);
  margin-bottom: 50px;
  line-height: 1.1;
}
.cert-heading span {
  color: var(--accent-color);
  -webkit-text-fill-color: var(--accent-color);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 35px;
  margin-top: 50px;
}
.cert-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) {
  .cert-card:hover {
    border-color: rgba(249, 202, 36, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(249, 202, 36, 0.1);
  }
}
.cert-preview {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid;
  border-image: var(--accent-gradient) 1;
}
.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
@media (hover: hover) {
  .cert-card:hover .cert-img {
    transform: scale(1.05);
  }
}
.cert-body {
  padding: 28px 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cert-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cert-title-row h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.3;
  flex-shrink: 0;
}
.cert-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-top: 4px;
}
.cert-badge--green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.cert-badge--cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.cert-badge--yellow {
  background: rgba(249, 202, 36, 0.15);
  color: #f9ca24;
  border: 1px solid rgba(249, 202, 36, 0.3);
}
body.light-mode .cert-badge--green {
  background: rgba(4, 120, 87, 0.1);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.25);
}
body.light-mode .cert-badge--cyan {
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.25);
}
body.light-mode .cert-badge--yellow {
  background: rgba(180, 83, 9, 0.1);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}
.cert-org {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.light-mode .cert-org {
  color: #4a5568;
}
.cert-date {
  font-size: 14px;
  color: #f9ca24;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.light-mode .cert-date {
  color: #d97706;
}
.cert-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}



/* ===== BLOG & MOMENTS ===== */
.blog-subtitle {
  font-size: 14px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 5px;
  font-family: 'Outfit', sans-serif;
  -webkit-text-fill-color: var(--accent-color);
}
.blog-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: transparent;
}
.blog-container:nth-child(even) {
  flex-direction: row-reverse;
}
.blog-container:nth-child(even) .blog-content {
  align-items: flex-start;
  text-align: left;
}
.blog-container:nth-child(even) .blog-divider,
.blog-container:nth-child(even) .blog-date {
  align-self: flex-start;
}
.blog-image {
  flex: 0 0 35%;
  max-width: 35%;
}
.blog-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.blog-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.blog-date {
  display: inline-block;
  background: rgba(249, 202, 36, 0.1);
  color: #f9ca24;
  border: 1px solid rgba(249, 202, 36, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
  align-self: flex-start;
}
body.light-mode .blog-date {
  background: rgba(180, 83, 9, 0.1);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}
.blog-post-title {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.3;
  margin-bottom: 20px;
}
.blog-divider {
  border: none;
  height: 3px;
  width: 40px;
  background: var(--accent-color);
  margin-bottom: 25px;
  align-self: flex-start;
}
.blog-text {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
}
@media (max-width: 900px) {
  .blog-container, .blog-container:nth-child(even) {
    flex-direction: column;
  }
  .blog-container:nth-child(even) .blog-content {
    align-items: flex-start;
    text-align: left;
  }
  .blog-container:nth-child(even) .blog-divider,
  .blog-container:nth-child(even) .blog-date {
    align-self: flex-start;
  }
  .blog-image {
    max-width: 100%;
  }
}


/* ===== TEAMS / CHECK ME ===== */
.teams .text { text-align: center; color: var(--text-muted); margin-bottom: 30px; font-size: 16px; }
.check-me { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.check-bg {
  width: 180px; padding: 35px 20px; background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (hover: hover) {
  .check-bg:hover {
    background: var(--accent-gradient); border-color: transparent;
    box-shadow: 0 20px 40px rgba(249, 202, 36, 0.3);
  }
}
.check-bg i { font-size: 60px; color: var(--text-main); transition: all 0.3s; }
@media (hover: hover) {
  .check-bg:hover i { transform: scale(1.1); color: #ffffff; }
}
.check-bg p { color: var(--heading-color); font-weight: 600; font-size: 15px; letter-spacing: 1px; }

/* ===== CONTACT ===== */
.contact .contact-content { display: flex; gap: 40px; background: var(--card-bg); padding: 40px; border-radius: 30px; border: 1px solid var(--border-color); backdrop-filter: blur(10px); }
.contact .column { flex: 1; }
.contact .text { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 700; margin-bottom: 25px; color: var(--heading-color); }
.contact .right p { color: var(--text-muted); line-height: 1.7; margin-bottom: 40px; font-size: 16px; }
.contact .row { display: flex; align-items: center; gap: 25px; margin-bottom: 30px; }
.contact .row i {
  width: 55px; height: 55px; background: rgba(var(--glass-rgb),0.03); border: 1px solid var(--border-color);
  color: var(--accent-color); display: flex; align-items: center; justify-content: center;
  border-radius: 16px; font-size: 22px; transition: all 0.3s;
}
@media (hover: hover) {
  .contact .row:hover i { background: var(--accent-gradient); color: #ffffff; border-color: transparent; transform: scale(1.05); }
}
.contact .info .head { font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact .info .sub-title, .contact .info .sub-title a { color: var(--heading-color); font-size: 16px; font-weight: 500; transition: color 0.3s; }
@media (hover: hover) {
  .contact .info .sub-title a:hover { color: var(--accent-color); }
}

.contact form .fields { display: flex; gap: 20px; margin-bottom: 20px; }
.contact form .field { flex: 1; }
.contact form input, .contact form textarea {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border-color);
  padding: 18px 24px; border-radius: 16px; color: var(--heading-color); font-family: 'Inter', sans-serif;
  font-size: 15px; transition: all 0.3s; outline: none;
}
.contact form textarea { height: 120px; resize: none; margin-bottom: 20px; }
.contact form input::placeholder, .contact form textarea::placeholder { color: #6b7280; }
.contact form input:focus, .contact form textarea:focus {
  border-color: var(--accent-color); background: rgba(249, 202, 36, 0.05); box-shadow: 0 0 0 4px rgba(249, 202, 36, 0.1);
}
.contact form button {
  background: var(--accent-gradient); color: var(--heading-color); border: none; padding: 18px 40px;
  border-radius: 16px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.4s; width: 100%; letter-spacing: 1px;
  position: relative; overflow: hidden;
}
.contact form button::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(var(--glass-rgb),0.3), transparent);
  transform: skewX(-25deg); transition: all 0.6s ease;
}
@media (hover: hover) {
  .contact form button:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(249, 202, 36, 0.3); }
  .contact form button:hover::before { left: 150%; }
}

.alert { margin-top: 20px; padding: 16px; background: rgba(16, 185, 129, 0.1); border: 1px solid #10b981; color: #10b981; border-radius: 12px; font-weight: 500; text-align: center; visibility: hidden; }
.alert.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.contact form input.invalid-field, .contact form textarea.invalid-field {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 15px;
  margin-top: 50px;
  backdrop-filter: blur(10px);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 25px;
}
.footer-col {
  flex: 1;
  min-width: 200px;
}
.footer-col h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  color: var(--heading-color);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.footer-col p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: var(--text-muted);
  transition: all 0.3s ease;
  font-size: 15px;
}
@media (hover: hover) {
  .footer-col ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
  }
}
.footer .social-links {
  display: flex;
  gap: 15px;
}
.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(var(--glass-rgb), 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 18px;
  transition: all 0.3s;
}
@media (hover: hover) {
  .footer .social-links a:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(249, 202, 36, 0.3);
  }
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--glass-rgb), 0.05);
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .max-width { padding: 0 40px; }
  .about .about-content { flex-direction: column; text-align: center; }
  .about .about-content .left { width: 100%; max-width: 500px; }
  .interest-bg { justify-content: center; }
  .interest-label { text-align: center; }
  .contact .contact-content { flex-direction: column; padding: 40px; }
}

@media (max-width: 768px) {
  /* Completely hide heavy fixed background spheres on mobile to release GPU rendering memory and paint queues */
  body::before, body::after {
    display: none !important;
  }
  
  /* Disable intensive real-time backdrop blur filtering globally on mobile screens to save massive GPU cycles */
  .navbar,
  .services .box,
  .education .box,
  .cert-card,
  .skills-bg,
  .social_icon li a,
  .hero-photo,
  .interest-bg,
  .contact .contact-content,
  .modal-content,
  .footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Make background colors slightly more opaque on mobile to keep high-premium legibility without blurs */
  :root {
    --card-bg: rgba(17, 24, 39, 0.96) !important;
    --nav-bg: rgba(11, 15, 30, 0.97) !important;
  }
  body.light-mode {
    --card-bg: rgba(255, 255, 255, 0.98) !important;
    --nav-bg: rgba(255, 255, 255, 0.98) !important;
  }

  /* Simplify and optimize reveal transitions on mobile to prevent paint jank */
  .reveal {
    transform: translateY(20px) !important;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out !important;
  }
  .reveal.active {
    transform: translateY(0) !important;
  }
  
  .reveal .box-container .box {
    transform: translateY(15px) !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.4s ease, border-color 0.4s ease !important;
  }
  .reveal.active .box-container .box {
    transform: translateY(0) !important;
  }

  .menu-btn { display: block; z-index: 1000; }
  .theme-switch {
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    margin-left: 0;
  }
  .navbar-brand {
    position: relative;
    z-index: 1002;
  }
  .navbar .menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--nav-menu-bg, rgba(3, 7, 18, 0.65));
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    flex-direction: column; justify-content: center; gap: 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-30px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                backdrop-filter 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                -webkit-backdrop-filter 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.35s step-end;
    will-change: transform, opacity, backdrop-filter;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    margin-left: 0;
  }
  .navbar .menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                backdrop-filter 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                -webkit-backdrop-filter 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0s;
  }
  .navbar .menu li {
    list-style: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .navbar .menu.active li {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .navbar .menu.active li:nth-child(1) { transition-delay: 0.05s; }
  .navbar .menu.active li:nth-child(2) { transition-delay: 0.08s; }
  .navbar .menu.active li:nth-child(3) { transition-delay: 0.11s; }
  .navbar .menu.active li:nth-child(4) { transition-delay: 0.14s; }
  .navbar .menu.active li:nth-child(5) { transition-delay: 0.17s; }
  .navbar .menu.active li:nth-child(6) { transition-delay: 0.20s; }
  .navbar .menu.active li:nth-child(7) { transition-delay: 0.23s; }
  .navbar .menu.active li:nth-child(8) { transition-delay: 0.26s; }
  .navbar .menu.active li:nth-child(9) { transition-delay: 0.29s; }
  .navbar .menu li a { font-size: 24px; font-weight: 600; }
  .navbar .menu .admin-nav-item { display: block; }
  .admin-float-btn { display: none !important; }
  
  .home { padding-top: 100px; text-align: center; }
  .home .max-width { flex-direction: column-reverse; gap: 50px; }
  .home .home-content .text-2 { font-size: 55px; }
  .home .home-content .text-3 { font-size: 24px; }
  .hero-actions { justify-content: center; }
  .social_icon { justify-content: center; }
  .hero-photo { width: 320px; height: 320px; transform: none; }
  
  section .title { font-size: 38px; margin-bottom: 30px; }
  .contact form .fields { flex-direction: column; gap: 20px; }
}

@media (max-width: 480px) {
  .max-width { padding: 0 20px; }
  .menu-btn { right: 20px !important; }
  .theme-switch { right: 70px !important; }
  .home .home-content .text-2 { font-size: 42px; }
  .hero-photo { width: 280px; height: 280px; }
  .contact .contact-content { padding: 25px; border-radius: 20px; }
  .services .box { padding: 30px 20px; }
  .admin-modal-content { padding: 20px 15px; border-radius: 18px; }
  .admin-tabs { gap: 5px; margin-bottom: 15px; padding-bottom: 8px; }
  .tab-btn { padding: 8px 12px; font-size: 14px; }
  .dashboard-footer { flex-wrap: wrap !important; }
}

/* ===== THEME SWITCH & FIXES ===== */
.theme-switch {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-main);
  transition: all 0.3s ease;
  background: rgba(var(--glass-rgb), 0.03);
  font-size: 18px;
  margin-left: 20px;
}
@media (hover: hover) {
  .theme-switch:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(249, 202, 36, 0.2);
  }
}

/* Force buttons to have white text regardless of light/dark mode */
.about .about-content .right a, 
.contact form button, 
.project-link:hover,
.project-link:active,
.social_icon li a:hover,
.social_icon li a:active,
.check-bg:hover p,
.check-bg:hover i,
.check-bg:active p,
.check-bg:active i {
  color: #ffffff !important;
}

/* Navbar scroll effect */
.navbar.scrolled {
  background: var(--card-bg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 15px 0;
}
body:not(.light-mode) .navbar.scrolled {
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ===== SCROLL UP BUTTON ===== */
.scroll-up-btn {
  position: fixed;
  height: 45px;
  width: 42px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  right: 30px;
  bottom: 30px;
  text-align: center;
  line-height: 43px;
  color: var(--accent-color);
  z-index: 9999;
  font-size: 24px;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
body.light-mode .scroll-up-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.scroll-up-btn.show {
  opacity: 1;
  pointer-events: auto;
  bottom: 40px;
}
@media (hover: hover) {
  .scroll-up-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.2);
  }
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #080808;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}
#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#preloader-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.preloader-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.preloader-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 80px;
  font-weight: 700;
  color: #f9ca24;
  text-shadow: 0 0 30px rgba(249, 202, 36, 0.5);
  margin-bottom: 5px;
  animation: pulse-logo 2.5s infinite ease-in-out;
  letter-spacing: 2px;
}
.preloader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(249, 202, 36, 0.08);
  border-top: 3px solid #f9ca24;
  border-radius: 50%;
  animation: preloader-spin 1.2s linear infinite;
  box-shadow: 0 0 15px rgba(249, 202, 36, 0.15);
}
.preloader-status {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #f9ca24;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 15px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  min-height: 20px;
}
@keyframes preloader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulse-logo {
  0%, 100% { transform: scale(1); opacity: 0.9; text-shadow: 0 0 20px rgba(249, 202, 36, 0.4); }
  50% { transform: scale(1.08); opacity: 1; text-shadow: 0 0 40px rgba(249, 202, 36, 0.7); }
}

/* ===== ADMIN NAVBAR BUTTON ===== */
.admin-float-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(var(--glass-rgb), 0.03);
  font-size: 18px;
  margin-left: 12px;
  position: relative;
  z-index: 9998;
}
body.light-mode .admin-float-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.admin-float-btn i {
  transition: transform 0.4s ease;
}
@media (hover: hover) {
  .admin-float-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
  }
  .admin-float-btn:hover i {
    transform: rotate(45deg);
  }
}
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}
.admin-modal.active {
  opacity: 1;
  visibility: visible;
}
.admin-modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.admin-modal.active .admin-modal-content {
  transform: scale(1);
}
.admin-modal-content.dashboard-content {
  max-width: 850px;
}
.admin-modal-content.form-content {
  max-width: 500px;
}
.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}
.admin-modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
}
.close-modal {
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
@media (hover: hover) {
  .close-modal:hover {
    color: #ef4444;
  }
}
.admin-input-group {
  margin-bottom: 20px;
}
.admin-input-group input, .form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}
.admin-input-group input:focus, .form-group input:focus, .form-group textarea:focus {
  border-color: #f9ca24;
}
.admin-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.admin-btn.btn-secondary {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info-color);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.admin-btn.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
@media (hover: hover) {
  .admin-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(249, 202, 36, 0.3);
  }
  .admin-btn.btn-secondary:hover {
    background: var(--info-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
  }
  .admin-btn.btn-danger:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
  }
}
.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
  flex: 1;
  text-align: center;
}
.tab-btn.active {
  color: var(--accent-color);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.tab-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: var(--heading-color);
}
.admin-btn-sm {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.admin-btn-sm:hover {
  filter: brightness(1.1);
}
.admin-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  border-radius: 12px;
}
.admin-item-info h5 {
  color: var(--heading-color);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  margin-bottom: 2px;
}
.admin-item-info span {
  color: var(--text-muted);
  font-size: 12px;
}
.admin-item-actions {
  display: flex;
  gap: 8px;
}
.admin-item-actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
  transition: transform 0.2s;
}
.admin-item-actions .btn-edit {
  color: var(--info-color);
}
.admin-item-actions .btn-del {
  color: #ef4444;
}
@media (hover: hover) {
  .admin-item-actions .btn-edit:hover {
    transform: scale(1.2);
  }
  .admin-item-actions .btn-del:hover {
    transform: scale(1.2);
  }
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group textarea {
  resize: vertical;
}

/* Interactive Theme Selector in Admin Panel */
@media (hover: hover) {
  .theme-option-card:hover {
    border-color: rgba(var(--glass-rgb), 0.2) !important;
    background: rgba(var(--glass-rgb), 0.03) !important;
    transform: translateY(-2px);
  }
}
.theme-option-card:has(input:checked) {
  border-color: var(--accent-color) !important;
  background: rgba(var(--glass-rgb), 0.06) !important;
  box-shadow: 0 0 15px rgba(var(--glass-rgb), 0.05);
}
.theme-option-card input:checked + .theme-preview-circle {
  transform: scale(1.15);
  box-shadow: 0 0 18px var(--accent-color) !important;
  border-color: #ffffff !important;
}
.theme-preview-circle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== AI ASSISTANT CHATBOT ===== */
.ai-assistant-container {
  position: fixed;
  bottom: 40px;
  left: 30px;
  z-index: 99999;
  font-family: 'Inter', sans-serif;
}

/* Chat bubble trigger */
.ai-chat-bubble {
  width: 42px;
  height: 45px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
body.light-mode .ai-chat-bubble {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.ai-chat-bubble i {
  transition: transform 0.3s ease;
}
@media (hover: hover) {
  .ai-chat-bubble:hover {
    transform: scale(1.08) translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 15px var(--accent-color);
  }
  .ai-chat-bubble:hover i {
    transform: rotate(15deg);
  }
}

/* Pulsing online indicator ring */
.ai-chat-bubble .pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 2px solid var(--accent-color);
  animation: bubble-pulse 2s infinite;
  opacity: 0.6;
  pointer-events: none;
}

@keyframes bubble-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Tooltip */
.ai-chat-bubble .bubble-tooltip {
  position: absolute;
  left: 70px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
@media (hover: hover) {
  .ai-chat-bubble:hover .bubble-tooltip {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Chat window overlay */
.ai-chat-window {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 370px;
  height: 500px;
  background: rgba(10, 15, 30, 0.4) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  pointer-events: none;
}
body.light-mode .ai-chat-window {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
.ai-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Chat Header */
.ai-chat-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body.light-mode .ai-chat-header {
  background: rgba(0, 0, 0, 0.01) !important;
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}
.ai-chat-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  position: relative;
}
.ai-avatar .online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid var(--card-bg);
  border-radius: 50%;
}
.ai-chat-meta h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0;
}
.ai-chat-meta p {
  font-size: 11px;
  color: #10b981;
  font-weight: 500;
  margin: 0;
}
.ai-chat-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
}
@media (hover: hover) {
  .ai-chat-actions button:hover {
    color: var(--accent-color);
  }
}

/* Chat Body */
.ai-chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(var(--glass-rgb), 0.01);
  scroll-behavior: smooth;
}

/* Message bubbles styling */
.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: message-slide 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
@keyframes message-slide {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.chat-message.ai-message {
  align-self: flex-start;
}
.chat-message.user-message {
  align-self: flex-end;
}

.chat-message .msg-bubble {
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 18px;
}
.chat-message.ai-message .msg-bubble {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--text-main);
  border-top-left-radius: 4px;
}
body.light-mode .chat-message.ai-message .msg-bubble {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.chat-message.user-message .msg-bubble {
  background: var(--accent-gradient);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Timestamp */
.chat-message .msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}
.chat-message.ai-message .msg-time {
  align-self: flex-start;
}
.chat-message.user-message .msg-time {
  align-self: flex-end;
}

/* Suggestions container */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}
.suggest-chip {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 8px 14px;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
body.light-mode .suggest-chip {
  background: rgba(0, 0, 0, 0.01) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
@media (hover: hover) {
  .suggest-chip:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color);
    transform: translateY(-1px);
  }
}

/* Thinking loader indicator */
.thinking-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  border-top-left-radius: 4px;
  width: fit-content;
}
.thinking-bubble span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1s infinite alternate;
}
.thinking-bubble span:nth-child(2) { animation-delay: 0.2s; }
.thinking-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.ai-chat-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.01) !important;
}
body.light-mode .ai-chat-footer {
  border-top-color: rgba(0, 0, 0, 0.06) !important;
  background: rgba(0, 0, 0, 0.01) !important;
}
.ai-chat-footer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.3s;
}
body.light-mode .ai-chat-footer input {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
.ai-chat-footer input:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1) !important;
}
.toggle-mic-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}
body.light-mode .toggle-mic-btn {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-muted);
}
@media (hover: hover) {
  .toggle-mic-btn:hover {
    border-color: var(--accent-color) !important;
    color: var(--accent-color);
    transform: translateY(-2px);
  }
}
.toggle-mic-btn.listening {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: mic-pulse 1.5s infinite alternate;
}
@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
.ai-chat-footer button {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
@media (hover: hover) {
  .ai-chat-footer button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }
}

/* Mobile responsive fixes */
@media (max-width: 480px) {
  .ai-chat-window {
    width: calc(100vw - 40px);
    height: 440px;
    left: -10px;
    bottom: 65px;
  }
}

/* ===== PREMIUM ACTIVE/PRESSED TOUCH ANIMATIONS FOR RESPONSIVE HAPTICS ===== */

/* 1. Slow Luxurious Fade Out Transition on Touch Release specifically on Touch Screens */
@media (hover: none) {
  .social_icon li a,
  .footer .social-links a,
  .check-bg,
  .project-link,
  .interest .i-img,
  .interest,
  .btn-hire,
  .about .about-content .right a,
  .contact form button,
  .admin-btn,
  .suggest-chip,
  .toggle-mic-btn,
  .ai-chat-footer button,
  .scroll-up-btn,
  .theme-switch,
  .admin-float-btn,
  .cert-card,
  .skills-bg {
    transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .skills-bg::after,
  .skills-bg::before {
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* 2. Global Shrink and Transition on Press (tactile instant feedback) */
.btn-hire:active,
.about .about-content .right a:active,
.contact form button:active,
.admin-btn:active,
.admin-float-btn:active,
.social_icon li a:active,
.footer .social-links a:active,
.suggest-chip:active,
.toggle-mic-btn:active,
.ai-chat-footer button:active,
.scroll-up-btn:active,
.theme-switch:active,
.project-link:active,
.navbar .menu li a:active,
.cert-card:active,
.interest:active,
.check-bg:active,
.skills-bg:active {
  transform: scale(0.96) translateY(0) !important;
  transition: transform 0.05s ease, background-color 0.05s ease, box-shadow 0.05s ease, border-color 0.05s ease !important;
}

/* 3. Custom Golden Glow animations for interactive cards & links during active press */
.social_icon li a:active,
.footer .social-links a:active {
  background-color: var(--accent-color) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: 0 10px 25px rgba(249, 202, 36, 0.5) !important;
}

.check-bg:active {
  background-color: var(--accent-color) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: 0 20px 40px rgba(249, 202, 36, 0.3) !important;
}

.project-link:active {
  background-color: var(--accent-color) !important;
  background-image: none !important;
  box-shadow: 0 5px 15px rgba(249, 202, 36, 0.3) !important;
}

.interest:active .i-img {
  background-color: var(--accent-color) !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 20px rgba(249,202,36,0.3) !important;
}

.navbar .menu li a:active {
  color: var(--accent-color) !important;
}

.suggest-chip:active,
.toggle-mic-btn:active,
.scroll-up-btn:active,
.theme-switch:active,
.admin-float-btn:active {
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
}

.cert-card:active {
  border-color: rgba(249, 202, 36, 0.5) !important;
}

