/* ════════════════════════════════════════
   CSS RESET & VARIABLES
════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #04020a;
  --bg2:       #0b0717;
  --card:      #110d1e;
  --card2:     #19122e;
  --purple:    #7c3aed;
  --purple-lt: #a855f7;
  --purple-dim:#4c1d95;
  --accent:    #c084fc;
  --text:      #f1f0f5;
  --text-dim:  #a39bb5;
  --border:    rgba(124,58,237,0.25);
  --glow:      rgba(124,58,237,0.35);
  --radius:    18px;
  --trans:     0.35s cubic-bezier(.4,0,.2,1);
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 80px; 
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: var(--purple); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ════════════════════════════════════════
   BACKGROUND ORBS
════════════════════════════════════════ */
.orbs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 12s ease-in-out infinite alternate;
  will-change: transform;
}
.orb-1 { width: 600px; height: 600px; background: var(--purple); top: -150px; left: -150px; animation-delay: 0s; }
.orb-2 { width: 500px; height: 500px; background: #2d1b69; bottom: -200px; right: -100px; animation-delay: -4s; }
.orb-3 { width: 350px; height: 350px; background: var(--purple-lt); top: 60%; left: 45%; animation-delay: -8s; }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(30px, 20px, 0) scale(1.05); }
}

/* ════════════════════════════════════════
   NAV
════════════════════════════════════════ */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 20px 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(4,2,10,0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: padding var(--trans);
}
nav.scrolled { padding: 14px 60px; }

.nav-logo {
  font-size: 1.4rem; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo span { color: var(--purple-lt); }

.nav-links {
  display: flex; gap: 38px; list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  transition: color var(--trans);
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--purple-lt);
  transition: width var(--trans);
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--trans); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex; align-items: stretch; justify-content: center;
  position: relative; padding: 0 60px;
  overflow: hidden;
}

.hero-inner {
  display: flex; align-items: center;
  width: 100%; max-width: 1200px;
  position: relative; z-index: 1;
}

.hero-left {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  padding-right: 60px;
}
.hero-greeting {
  font-size: 1.1rem; font-weight: 500;
  color: var(--purple-lt);
  letter-spacing: 0.5px;
}
.hero-name {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--text);
}

.hero-social {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 24px;
}
.hero-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--trans);
  background: var(--card);
}
.hero-social a:hover {
  color: var(--text);
  border-color: var(--purple-lt);
  background: var(--purple-dim);
  box-shadow: 0 0 20px var(--glow);
}

.hero-photo-wrap {
  flex: 0 0 auto;
  width: 420px;
  height: 520px;
  position: relative;
  margin: 0 auto;
}

.hero-photo-glow {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 55%,
      rgba(80,20,180,0.9)  0%,
      rgba(60,10,140,0.6) 35%,
      rgba(30,5,70,0.25)  60%,
      transparent         80%);
  z-index: 0;
  animation: pulse-glow 4s ease-in-out infinite alternate;
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
}
@keyframes pulse-glow {
  from { opacity: 0.7; transform: scaleX(0.95); }
  to   { opacity: 1;   transform: scaleX(1.05); }
}

.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  position: relative; z-index: 1;
  display: block;
  transform: scale(1.35) translateY(-4%);
  -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 95%);
  mask-image: linear-gradient(to bottom, black 65%, transparent 95%);
  filter:
    drop-shadow(0 0 40px rgba(100,40,200,0.4))
    brightness(1.03) contrast(1.06) saturate(1.08);
}

.hero-right {
  flex: 1;
  padding-left: 60px;
  display: flex; flex-direction: column; gap: 8px;
}
.hero-tag {
  font-size: 1.1rem; font-weight: 500;
  color: var(--purple-lt);
}
.hero-role {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text) 40%, var(--purple-lt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  margin-top: 12px;
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 380px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 14px 30px;
  border: 1.5px solid var(--purple-lt);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.92rem; font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: var(--trans);
  background: transparent;
  cursor: pointer;
  width: fit-content;
}
.btn-primary:hover {
  background: var(--purple);
  box-shadow: 0 0 30px var(--glow), 0 0 60px var(--glow);
  border-color: var(--purple);
}

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.72rem; letter-spacing: 2px;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--purple-lt);
  border-bottom: 2px solid var(--purple-lt);
  transform: rotate(45deg);
  animation: bounce-arrow 1.5s ease-in-out infinite;
}
@keyframes bounce-arrow {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity:1; }
  50%       { transform: rotate(45deg) translate(4px,4px); opacity:0.5; }
}

/* ════════════════════════════════════════
   SECTION COMMONS
════════════════════════════════════════ */
section { 
  position: relative; 
  z-index: 1; 
  will-change: transform;
}

.section-header {
  text-align: center; margin-bottom: 64px;
}
.section-label {
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--purple-lt);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
}
.section-title span { color: var(--purple-lt); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 60px;
}

/* ════════════════════════════════════════
   ABOUT
════════════════════════════════════════ */
#about { background: var(--bg2); }

.about-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 70px;
  align-items: center;
}

/* ── Decorative Left Accent ── */
.about-accent {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
}

.about-accent-bar {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--purple) 20%,
    var(--purple-lt) 50%,
    var(--purple) 80%,
    transparent 100%
  );
  border-radius: 3px;
  animation: bar-pulse 3s ease-in-out infinite alternate;
}
@keyframes bar-pulse {
  from { box-shadow: 0 0 10px 2px rgba(124,58,237,0.4); opacity: 0.7; }
  to   { box-shadow: 0 0 25px 6px rgba(168,85,247,0.7); opacity: 1; }
}

.about-badge-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.about-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  transition: var(--trans);
  animation: badge-float 4s ease-in-out infinite alternate;
  cursor: default;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.about-badge:nth-child(1) { animation-delay: 0s;    margin-left: -20px; }
.about-badge:nth-child(2) { animation-delay: -1.3s; margin-left:  20px; }
.about-badge:nth-child(3) { animation-delay: -2.6s; margin-left: -10px; }

@keyframes badge-float {
  from { transform: translateY(0px);   }
  to   { transform: translateY(-8px);  }
}

.about-badge i {
  color: var(--purple-lt);
  font-size: 1.1rem;
}
.about-badge:hover {
  border-color: var(--purple-lt);
  background: rgba(124,58,237,0.1);
  color: var(--text);
  box-shadow: 0 8px 25px rgba(124,58,237,0.25);
}

.about-accent-glow {
  position: absolute;
  width: 180px; height: 180px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.35) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  z-index: 0;
  animation: bar-pulse 3s ease-in-out infinite alternate;
}

.about-content { position: relative; z-index: 1; }
.about-passion {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.about-passion .highlight { color: var(--purple-lt); }

.about-text {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-text strong { color: var(--purple-lt); font-weight: 600; }

.about-stats {
  display: flex; gap: 32px; margin-top: 32px;
}
.stat-item {
  display: flex; flex-direction: column; gap: 4px;
  text-decoration: none;
  transition: var(--trans);
}
a.stat-item:hover {
  cursor: pointer;
}
.stat-num {
  font-size: 2rem; font-weight: 900;
  color: var(--purple-lt);
  line-height: 1;
  transition: var(--trans);
}
a.stat-item:hover .stat-num {
  text-shadow: 0 0 20px var(--glow);
  color: var(--text);
}
.stat-label {
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* ════════════════════════════════════════
   PROJECTS — BOOK CAROUSEL
════════════════════════════════════════ */
#projects { background: var(--bg); }

/* ── Carousel Wrapper ── */
.book-carousel {
  position: relative;
  overflow: hidden;
  padding-bottom: 64px; /* space for dots */
  perspective: 1400px;
}

/* ── Sliding Track ── */
.book-track {
  display: flex;
  transition: transform 0.72s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
  gap: 0;
}

/* ══ Each Book Page ══ */
.book-page {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.book-page-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.77, 0, 0.18, 1);
}

/* Page entering from right → slight right tilt */
.book-page.entering-right .book-page-inner {
  animation: page-enter-right 0.72s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}
/* Page entering from left → slight left tilt */
.book-page.entering-left .book-page-inner {
  animation: page-enter-left 0.72s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes page-enter-right {
  0%   { transform: perspective(1200px) rotateY(-18deg) translateX(40px) scale(0.96); opacity: 0; }
  100% { transform: perspective(1200px) rotateY(0deg) translateX(0) scale(1);        opacity: 1; }
}
@keyframes page-enter-left {
  0%   { transform: perspective(1200px) rotateY(18deg) translateX(-40px) scale(0.96); opacity: 0; }
  100% { transform: perspective(1200px) rotateY(0deg) translateX(0) scale(1);         opacity: 1; }
}

/* The visible card face */
.book-page-front {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  grid-template-rows: auto auto auto;
  min-height: 480px;
  position: relative;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  /* Spine shadow on left — book illusion */
  box-shadow:
    -8px 0 30px -4px rgba(0,0,0,0.6),
    0 20px 60px rgba(0,0,0,0.35),
    inset 6px 0 20px rgba(0,0,0,0.25);
}
.book-page-front:hover {
  border-color: var(--purple-lt);
  box-shadow:
    -8px 0 30px -4px rgba(0,0,0,0.7),
    0 30px 80px rgba(124,58,237,0.2),
    inset 6px 0 20px rgba(0,0,0,0.25);
}

/* Book spine line */
.book-page-front::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 7px;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.7) 0%,
    rgba(124,58,237,0.4) 40%,
    rgba(168,85,247,0.2) 70%,
    transparent 100%
  );
  border-radius: 28px 0 0 28px;
  z-index: 5;
}

/* ── Big project number ── */
.bp-number {
  grid-column: 1 / -1;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(168,85,247,0.25);
  padding: 36px 40px 0 40px;
  position: relative;
  z-index: 1;
  user-select: none;
}

/* ── Content column (left) ── */
.bp-content {
  padding: 20px 28px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
  align-self: end;
}

.bp-tag {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--purple-lt);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-lt);
  background: rgba(124,58,237,0.08);
  width: fit-content;
}

.bp-title {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.bp-tech-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple-lt);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.bp-tech {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.bp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1.5px solid var(--purple-lt);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: var(--trans);
  margin-top: 8px;
  width: fit-content;
}
.bp-link:hover {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 24px var(--glow);
}

/* ── Image column (right) ── */
.bp-img-wrap {
  padding: 24px 32px 32px 12px;
  display: flex;
  align-items: center; /* Centered visually */
  justify-content: center;
  position: relative;
  z-index: 2;
  align-self: stretch; /* Take full height to center properly */
}

.bp-img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
  box-shadow: 
    -10px 15px 40px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.6s cubic-bezier(.2,1,.3,1), box-shadow 0.6s ease;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); /* Subtle 3D tilt */
}

.book-page-front:hover .bp-img {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.04) translateY(-5px);
  box-shadow: 
    -15px 20px 50px rgba(0,0,0,0.7),
    0 0 20px var(--glow);
}

/* Placeholder (no image yet) */
.bp-img-placeholder {
  align-items: center;
}
.bp-img-noimg {
  width: 100%;
  height: 320px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(124,58,237,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-dim);
}
.bp-img-noimg i {
  font-size: 3rem;
  color: var(--purple-dim);
  opacity: 0.6;
}
.bp-img-noimg span {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ── Per-page purple glow ── */
.bp-glow {
  position: absolute;
  bottom: -60px;
  left: 10%;
  width: 80%;
  height: 200px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.45) 0%, transparent 65%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

/* ── Prev / Next Buttons ── */
.book-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: rgba(11,7,23,0.82);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.book-btn:hover {
  background: var(--purple);
  border-color: var(--purple-lt);
  box-shadow: 0 0 24px var(--glow);
  transform: translateY(-60%) scale(1.1);
}
.book-btn-prev { left: -10px; }
.book-btn-next { right: -10px; }

/* ── Dot Indicators ── */
.book-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}
.book-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(168,85,247,0.3);
  cursor: pointer;
  transition: all 0.35s ease;
  padding: 0;
}
.book-dot.active {
  width: 28px;
  border-radius: 50px;
  background: var(--purple-lt);
  box-shadow: 0 0 10px rgba(168,85,247,0.6);
}
.book-dot:hover:not(.active) {
  background: rgba(168,85,247,0.6);
  transform: scale(1.2);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .book-page-front {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: auto;
  }
  .bp-number { padding: 28px 24px 0; }
  .bp-content { padding: 16px 24px 24px; }
  .bp-img-wrap { padding: 0 24px 28px; }
  .bp-img, .bp-img-noimg { height: 220px; }
  .book-btn-prev { left: 4px; }
  .book-btn-next { right: 4px; }
}
@media (max-width: 600px) {
  .bp-img, .bp-img-noimg { height: 180px; }
  .bp-title { font-size: 1.4rem; }
}

/* ════════════════════════════════════════
   EDUCATION — Premium 3D Card Grid
════════════════════════════════════════ */
#education { background: var(--bg2); overflow: hidden; }

/* ── Card Grid ── */
.edu-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Central connector line */
.edu-timeline::before {
  display: none;
}

/* ── Each card ── */
.edu-item {
  display: block;
  margin-bottom: 0;
  position: relative;
  border-radius: 24px;
  /* Glassmorphism base */
  background: rgba(17, 10, 35, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(168, 85, 247, 0.18);
  padding: 36px 32px 32px;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(.2,1,.3,1),
              box-shadow 0.45s cubic-bezier(.2,1,.3,1),
              border-color 0.35s ease;
  transform-style: preserve-3d;
  cursor: default;
  /* Staggered float animation */
  animation: edu-float 6s ease-in-out infinite alternate;
}
.edu-item:nth-child(1) { animation-delay: 0s;    margin-top: 0; }
.edu-item:nth-child(2) { animation-delay: -2s;   margin-top: 24px; }
.edu-item:nth-child(3) { animation-delay: -4s;   margin-top: 0; }

@keyframes edu-float {
  from { transform: translateY(0px); }
  to   { transform: translateY(-10px); }
}

.edu-item:hover {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.2),
    0 24px 70px rgba(124,58,237,0.28),
    0 8px 30px rgba(0,0,0,0.5);
  animation-play-state: paused;
}

/* Animated shimmer border */
.edu-item::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0%,
    rgba(168,85,247,0.6) 15%,
    transparent 30%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.edu-item:hover::before {
  opacity: 1;
  animation: border-spin 3s linear infinite;
}
@keyframes border-spin {
  to { --angle: 360deg; }
}

/* Inner glow blob */
.edu-item::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -80px; right: -60px;
  filter: blur(50px);
  pointer-events: none;
  transition: opacity 0.4s;
  opacity: 0.6;
}
.edu-item:hover::after { opacity: 1; }

/* ── Year badge ── */
.edu-left {
  text-align: left;
  padding: 0;
  margin-bottom: 20px;
}
.edu-right {
  text-align: left;
  padding: 0;
}

/* Override even-child layout from old design */
.edu-item:nth-child(even) .edu-left,
.edu-item:nth-child(even) .edu-right,
.edu-item:nth-child(even) .edu-dot-wrap {
  order: unset;
  text-align: left;
  padding: 0;
}
.edu-dot-wrap { display: none; }

.edu-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple-lt);
  background: rgba(124,58,237,0.14);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 50px;
  padding: 6px 14px;
  position: relative;
}
.edu-year::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--purple-lt);
  box-shadow: 0 0 10px rgba(168,85,247,0.8);
  display: block;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.75); }
}

/* ── Institution ── */
.edu-institution {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 18px;
  line-height: 1.5;
}

/* ── Degree ── */
.edu-degree {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

/* ── Description ── */
.edu-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* Icon top-right corner */
.edu-item .edu-icon-wrap {
  position: absolute;
  top: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(168,85,247,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-lt);
  font-size: 1.2rem;
  transition: var(--trans);
}
.edu-item:hover .edu-icon-wrap {
  background: rgba(124,58,237,0.25);
  transform: scale(1.1) rotate(-5deg);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .edu-timeline {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .edu-item:nth-child(2) { margin-top: 0; }
  .edu-item { animation: none; }
}
@media (max-width: 600px) {
  .edu-timeline { gap: 20px; }
  .edu-item { padding: 28px 22px 26px; }
}

/* ════════════════════════════════════════
   SKILLS
════════════════════════════════════════ */
#skills { background: var(--bg); }

.skills-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
  justify-items: center;
}

.skill-logo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 140px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  will-change: transform;
  text-decoration: none;
  color: inherit;
}

.skill-logo-card:hover {
  transform: perspective(800px) rotateX(-5deg) rotateY(5deg) translateZ(10px);
  border-color: var(--purple-lt);
  box-shadow: 0 15px 40px rgba(124,58,237,0.25);
}

.skill-logo-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  transition: transform 0.4s ease;
  transform: translateZ(8px);
}

.skill-logo-icon--dark {
  background: rgba(255, 255, 255, 0.8);
  padding: 8px;
}

.skill-logo-icon img, .skill-logo-icon svg {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.skill-logo-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.3s ease;
  transform: translateZ(5px);
}

.skill-logo-card:hover .skill-logo-name {
  color: var(--text);
}

.skill-logo-card:hover .skill-logo-icon {
  transform: translateZ(15px) scale(1.1);
}


/* ════════════════════════════════════════
   CERTIFICATES — Premium 3D Animated Row
════════════════════════════════════════ */
#certificates { 
  background: var(--bg2); 
  position: relative; 
  overflow: hidden; 
}

/* Background Ambient Glows for Certificates */
#certificates::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
  top: 10%;
  left: -100px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

#certificates::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 70%);
  bottom: 5%;
  right: -50px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.cert-carousel-wrap {
  position: relative;
  width: 100%;
}

.cert-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 10, 35, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.cert-btn:hover {
  background: var(--purple);
  color: #fff;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  border-color: var(--purple-lt);
}

.cert-btn-prev {
  left: -20px;
}

.cert-btn-next {
  right: -20px;
}

@media (max-width: 900px) {
  .cert-btn-prev { left: -10px; }
  .cert-btn-next { right: -10px; }
  .cert-btn { width: 40px; height: 40px; font-size: 1rem; }
}

.cert-grid {
  display: flex;
  gap: 36px;
  padding: 20px 20px 40px; /* Extra padding for shadows to not clip, and bottom for scrollbar */
  margin: 0 -20px; /* Compensate for padding */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 2;
}

/* Custom subtle scrollbar for the row */
.cert-grid::-webkit-scrollbar {
  height: 8px;
}
.cert-grid::-webkit-scrollbar-track {
  background: rgba(124, 58, 237, 0.05);
  border-radius: 10px;
}
.cert-grid::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 10px;
}
.cert-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

.cert-card {
  position: relative;
  flex: 0 0 calc(100% - 40px); /* Responsive width for mobile */
  max-width: 380px; /* Max width for desktop */
  background: rgba(17, 10, 35, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.2, 1, 0.3, 1),
              border-color 0.3s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  /* Staggered float animation */
  animation: cert-float 6s ease-in-out infinite alternate;
}

.cert-card:nth-child(even) {
  animation-delay: -3s;
}

.cert-card:nth-child(3n) {
  animation-delay: -1.5s;
}

@keyframes cert-float {
  from { transform: translateY(0px); }
  to   { transform: translateY(-10px); }
}

.cert-card:hover {
  transform: translateY(-16px) scale(1.02);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.2),
    0 24px 70px rgba(124,58,237,0.25),
    0 8px 30px rgba(0,0,0,0.5);
  animation-play-state: paused;
}

/* Animated Border Gradient */
.cert-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: conic-gradient(
    from var(--cert-angle, 0deg),
    transparent 0%,
    rgba(168,85,247,0.7) 15%,
    transparent 30%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 10;
}
@property --cert-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.cert-card:hover::before {
  opacity: 1;
  animation: cert-border-spin 3s linear infinite;
}
@keyframes cert-border-spin {
  to { --cert-angle: 360deg; }
}

/* Inner Glow Blob */
.cert-card::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  border-radius: 50%;
  top: -80px;
  left: -80px;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}
.cert-card:hover::after {
  opacity: 1;
}

.cert-img-wrap {
  width: 100%;
  height: 230px;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.1) 0%, rgba(17, 10, 35, 0.6) 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* Overlay for images */
.cert-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 10, 35, 0.8), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 3;
}
.cert-card:hover .cert-img-wrap::after {
  opacity: 1;
}

.cert-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to see whole certificate */
  object-position: center;
  padding: 12px; /* Added padding so it looks framed */
  transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), filter 0.4s ease;
  filter: brightness(0.95);
  z-index: 2;
  position: relative;
}

.cert-card:hover .cert-img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.1);
}

.cert-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  opacity: 0.7;
  transition: transform 0.4s ease;
  z-index: 4;
}

.cert-card:hover .cert-img-placeholder {
  transform: scale(1.1);
  color: var(--purple-lt);
}

.cert-img-placeholder i {
  font-size: 3.5rem;
  color: var(--purple-dim);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.cert-card:hover .cert-img-placeholder i {
  color: var(--purple-lt);
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.cert-img-placeholder span {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cert-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.cert-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.cert-card:hover .cert-title {
  color: #fff;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--purple-lt);
  font-weight: 700;
  margin-bottom: 24px;
  flex-grow: 1;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cert-issuer::before {
  content: '\f0a3';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.9em;
  opacity: 0.7;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(124, 58, 237, 0.1);
  transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
  width: fit-content;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.cert-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.5s ease;
}

.cert-link:hover {
  background: var(--purple);
  border-color: var(--purple-lt);
  color: #fff;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.cert-link:hover::before {
  left: 100%;
}

/* ════════════════════════════════════════
   CONTACT
════════════════════════════════════════ */
#contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.contact-container {
  padding: 100px 60px;
}

.contact-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

/* Info Cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: var(--trans);
}
a.info-card:hover {
  border-color: var(--purple-lt);
  background: rgba(124, 58, 237, 0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
a.info-card:hover .info-icon {
  background: rgba(124, 58, 237, 0.2);
  transform: scale(1.1);
}

.info-icon {
  width: 54px;
  height: 54px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-lt);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple-lt);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.info-val {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.copy-email-v2 {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.05);
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.copy-email-v2:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--text);
  box-shadow: 0 0 15px var(--glow);
}

/* Social Grid */
.contact-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.social-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: var(--trans);
}

.social-tile i {
  font-size: 1.8rem;
  color: var(--text-dim);
  transition: var(--trans);
}

.social-tile span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--trans);
}

.social-tile:hover {
  border-color: var(--purple-lt);
  background: rgba(124, 58, 237, 0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.social-tile:hover i, .social-tile:hover span {
  color: var(--text);
  transform: scale(1.05);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-group {
  position: relative;
  width: 100%;
}

.form-group input, .form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(124,58,237,0.2);
  padding: 10px 0;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  transition: var(--trans);
}

.form-group textarea {
  height: 100px;
  resize: none;
}

.form-group label {
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
  transition: 0.3s ease all;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--purple-lt);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -20px;
  font-size: 0.85rem;
  color: var(--purple-lt);
  font-weight: 700;
}

.form-submit {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
  margin-top: 10px;
}

/* Responsive Contact */
@media (max-width: 1000px) {
  .contact-split {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}
@media (max-width: 600px) {
  .contact-container { padding: 60px 24px; }
  .contact-social-grid { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 32px 24px; }
}

/* Footer styles moved to the end of the file under the 3D — FOOTER section */

/* ════════════════════════════════════════
   RESPONSIVE DESIGN (TABLETS & LAPTOPS)
════════════════════════════════════════ */
@media (max-width: 1100px) {
  .container { padding: 80px 40px; }
  nav { padding: 16px 40px; }
  nav.scrolled { padding: 12px 40px; }
  .hero-left { padding-right: 40px; }
  .hero-right { padding-left: 40px; }
  .hero-photo-wrap { transform: scale(1); }
  .hero-photo { transform: scale(1.15) translateY(-2%); }
  .hero-name { font-size: clamp(2.4rem, 4.5vw, 3.8rem); }
  .hero-role { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
  .about-inner { gap: 40px; }
}

/* ════════════════════════════════════════
   MOBILE & TABLET (900px)
════════════════════════════════════════ */
@media (max-width: 900px) {
  nav  { padding: 16px 24px; }
  nav.scrolled  { padding: 12px 24px; }
  .nav-links { display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(4,2,10,0.97);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  #hero { padding: 120px 24px 80px; min-height: auto; }
  .hero-inner { flex-direction: column; text-align: center; gap: 48px; }
  .hero-left { padding-right: 0; order: 2; align-items: center; }
  .hero-photo-wrap { order: 1; width: 280px; height: 350px; }
  .hero-photo { transform: scale(1.15) translateY(-2%); }
  .hero-right { padding-left: 0; order: 3; align-items: center; }
  .hero-social { flex-direction: row; justify-content: center; }
  .hero-desc { text-align: center; margin: 0 auto; }

  .container { padding: 80px 24px; }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-accent { height: auto; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px 0; }
  .about-accent-bar { display: none; }
  .about-accent-glow { display: none; }
  .about-badge-stack { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .about-badge:nth-child(1),
  .about-badge:nth-child(2),
  .about-badge:nth-child(3) { margin-left: 0; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: auto; }
  .project-num { font-size: 2.2rem; }
  .project-title { font-size: 1.6rem; }

  .edu-timeline::before { left: 24px; }
  .edu-item { grid-template-columns: 48px 1fr; grid-template-rows: auto; }
  .edu-left { display: none; }
  .edu-right { padding-left: 20px; grid-column: 2; }
  .edu-item:nth-child(even) .edu-right { order: 2; text-align: left; padding-left: 20px; padding-right: 0; }
  .edu-item:nth-child(even) .edu-dot  { order: 1; }
  .edu-item:nth-child(even) .edu-left  { display: none; }
  .edu-dot-wrap { grid-column: 1; justify-content: flex-start; }

  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ════════════════════════════════════════
   PHONES (600px)
════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero-name { font-size: 3.2rem; }
  .hero-role { font-size: 2.4rem; }
  .hero-photo-wrap { width: 240px; height: 300px; }
  .hero-desc { max-width: 100%; margin-top: 8px; }

  .section-title { font-size: 2.4rem; }
  .about-passion { font-size: 2rem; }
  .about-stats { flex-direction: column; gap: 12px; margin-top: 32px; }
  .stat-item { flex-direction: row; align-items: center; justify-content: space-between; background: rgba(25, 18, 46, 0.4); padding: 16px 24px; border-radius: 12px; border: 1px solid var(--border); }
  .stat-num { font-size: 1.8rem; }

  .projects-grid { gap: 24px; }
  .project-body { padding: 24px 24px 10px 24px; }
  .project-img { height: 220px; border-radius: 12px; }

  .edu-item { grid-template-columns: 40px 1fr; margin-bottom: 40px; }
  .edu-timeline::before { left: 20px; }
  .edu-dot { width: 16px; height: 16px; border-width: 2px; }
  .edu-dot-wrap { padding-top: 6px; }

  .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  .skill-category { padding: 24px; }

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

  .container { padding: 60px 20px; }
  nav  { padding: 14px 20px; }
  nav.scrolled  { padding: 12px 20px; }
}

/* ════════════════════════════════════════
   SMALL PHONES (400px)
════════════════════════════════════════ */
@media (max-width: 400px) {
  .hero-name { font-size: 2.6rem; }
  .hero-role { font-size: 1.8rem; }
  .hero-photo-wrap { width: 220px; height: 260px; }

  .section-title { font-size: 2rem; }
  .btn-primary { width: 100%; justify-content: center; text-align: center; }

  .project-img { height: 180px; }
  .project-title { font-size: 1.4rem; }

  .edu-year { font-size: 1.3rem; }
  .edu-degree { font-size: 1.05rem; }

  .stat-item { padding: 12px 16px; }
}

/* ════════════════════════════════════════
   CUSTOM CURSOR — PREMIUM
════════════════════════════════════════ */

/* Hide default cursor everywhere */
*, *::before, *::after { cursor: none !important; }

/* Inner glowing dot */
.cursor-dot {
  width: 10px; height: 10px;
  background: radial-gradient(circle, #e0aaff 0%, #a855f7 60%, #7c3aed 100%);
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  box-shadow:
    0 0 8px rgba(168, 85, 247, 0.9),
    0 0 20px rgba(124, 58, 237, 0.6),
    0 0 40px rgba(124, 58, 237, 0.3);
}

/* Outer trailing ring */
.cursor-outline {
  width: 36px; height: 36px;
  border: 2px solid rgba(168, 85, 247, 0.7);
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.35s cubic-bezier(.4,0,.2,1),
    height 0.35s cubic-bezier(.4,0,.2,1),
    border-color 0.35s ease,
    background 0.35s ease,
    border-radius 0.35s ease;
  /* Spinning dashed ring */
  border-style: dashed;
  animation: cursor-spin 6s linear infinite;
}

@keyframes cursor-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hover state — spotlight mode */
body.cursor-hover .cursor-outline {
  width: 56px; height: 56px;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(192, 132, 252, 0.9);
  border-style: solid;
  animation: none;
  transform: translate(-50%, -50%);
}
body.cursor-hover .cursor-dot {
  width: 6px; height: 6px;
  box-shadow:
    0 0 12px rgba(192, 132, 252, 1),
    0 0 30px rgba(124, 58, 237, 0.8);
}

/* Click state */
body.cursor-click .cursor-dot {
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0.6;
}
body.cursor-click .cursor-outline {
  width: 70px; height: 70px;
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--accent);
  border-style: solid;
  animation: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 900px) {
  .cursor-dot, .cursor-outline { display: none !important; }
  *, *::before, *::after { cursor: auto !important; }
  a, button, .project-card, .hamburger, [role="button"] { cursor: pointer !important; }
}

/* ════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS — PREMIUM
════════════════════════════════════════ */

/* ── Animation Keyframes ── */
@keyframes reveal-fade-up {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade-down {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-slide-left {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes reveal-slide-right {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes reveal-zoom {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes reveal-zoom-up {
  from { opacity: 0; transform: scale(0.88) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes reveal-flip-x {
  from { opacity: 0; transform: perspective(700px) rotateX(25deg) translateY(30px); }
  to   { opacity: 1; transform: perspective(700px) rotateX(0deg) translateY(0); }
}

/* ── Base: all reveal elements start hidden ── */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
}

/* ── Once visible: trigger animation based on context ── */

/* Default (section headers, generic elements) → fade up */
.reveal.visible {
  animation: reveal-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Section Header ── */
.section-header.reveal.visible {
  animation: reveal-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── About: left accent → slide in from left ── */
.about-accent.reveal.visible {
  animation: reveal-slide-left 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── About: content → slide in from right ── */
.about-content.reveal.visible {
  animation: reveal-slide-right 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

/* ── Project Cards → zoom up with stagger ── */
.project-card.reveal.visible {
  animation: reveal-zoom-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.project-card.reveal:nth-child(1).visible { animation-delay: 0s; }
.project-card.reveal:nth-child(2).visible { animation-delay: 0.14s; }
.project-card.reveal:nth-child(3).visible { animation-delay: 0.28s; }
.project-card.reveal:nth-child(4).visible { animation-delay: 0.42s; }

/* ── Education Items → alternate left/right slides ── */
.edu-item.reveal.visible {
  animation: reveal-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.edu-item.reveal:nth-child(odd).visible {
  animation: reveal-slide-left 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.edu-item.reveal:nth-child(even).visible {
  animation: reveal-slide-right 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.edu-item.reveal:nth-child(1).visible { animation-delay: 0s; }
.edu-item.reveal:nth-child(2).visible { animation-delay: 0.15s; }
.edu-item.reveal:nth-child(3).visible { animation-delay: 0.30s; }

/* ── Skills Grid → zoom in ── */
.skills-logo-grid.reveal.visible {
  animation: reveal-zoom 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Contact Split → flip perspective ── */
.contact-split.reveal.visible {
  animation: reveal-flip-x 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Footer → fade from below ── */
footer.reveal.visible {
  animation: reveal-fade-up 0.65s ease forwards;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ════════════════════════════════════════
   3D — HERO CANVAS BACKGROUND
════════════════════════════════════════ */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}
#hero .hero-inner {
  position: relative;
  z-index: 2;
}
#hero .scroll-indicator {
  z-index: 2;
}

/* ════════════════════════════════════════
   3D — HERO NAME TEXT DEPTH
════════════════════════════════════════ */
.hero-name {
  text-shadow:
    1px 1px 0 rgba(124,58,237,0.4),
    2px 2px 0 rgba(124,58,237,0.3),
    3px 3px 0 rgba(124,58,237,0.2),
    4px 4px 0 rgba(124,58,237,0.15),
    5px 5px 0 rgba(124,58,237,0.1),
    6px 6px 8px rgba(0,0,0,0.4);
  transform: perspective(600px) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}
.hero-name:hover {
  transform: perspective(600px) rotateX(0deg) scale(1.02);
  text-shadow:
    1px 1px 0 rgba(168,85,247,0.6),
    2px 2px 0 rgba(168,85,247,0.5),
    3px 3px 0 rgba(168,85,247,0.4),
    5px 5px 0 rgba(168,85,247,0.3),
    8px 8px 0 rgba(168,85,247,0.2),
    12px 12px 16px rgba(0,0,0,0.5);
}

/* ════════════════════════════════════════
   3D — HERO ROLE TEXT DEPTH
════════════════════════════════════════ */
.hero-role {
  filter: drop-shadow(0 4px 12px rgba(124,58,237,0.5));
  transform: perspective(600px) rotateX(1.5deg);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.hero-role:hover {
  transform: perspective(600px) rotateX(0deg);
  filter: drop-shadow(0 8px 24px rgba(168,85,247,0.7));
}

/* ════════════════════════════════════════
   3D — CARD TILT (applied via JS)
════════════════════════════════════════ */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s linear, box-shadow 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
}
.tilt-card .tilt-inner {
  transform-style: preserve-3d;
  transform: translateZ(0);
}
.tilt-card:hover {
  box-shadow:
    0 25px 60px rgba(124,58,237,0.35),
    0 0 80px rgba(124,58,237,0.15);
}

/* project cards get tilt by default */
.project-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card .project-body {
  transform: translateZ(12px);
  transform-style: preserve-3d;
}
.project-card .project-img-wrap {
  transform: translateZ(6px);
  transform-style: preserve-3d;
}
.project-card .project-num {
  transform: translateZ(18px);
  display: inline-block;
}
.project-card .project-title {
  transform: translateZ(10px);
  display: block;
}

/* ════════════════════════════════════════
   3D — SKILL CARDS (flip on hover)
════════════════════════════════════════ */
.skill-category {
  perspective: 800px;
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.skill-category:hover {
  transform: perspective(800px) rotateY(-4deg) rotateX(3deg) translateZ(10px) scale(1.02);
  border-color: var(--purple-lt);
  box-shadow:
    0 20px 50px rgba(124,58,237,0.3),
    0 0 60px rgba(124,58,237,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.skill-cat-icon {
  transition: transform 0.4s ease;
}
.skill-category:hover .skill-cat-icon {
  transform: rotateY(15deg) scale(1.1);
}

/* ════════════════════════════════════════
   3D — ABOUT PHOTO FRAME
════════════════════════════════════════ */
.about-photo-frame {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.6s cubic-bezier(.4,0,.2,1), box-shadow 0.6s ease;
  box-shadow:
    8px 16px 40px rgba(124,58,237,0.3),
    -2px -2px 20px rgba(124,58,237,0.1),
    0 0 60px rgba(124,58,237,0.15);
}
.about-photo-wrap:hover .about-photo-frame {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.03);
  box-shadow:
    0 30px 80px rgba(124,58,237,0.45),
    0 0 100px rgba(124,58,237,0.2);
}

/* ════════════════════════════════════════
   3D — EDUCATION TIMELINE ITEMS
════════════════════════════════════════ */
.edu-item {
  perspective: 800px;
}
.edu-right,
.edu-left {
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), opacity 0.5s ease;
}
.edu-item:hover .edu-right {
  transform: perspective(600px) translateZ(12px) rotateX(-1deg);
}
.edu-item:hover .edu-year {
  text-shadow:
    1px 1px 0 rgba(168,85,247,0.5),
    2px 2px 0 rgba(168,85,247,0.3),
    3px 3px 6px rgba(0,0,0,0.3);
}

/* ════════════════════════════════════════
   3D — NAV LOGO DEPTH
════════════════════════════════════════ */
.nav-logo {
  text-shadow:
    1px 2px 0 rgba(124,58,237,0.35),
    3px 4px 8px rgba(0,0,0,0.3);
  transition: text-shadow var(--trans), transform var(--trans);
}
.nav-logo:hover {
  text-shadow:
    2px 3px 0 rgba(168,85,247,0.5),
    4px 6px 12px rgba(0,0,0,0.4);
  transform: perspective(300px) translateZ(4px);
}

/* ════════════════════════════════════════
   3D — SECTION TITLES
════════════════════════════════════════ */
.section-title {
  text-shadow:
    1px 2px 0 rgba(0,0,0,0.4),
    2px 4px 0 rgba(124,58,237,0.2);
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}
.section-header:hover .section-title {
  text-shadow:
    2px 4px 0 rgba(124,58,237,0.3),
    4px 8px 12px rgba(0,0,0,0.5);
  transform: perspective(500px) translateZ(6px);
}

/* ════════════════════════════════════════
   3D — FLOATING SECTION DEPTH
════════════════════════════════════════ */
#about, #projects, #education, #skills, #contact {
  transform-style: preserve-3d;
}

/* ════════════════════════════════════════
   3D — HERO SOCIAL ICONS DEPTH
════════════════════════════════════════ */
.hero-social a {
  transform-style: preserve-3d;
  transition: var(--trans), transform 0.3s cubic-bezier(.4,0,.2,1);
}
.hero-social a:hover {
  transform: translateZ(8px) scale(1.15);
  color: var(--text);
  border-color: var(--purple-lt);
  background: var(--purple-dim);
  box-shadow:
    0 0 20px var(--glow),
    0 8px 20px rgba(0,0,0,0.4);
}

/* ════════════════════════════════════════
   3D — STAT ITEMS DEPTH
════════════════════════════════════════ */
.stat-item {
  transition: transform 0.35s ease;
  transform-style: preserve-3d;
}
.about-stats:hover .stat-item {
  transform: perspective(400px) translateZ(8px);
}
.about-stats:hover a.stat-item:hover {
  transform: perspective(400px) translateZ(15px) translateY(-5px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.2);
}
.about-stats:hover .stat-item:not(:hover) {
  transform: perspective(400px) translateZ(2px) opacity(0.8);
}

/* ════════════════════════════════════════
   3D — CONTACT GRID CARDS
════════════════════════════════════════ */
.contact-grid > div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.contact-grid > div:hover {
  transform: perspective(800px) rotateX(-2deg) rotateY(2deg) translateZ(12px);
  border-color: var(--purple-lt);
  box-shadow: 0 20px 50px rgba(124,58,237,0.25);
}

/* ════════════════════════════════════════
   3D — FOOTER (PREMIUM DESIGN)
   ════════════════════════════════════════ */
footer {
  background: linear-gradient(to top, var(--bg) 0%, var(--bg2) 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.footer-container {
  padding: 30px 60px;
}

.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-brand-mini {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -1px;
  display: inline-block;
}
.footer-logo span { color: var(--purple-lt); }

.footer-social-links {
  display: flex;
  gap: 12px;
}

.footer-social-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1rem;
  transition: var(--trans);
  background: rgba(124, 58, 237, 0.05);
  transform-style: preserve-3d;
}

.footer-social-links a:hover {
  border-color: var(--purple-lt);
  color: var(--text);
  background: var(--purple-dim);
  box-shadow: 0 0 15px var(--glow);
  transform: translateY(-3px) translateZ(8px);
}

.footer-links-mini {
  display: flex;
  gap: 24px;
}

.footer-links-mini a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--trans);
}

.footer-links-mini a:hover {
  color: var(--purple-lt);
  transform: translateY(-2px);
}

.footer-bottom-mini {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-bottom-mini span { color: var(--purple-lt); font-weight: 700; }

.back-to-top-mini {
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--purple-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: var(--trans);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transform-style: preserve-3d;
}

.back-to-top-mini:hover {
  background: var(--purple);
  transform: translateY(-5px) rotateY(10deg);
  box-shadow: 0 10px 25px var(--glow);
}

/* Responsive Footer Mini */
@media (max-width: 900px) {
  .footer-flex {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .footer-brand-mini {
    flex-direction: column;
    gap: 12px;
  }
  .footer-links-mini {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }
}

/* ════════════════════════════════════════
   3D — BTN PRIMARY DEPTH
════════════════════════════════════════ */
.btn-primary {
  transform-style: preserve-3d;
  position: relative;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  background: var(--purple);
  box-shadow: 0 0 30px var(--glow), 0 0 60px var(--glow), 0 10px 30px rgba(0,0,0,0.3);
  border-color: var(--purple);
  transform: perspective(400px) translateZ(10px) translateY(-2px);
}

/* ════════════════════════════════════════
   3D — DEPTH GRID LINES (Hero ambient)
════════════════════════════════════════ */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}

/* ════════════════════════════════════════
   3D — PROJECT CARD GLASS SHINE
════════════════════════════════════════ */
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  border-radius: 24px 24px 0 0;
  pointer-events: none;
  z-index: 0;
}

/* ════════════════════════════════════════
   3D — ORB ENHANCEMENT
════════════════════════════════════════ */
.orb {
  transform-style: preserve-3d;
  filter: blur(80px);
}
.orb-1 {
  background: radial-gradient(ellipse at center,
    rgba(124,58,237,1) 0%,
    rgba(76,29,149,0.8) 40%,
    rgba(124,58,237,0.3) 70%,
    transparent 100%
  );
}
.orb-2 {
  background: radial-gradient(ellipse at center,
    rgba(45,27,105,1) 0%,
    rgba(76,29,149,0.7) 40%,
    transparent 100%
  );
}
.orb-3 {
  background: radial-gradient(ellipse at center,
    rgba(168,85,247,0.8) 0%,
    rgba(124,58,237,0.4) 50%,
    transparent 100%
  );
}


/* ════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
   ════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  padding: 16px 24px;
  background: rgba(17, 13, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px var(--glow);
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

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

.toast-icon {
  width: 32px;
  height: 32px;
  background: var(--purple-dim);
  color: var(--purple-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
  display: block;
}

.toast-message {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: block;
}

/* ════════════════════════════════════════
   BUTTON LOADING STATES
   ════════════════════════════════════════ */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ════════════════════════════════════════
   BIO-DATA MODAL
════════════════════════════════════════ */

/* ── Trigger style on name ── */
.bio-trigger {
  cursor: pointer;
  position: relative;
  transition: var(--trans);
}
.bio-trigger::after {
  content: '👆 click';
  position: absolute;
  bottom: -22px; left: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple-lt);
  opacity: 0;
  transition: opacity var(--trans);
  white-space: nowrap;
  -webkit-text-fill-color: var(--purple-lt);
}
.bio-trigger:hover::after { opacity: 1; }
.bio-trigger:hover { text-shadow: 0 0 30px rgba(168,85,247,0.5); }

/* ── Overlay ── */
.bio-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(4,2,10,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.bio-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── Modal card ── */
.bio-modal {
  background: var(--card);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 28px;
  width: min(680px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 80px rgba(124,58,237,0.2), 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(168,85,247,0.3) transparent;
}
.bio-overlay.open .bio-modal {
  transform: scale(1) translateY(0);
}

/* ── Close button ── */
.bio-close {
  position: sticky; top: 16px; float: right;
  margin: 16px 16px 0 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  font-size: 0.88rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans); z-index: 10;
}
.bio-close:hover { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ── Header ── */
.bio-header {
  display: flex; align-items: center; gap: 24px;
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border);
  clear: both;
}
.bio-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dim), var(--purple));
  border: 2px solid rgba(168,85,247,0.5);
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 0 30px rgba(124,58,237,0.4);
}
.bio-avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.bio-name {
  font-size: 1.6rem; font-weight: 900; letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text) 40%, var(--purple-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.bio-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(168,85,247,0.3);
  color: var(--purple-lt); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 50px;
  margin-bottom: 10px;
}
.bio-quick {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.bio-quick span {
  font-size: 0.82rem; color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
}
.bio-quick i { color: var(--purple-lt); }

/* ── Body ── */
.bio-body { padding: 0 32px 24px; }

/* ── Section ── */
.bio-section {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bio-section:last-child { border-bottom: none; }
.bio-section-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--purple-lt);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.bio-section-title i { font-size: 0.85rem; }

/* Contact rows */
.bio-info-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; color: var(--text-dim);
  margin-bottom: 10px;
}
.bio-info-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(124,58,237,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-lt); font-size: 0.85rem; flex-shrink: 0;
}

/* Education items */
.bio-edu-item {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 12px;
}
.bio-edu-year {
  font-size: 0.72rem; font-weight: 700; color: var(--purple-lt);
  background: rgba(124,58,237,0.1); border: 1px solid rgba(168,85,247,0.2);
  border-radius: 50px; padding: 3px 10px; white-space: nowrap;
  flex-shrink: 0; margin-top: 2px;
}
.bio-edu-detail {
  display: flex; flex-direction: column; gap: 2px;
}
.bio-edu-detail strong { font-size: 0.9rem; color: var(--text); font-weight: 700; }
.bio-edu-detail span { font-size: 0.8rem; color: var(--text-dim); }

/* Skill chips */
.bio-skill-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.bio-skill-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,0.1); border: 1px solid rgba(168,85,247,0.2);
  border-radius: 50px; padding: 6px 14px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-dim);
  transition: var(--trans);
}
.bio-skill-chip:hover { background: rgba(124,58,237,0.22); color: var(--text); border-color: rgba(168,85,247,0.45); }
.bio-skill-chip i { color: var(--purple-lt); }
.bio-skill-learning { border-color: rgba(245,158,11,0.3); }
.learning-tag {
  background: rgba(245,158,11,0.15); color: #fbbf24;
  font-size: 0.68rem; padding: 1px 7px; border-radius: 50px;
  border: 1px solid rgba(245,158,11,0.3);
}

/* Projects */
.bio-projects { display: flex; flex-direction: column; gap: 8px; }
.bio-project-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text-dim);
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  transition: var(--trans);
}
.bio-project-item:hover { background: rgba(124,58,237,0.08); border-color: rgba(168,85,247,0.25); color: var(--text); }
.bio-project-item i { color: var(--purple-lt); width: 16px; text-align: center; }

/* Objective */
.bio-objective {
  font-size: 0.88rem; color: var(--text-dim);
  line-height: 1.75;
  background: rgba(124,58,237,0.05);
  border-left: 3px solid var(--purple);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
}

/* Hobbies */
.bio-hobbies {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.bio-hobbies span {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 50px; padding: 6px 14px;
  font-size: 0.85rem; color: var(--text-dim);
  transition: var(--trans);
}
.bio-hobbies span:hover { background: rgba(124,58,237,0.1); border-color: rgba(168,85,247,0.3); color: var(--text); }

/* Footer */
.bio-footer {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: center;
}
.bio-download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px;
  background: linear-gradient(135deg, var(--purple-dim), var(--purple-lt));
  color: #fff; border: none; font-family: 'Inter', sans-serif;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  transition: opacity var(--trans), transform var(--trans);
}
.bio-download-btn:hover { opacity: 0.88; transform: translateY(-2px); }

/* ── Print styles ── */
@media print {
  body > *:not(.bio-overlay) { display: none !important; }
  .bio-overlay { position: static; background: none; backdrop-filter: none; opacity: 1; pointer-events: all; padding: 0; }
  .bio-modal { box-shadow: none; max-height: none; border: none; transform: none; border-radius: 0; }
  .bio-close, .bio-footer, .bio-trigger::after { display: none !important; }
  .bio-name { -webkit-text-fill-color: #000; color: #000; }
  body { background: #fff; color: #000; }
  .bio-section-title, .bio-badge, .bio-skill-chip i, .bio-info-icon { color: var(--purple); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .bio-header { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 20px 20px; }
  .bio-body { padding: 0 20px 20px; }
  .bio-footer { padding: 16px 20px 24px; }
  .bio-avatar { width: 72px; height: 72px; }
  .bio-name { font-size: 1.3rem; }
}

/* ══════════════════════════════════════════
   CERTIFICATE VIEWER MODAL
   ══════════════════════════════════════════ */
.cert-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 5, 20, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}
.cert-viewer-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cert-viewer-container {
  position: relative;
  width: 95%;
  max-width: 900px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}
.cert-viewer-overlay.open .cert-viewer-container {
  transform: scale(1);
}

.cert-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(124,58,237,0.08);
  flex-shrink: 0;
}
.cert-viewer-header > span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple-lt);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cert-viewer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cert-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1.5px solid var(--purple-lt);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: var(--trans);
}
.cert-print-btn:hover {
  background: var(--purple);
  box-shadow: 0 0 20px var(--glow);
}
.cert-viewer-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.cert-viewer-close-btn:hover {
  background: var(--purple);
  color: var(--text);
  transform: rotate(90deg);
}

.cert-viewer-img-wrap {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  overflow-y: auto;
}
.cert-viewer-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .cert-viewer-header { padding: 14px 16px; }
  .cert-print-btn { padding: 7px 14px; font-size: 0.78rem; }
}

/* ════════════════════════════════════════
   RESUME MODAL
════════════════════════════════════════ */
.resume-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 2, 10, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.resume-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.resume-modal {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.7),
    0 0 0 1px rgba(168,85,247,0.15);
  transform: scale(0.92) translateY(30px);
  transition: transform 0.4s cubic-bezier(.34,1.3,.64,1), opacity 0.35s ease;
  opacity: 0;
}
.resume-overlay.open .resume-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(124,58,237,0.08);
  flex-shrink: 0;
}
.resume-modal-header > span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple-lt);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}
.resume-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.resume-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1.5px solid var(--purple-lt);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: var(--trans);
  letter-spacing: 0.3px;
}
.resume-download-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 20px var(--glow);
}
.resume-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.resume-close:hover {
  background: var(--purple);
  border-color: var(--purple-lt);
  color: var(--text);
  transform: rotate(90deg);
}

.resume-img-wrap {
  overflow: auto;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: rgba(0,0,0,0.2);
  flex: 1;
  min-height: 0;
}
.resume-img-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.resume-img-wrap::-webkit-scrollbar-track { background: transparent; }
.resume-img-wrap::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

.resume-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(168,85,247,0.2);
  transition: width 0.2s ease-out;
  cursor: zoom-in;
  flex-shrink: 0;
}

/* ── Zoom controls ── */
.resume-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 10px;
}
.resume-zoom-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.resume-zoom-btn:hover {
  background: rgba(124,58,237,0.25);
  color: var(--purple-lt);
}
.resume-zoom-reset {
  font-size: 0.75rem;
}
.resume-zoom-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple-lt);
  min-width: 38px;
  text-align: center;
  letter-spacing: 0.5px;
}

.resume-print-btn, .resume-download-btn, .cert-print-btn, .cert-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1.5px solid var(--purple-lt);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: var(--trans);
  letter-spacing: 0.3px;
  cursor: pointer;
}
.resume-print-btn:hover, .resume-download-btn:hover, .cert-print-btn:hover, .cert-download-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 20px var(--glow);
}

@media (max-width: 600px) {
  .resume-modal-header, .cert-viewer-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .resume-img-wrap, .cert-viewer-img-wrap { padding: 14px; }
  .resume-print-btn, .resume-download-btn, .cert-print-btn, .cert-download-btn { 
    padding: 7px 14px; font-size: 0.78rem; 
  }
}

/* ════════════════════════════════════════
   PRINT STYLES
════════════════════════════════════════ */
@media print {
  /* Hide everything by default */
  body * { visibility: hidden; }
  
  /* Show only the active modal (Resume, Bio, or Certificate) */
  #resume-overlay.open, #resume-overlay.open *,
  #bio-overlay.open, #bio-overlay.open *,
  #cert-viewer-overlay.open, #cert-viewer-overlay.open * {
    visibility: visible;
  }
  
  /* Reset overlay for printing */
  #resume-overlay.open, #bio-overlay.open, #cert-viewer-overlay.open {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: auto;
    background: white !important;
    padding: 0 !important;
    display: block !important;
  }
  
  /* Reset modal container */
  .resume-modal, .bio-modal, .cert-viewer-container {
    position: relative !important;
    top: 0 !important; left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
    background: white !important;
    margin: 0 !important;
  }
  
  /* Hide UI elements during print */
  .resume-modal-header, .resume-zoom-controls, .bio-close, .bio-footer, .resume-close, .cert-viewer-header, .cert-viewer-close-btn, .resume-download-btn, .cert-download-btn {
    display: none !important;
  }
  
  /* Ensure image fills page */
  .resume-img-wrap, .cert-viewer-img-wrap {
    padding: 0 !important;
    overflow: visible !important;
    display: block !important;
  }
  .resume-img, .cert-viewer-img-wrap img {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
