/* =======================================================
 * Glassmorphism UI + 3D XR/AI background
 * Overrides the base iPortfolio theme with a modern,
 * frosted-glass dark aesthetic layered over a 3D canvas.
 * ===================================================== */

:root {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-blur: 18px;
  --accent: #4ad6ff;
  --accent-2: #8a7bff;
  --accent-3: #2bd9b0;
  --text: #eaf2ff;
  --text-muted: #aeb9d4;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background: #05070f;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(72, 84, 220, 0.35), transparent 60%),
    radial-gradient(1000px 700px at -10% 30%, rgba(43, 217, 176, 0.18), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(74, 214, 255, 0.20), transparent 60%),
    #05070f;
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-2);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Raleway", sans-serif;
  color: #fff;
}

/* ===== 3D background canvas ===== */
#bg3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  display: block;
}

/* a subtle vignette / scanline overlay for depth */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 15, 0.28) 0%, rgba(5, 7, 15, 0.6) 100%),
    radial-gradient(120% 80% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

/* ===== Reusable glass panel ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 20px;
  bottom: 20px;
  z-index: 996;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}
.back-to-top i {
  font-size: 28px;
  color: var(--accent);
  line-height: 0;
}
.back-to-top:hover {
  background: rgba(74, 214, 255, 0.25);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* ===== Header / Sidebar ===== */
#header {
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 280px;
  border-radius: 24px;
  padding: 24px 18px;
  background: rgba(12, 16, 30, 0.45);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  z-index: 9997;
  overflow-y: auto;
}
#header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(74, 214, 255, 0.5), transparent 40%, rgba(138, 123, 255, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
#header .profile img {
  margin: 10px auto 14px;
  display: block;
  width: 128px;
  height: 128px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 4px rgba(74, 214, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.5);
}
#header .profile h1 {
  font-size: 22px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  text-align-last: center;
  -moz-text-align-last: center;
}
#header .profile h1 a,
#header .profile h1 a:hover {
  color: #fff;
}
#header .profile .social-links {
  text-align: center;
}
#header .profile .social-links a {
  font-size: 18px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  line-height: 1;
  padding: 8px 0;
  margin: 0 3px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.3s;
}
#header .profile .social-links a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05070f;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(74, 214, 255, 0.4);
}

#main {
  margin-left: 312px;
}

@media (max-width: 1199px) {
  #header {
    left: -320px;
    top: 0;
    bottom: 0;
    border-radius: 0 24px 24px 0;
    width: 300px;
  }
  #main {
    margin-left: 0;
  }
}

/* ===== Navigation ===== */
.nav-menu {
  padding: 22px 0 0 0;
}
.nav-menu a,
.nav-menu a:focus {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: 12px;
  transition: 0.3s;
  font-size: 15px;
}
.nav-menu a i,
.nav-menu a:focus i {
  font-size: 22px;
  padding-right: 10px;
  color: var(--text-muted);
  transition: 0.3s;
}
.nav-menu a:hover,
.nav-menu .active,
.nav-menu .active:focus,
.nav-menu li:hover > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-menu a:hover i,
.nav-menu .active i,
.nav-menu .active:focus i,
.nav-menu li:hover > a i {
  color: var(--accent);
}

.mobile-nav-toggle {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 9998;
  border: 1px solid var(--glass-border);
  font-size: 24px;
  background: rgba(12, 16, 30, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50px;
  cursor: pointer;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: transparent;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
#hero:before {
  content: none;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  mix-blend-mode: screen;
  z-index: 0;
}
#hero .hero-container {
  position: relative;
  z-index: 2;
  min-width: 300px;
  text-align: center;
  padding: 0 24px;
}
#hero h1 {
  margin: 0 0 14px 0;
  font-size: 72px;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  background: linear-gradient(120deg, #ffffff 0%, #cfe9ff 40%, #8a7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#hero p {
  color: #eaf2ff;
  margin-bottom: 18px;
  font-size: 28px;
  font-family: "Poppins", sans-serif;
}
#hero p span {
  color: #fff;
  padding: 2px 6px;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--accent);
}
#hero .text-white {
  color: var(--text-muted) !important;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll-hint .mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  position: relative;
}
.hero-scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}
@media (max-width: 768px) {
  #hero h1 {
    font-size: 40px;
  }
  #hero p {
    font-size: 20px;
  }
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
  overflow: hidden;
  position: relative;
}
.section-bg {
  background: transparent;
}

.section-title {
  padding-bottom: 36px;
}
.section-title h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
  padding-bottom: 18px;
  position: relative;
  color: #fff;
  letter-spacing: -0.5px;
}
.section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  bottom: 0;
  left: 0;
}
.section-title p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

/* ===== About ===== */
.about .section-title p {
  font-size: 17px;
}
.about .section-title p b {
  color: #fff;
}

/* ===== Facts / count boxes ===== */
.facts {
  padding-bottom: 40px;
}
.facts .count-box {
  padding: 28px;
  width: 100%;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.facts .count-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  border-color: rgba(74, 214, 255, 0.4);
}
.facts .count-box i {
  display: block;
  font-size: 40px;
  color: var(--accent);
  float: left;
  line-height: 0;
}
.facts .count-box span {
  font-size: 44px;
  line-height: 40px;
  display: block;
  font-weight: 800;
  color: #fff;
  margin-left: 60px;
}
.facts .count-box p {
  padding: 12px 0 0 0;
  margin: 0 0 0 60px;
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  color: var(--text-muted);
}
.facts .count-box p strong {
  color: #fff;
}

/* ===== Skills ===== */
.skills {
  border-radius: 22px;
  margin-top: 36px;
}
.skills .progress {
  height: 56px;
  display: block;
  background: none;
  border-radius: 0;
}
.skills .progress .skill {
  padding: 0;
  margin: 0 0 8px 0;
  text-transform: none;
  display: block;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  color: #eaf2ff;
}
.skills .progress-bar-wrap {
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.skills .progress-bar {
  width: 1px;
  height: 8px;
  border-radius: 8px;
  transition: 0.9s;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(74, 214, 255, 0.5);
}

/* ===== Resume ===== */
.resume .resume-title {
  font-size: 24px;
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 22px;
  color: #fff;
  letter-spacing: -0.3px;
}
.resume .resume-item {
  padding: 0 0 26px 26px;
  margin-top: -2px;
  border-left: 2px solid rgba(74, 214, 255, 0.45);
  position: relative;
}
.resume .resume-item h4 {
  line-height: 1.4;
  font-size: 18px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  color: #fff;
  margin-bottom: 8px;
  text-transform: none;
}
.resume .resume-item h5 {
  font-size: 13px;
  background: rgba(74, 214, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(74, 214, 255, 0.3);
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 12px;
}
.resume .resume-item p,
.resume .resume-item em {
  color: var(--text-muted);
}
.resume .resume-item p b {
  color: #fff;
}
.resume .resume-item ul {
  padding-left: 20px;
  color: var(--text-muted);
}
.resume .resume-item ul li {
  padding-bottom: 10px;
  line-height: 1.7;
}
.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50px;
  left: -8px;
  top: 2px;
  background: var(--accent);
  border: 3px solid #0a0f1f;
  box-shadow: 0 0 12px rgba(74, 214, 255, 0.6);
}
.resume .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  color: #05070f;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(74, 214, 255, 0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}
.resume .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(74, 214, 255, 0.5);
  color: #05070f;
}

/* ===== Portfolio ===== */
.portfolio .portfolio-item {
  margin-bottom: 30px;
}
.portfolio .portfolio-wrap {
  transition: 0.35s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.portfolio .portfolio-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.portfolio .portfolio-wrap::before {
  content: "";
  background: linear-gradient(180deg, rgba(5, 7, 15, 0) 40%, rgba(5, 7, 15, 0.85) 100%);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transition: all ease-in-out 0.3s;
  z-index: 2;
  opacity: 1;
}
.portfolio .portfolio-wrap:hover img {
  transform: scale(1.07);
}
.portfolio .portfolio-wrap:hover {
  border-color: rgba(74, 214, 255, 0.5);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* ===== Contact ===== */
.contact {
  padding-bottom: 100px;
}
.contact .info {
  padding: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 100%;
  box-shadow: var(--shadow);
  height: 100%;
}
.contact .info i {
  font-size: 20px;
  color: var(--accent);
  float: left;
  width: 44px;
  height: 44px;
  background: rgba(74, 214, 255, 0.12);
  border: 1px solid rgba(74, 214, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
}
.contact .info h4 {
  padding: 0 0 0 60px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #fff;
}
.contact .info p {
  padding: 0 0 16px 60px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text-muted);
}
.contact .info .email p {
  padding-top: 5px;
}
.contact .info iframe {
  border-radius: 14px;
  filter: invert(0.92) hue-rotate(180deg) saturate(0.7);
  border: 1px solid var(--glass-border);
}
.contact .info .email:hover i,
.contact .info .address:hover i,
.contact .info .phone:hover i {
  background: var(--accent);
  color: #05070f;
}
.contact .php-email-form {
  width: 100%;
  padding: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.contact .php-email-form label {
  padding-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.contact .php-email-form input,
.contact .php-email-form textarea {
  border-radius: 12px;
  box-shadow: none;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 12px 16px;
}
.contact .php-email-form input::placeholder,
.contact .php-email-form textarea::placeholder {
  color: rgba(234, 242, 255, 0.4);
}
.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(74, 214, 255, 0.18);
  outline: none;
}
.contact .php-email-form input {
  height: 46px;
}
.contact .php-email-form button[type=submit] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  padding: 14px 30px;
  color: #05070f;
  font-weight: 700;
  transition: 0.3s;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(74, 214, 255, 0.35);
}
.contact .php-email-form button[type=submit]:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(74, 214, 255, 0.5);
}
.contact .php-email-form .sent-message,
.contact .php-email-form .error-message {
  border-radius: 12px;
}

/* ===== Footer ===== */
#footer {
  padding: 15px;
  color: var(--text-muted);
  font-size: 14px;
  background: rgba(12, 16, 30, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== AOS polish ===== */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* Reduced motion: freeze heavy animation */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
