/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple-dark:   #0d0618;
  --purple-accent: #6c3de0;
  --purple-light:  #9b6dff;
  --pink:          #c850c0;
  --white:         #ffffff;
  --gray:          #b0a8c8;
  --card-bg:       rgba(255,255,255,0.06);
  --card-border:   rgba(255,255,255,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--purple-dark);
  color: var(--white);
  overflow-x: hidden;
}

/* ══════════════════════════════
   BG BLOBS
══════════════════════════════ */
.bg-blob {
  position: fixed; border-radius: 50%;
  filter: blur(200px); opacity: 0.35;
  pointer-events: none; z-index: 0;
}
.blob1 { width: 600px; height: 600px; background: #6c3de0; top: -100px; left: -150px; animation: blobMove1 12s ease-in-out infinite alternate; }
.blob2 { width: 500px; height: 500px; background: #c850c0; top: 30%;   right: -100px; animation: blobMove2 15s ease-in-out infinite alternate; }
.blob3 { width: 400px; height: 400px; background: #3d1a8c; bottom: 10%; left: 20%;   animation: blobMove3 10s ease-in-out infinite alternate; }
@keyframes blobMove1 { from { transform: translate(0,0) scale(1); }   to { transform: translate(60px,80px)  scale(1.1); } }
@keyframes blobMove2 { from { transform: translate(0,0) scale(1); }   to { transform: translate(-50px,60px) scale(1.15); } }
@keyframes blobMove3 { from { transform: translate(0,0) scale(1); }   to { transform: translate(40px,-60px) scale(1.08); } }

/* ══════════════════════════════
   LIGHTBOX
══════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,0,15,0.93);
  backdrop-filter: blur(18px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox-img-wrap {
  max-width: 82vw; max-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 100%; max-height: 80vh;
  border-radius: 14px;
  box-shadow: 0 0 80px rgba(108,61,224,0.45);
  transform: scale(0.88);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), opacity 0.2s;
}
.lightbox.active .lightbox-img-wrap img { transform: scale(1); }

.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.1rem; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.25s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); transform: rotate(90deg); }

.lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 2rem; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover { background: rgba(108,61,224,0.45); transform: translateX(-3px); }
.lightbox-next:hover { background: rgba(108,61,224,0.45); transform: translateX(3px); }

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 48px;
  background: rgba(13,6,24,0.65);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  animation: slideDown 0.7s ease both;
  transition: padding 0.3s;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-30px); } to { opacity:1; transform:translateY(0); } }

.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 1.1rem; letter-spacing: 0.05em;
}
.nav-logo span {
  background: var(--purple-accent); color: #fff;
  padding: 2px 7px; border-radius: 4px; margin-right: 4px;
}

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--gray); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: color 0.3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--purple-light); transition: width 0.3s;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

.btn-talk {
  background: linear-gradient(135deg, var(--purple-accent), var(--pink));
  color: #fff; border: none; padding: 9px 20px;
  border-radius: 50px; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(108,61,224,0.5);
}
.btn-talk:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(108,61,224,0.7); }

/* Hamburger - hidden on desktop */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: rgba(13,6,24,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 0;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.mobile-nav.open { max-height: 300px; padding: 16px 0; }
.mobile-nav ul { list-style: none; }
.mobile-nav ul li a {
  display: block; padding: 14px 32px;
  color: var(--gray); text-decoration: none;
  font-size: 1rem; font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.mobile-nav ul li a:hover { color: #fff; background: rgba(108,61,224,0.15); }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 60px; overflow: hidden;
}

/* Glow ring */
.hero::before {
  content: '';
  position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,61,224,0.28) 0%, transparent 70%);
  z-index: 1; animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { transform: translateX(-50%) scale(1);    opacity: 0.6; }
  50%      { transform: translateX(-50%) scale(1.12); opacity: 1;   }
}

.hero-title {
  position: absolute; top: 90px; left: 50%;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 900; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.07);
  white-space: nowrap; user-select: none;
  animation: fadeInTitle 1s 0.3s ease both;
}
@keyframes fadeInTitle {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

.hero-img-wrap {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 320px; height: 500px; z-index: 2;
  animation: heroImgIn 1.2s 0.5s ease both;
}
.hero-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  border-radius: 160px 160px 0 0;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
@keyframes heroImgIn {
  from { opacity:0; transform: translateX(-50%) translateY(40px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

.hero-bottom {
  position: relative; z-index: 3;
  width: 100%; display: flex; justify-content: space-between;
  align-items: flex-end; padding: 0 48px;
}
.hero-tag {
  font-size: 1.05rem; font-weight: 700;
  color: var(--gray); letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1.5;
  animation: fadeInUp 1s 0.8s ease both;
}
.hero-name {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900; text-align: right;
  background: linear-gradient(135deg, #fff, var(--purple-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: fadeInUp 1s 0.9s ease both;
  letter-spacing: 0.02em;
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 4; animation: fadeInUp 1s 1.4s ease both;
}
.scroll-indicator span {
  display: block; width: 22px; height: 36px;
  border: 2px solid rgba(255,255,255,0.22); border-radius: 11px;
  position: relative; margin: 0 auto;
}
.scroll-indicator span::before {
  content: '';
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--purple-light);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { opacity:1; transform: translateX(-50%) translateY(0); }
  100% { opacity:0; transform: translateX(-50%) translateY(14px); }
}

/* ══════════════════════════════
   SECTIONS COMMON
══════════════════════════════ */
section { position: relative; z-index: 1; padding: 80px 48px; }

.section-label {
  text-align: center; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--purple-light); margin-bottom: 10px;
}
.section-title {
  text-align: center; font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 900; letter-spacing: 0.03em; margin-bottom: 12px;
}
.divider {
  width: 50px; height: 3px; margin: 0 auto 44px;
  background: linear-gradient(90deg, var(--purple-accent), var(--pink));
  border-radius: 2px;
}

/* ══════════════════════════════
   PORTFOLIO
══════════════════════════════ */
.portfolio { background: rgba(255,255,255,0.015); }

.proj-category {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 14px;
}
.proj-tag {
  display: inline-block;
  border: 1.5px solid var(--card-border); border-radius: 50px;
  padding: 6px 18px; font-size: 0.8rem; font-weight: 600;
  color: var(--white); margin-bottom: 16px;
  background: var(--card-bg); backdrop-filter: blur(10px);
  transition: background 0.3s, border-color 0.3s;
}
.proj-tag:hover { background: rgba(108,61,224,0.25); border-color: var(--purple-light); }

.proj-card {
  background: var(--card-bg); backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: 18px;
  overflow: hidden; margin-bottom: 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.proj-card:hover { transform: translateY(-5px); box-shadow: 0 18px 50px rgba(108,61,224,0.22); }

.proj-card-title {
  padding: 14px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem; font-weight: 800;
  border-bottom: 1px solid var(--card-border);
  letter-spacing: 0.04em;
}

/* ── Image grid inside card ── */
.proj-img-wrap {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.proj-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: rgba(255,255,255,0.05);
  cursor: zoom-in;
  transition: transform 0.25s, box-shadow 0.25s;
}
.proj-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(108,61,224,0.38);
}

/* ══════════════════════════════
   ABOUT
══════════════════════════════ */
.about-section {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 56px; align-items: center;
  max-width: 960px; margin: 0 auto;
}
.about-img-wrap { position: relative; }
.about-img-wrap::before {
  content: ''; position: absolute; inset: -3px; border-radius: 20px;
  background: linear-gradient(135deg, var(--purple-accent), var(--pink));
  z-index: -1;
}
.about-img {
  width: 100%; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #2c1a60, #6c3de0);
  aspect-ratio: 3/4;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cert-badge {
  position: absolute; bottom: -20px; right: -20px;
  background: linear-gradient(135deg, #fff9e6, #ffe8a3);
  border-radius: 12px; padding: 12px 16px;
  color: #3d2000; font-weight: 700; font-size: 0.78rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.about-text p {
  color: var(--gray); line-height: 1.85; font-size: 0.92rem; margin-bottom: 14px;
}
.about-text p strong { color: #fff; }

.skills-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  padding: 5px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 600;
  background: rgba(108,61,224,0.18); border: 1px solid rgba(108,61,224,0.38);
  color: var(--purple-light); transition: background 0.3s, transform 0.2s;
}
.chip:hover { background: rgba(108,61,224,0.38); transform: translateY(-2px); }

/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
.contact-section { text-align: center; }
.contact-cards {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center; margin-top: 36px;
}
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  backdrop-filter: blur(16px); border-radius: 50px; padding: 13px 26px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  text-decoration: none; color: #fff; min-width: 240px;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(108,61,224,0.3);
  border-color: var(--purple-light);
}
.contact-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.c-email .contact-icon { background: linear-gradient(135deg, #ea4335, #fbbc05); }
.c-phone .contact-icon { background: linear-gradient(135deg, #25d366, #128c7e); }
.c-fb   .contact-icon { background: linear-gradient(135deg, #1877f2, #42a5f5); }
.contact-info { text-align: left; }
.contact-label { font-size: 0.7rem; color: var(--gray); font-weight: 500; }
.contact-value { font-size: 0.86rem; font-weight: 600; word-break: break-all; }

/* ══════════════════════════════
   SCROLL REVEAL
══════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  position: relative; z-index: 1;
  text-align: center; padding: 28px;
  border-top: 1px solid var(--card-border);
  color: var(--gray); font-size: 0.78rem;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .about-section { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* Mobile */
@media (max-width: 768px) {
  /* Navbar */
  nav { padding: 14px 20px; }
  .nav-links, .btn-talk { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  section { padding: 60px 20px; }
  .hero-bottom { padding: 0 20px; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .hero-tag  { font-size: 0.82rem; text-align: center; }
  .hero-name { font-size: 1.5rem; text-align: center; }
  .hero-img-wrap { width: 240px; height: 380px; }
  .hero::before { width: 280px; height: 280px; }

  /* Projects */
  .proj-img-wrap { grid-template-columns: repeat(2, 1fr); }

  /* About */
  .about-section { grid-template-columns: 1fr; }
  .cert-badge { bottom: -14px; right: -10px; }

  /* Contact */
  .contact-card { min-width: unset; width: 100%; }
  .contact-cards { flex-direction: column; align-items: center; }

  /* Lightbox arrows */
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-img-wrap { max-width: 94vw; }
}

/* Small mobile */
@media (max-width: 420px) {
  .hero-title { font-size: 3rem; }
  .proj-img-wrap { grid-template-columns: 1fr; }
  .hero-img-wrap { width: 200px; height: 320px; }
}