/* ════════════════════════════════════════════ VARIABLES */
:root {
  --hero-from:  #1e0a78;
  --hero-mid:   #5618bf;
  --hero-to:    #c040ef;
  --purple:     #7c3aed;
  --purple-lt:  #c040f5;
  --pink:       #da1a8a;
  --dark:       #07050f;
  --dark-2:     #0d0a1c;
  --card:       rgba(255,255,255,.06);
  --border:     rgba(255,255,255,.13);
  --text:       #f2eeff;
  --muted:      #a89dc8;
  --r:          16px;
  --fh:         'Poppins', system-ui, sans-serif;
  --fb:         'Inter',   system-ui, sans-serif;
}

@font-face {
  font-family: "Font Awesome 5 Brands";
  font-style: normal;
  font-weight: normal;
  src: url("../fonts/fa-brands-400.eot");
  src:
    url("../fonts/fa-brands-400d41d.eot?#iefix") format("embedded-opentype"),
    url("../fonts/fa-brands-400.woff2") format("woff2"),
    url("../fonts/fa-brands-400.woff") format("woff"),
    url("../fonts/fa-brands-400.ttf") format("truetype"),
    url("../fonts/fa-brands-400.svg#fontawesome") format("svg");
}

@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/fa-regular-400.eot");
  src:
    url("../fonts/fa-regular-400d41d.eot?#iefix") format("embedded-opentype"),
    url("../fonts/fa-regular-400.woff2") format("woff2"),
    url("../fonts/fa-regular-400.woff") format("woff"),
    url("../fonts/fa-regular-400.ttf") format("truetype"),
    url("../fonts/fa-regular-400.svg#fontawesome") format("svg");
}

@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 900;
  src: url("../fonts/fa-solid-900.eot");
  src:
    url("../fonts/fa-solid-900d41d.eot?#iefix") format("embedded-opentype"),
    url("../fonts/fa-solid-900.woff2") format("woff2"),
    url("../fonts/fa-solid-900.woff") format("woff"),
    url("../fonts/fa-solid-900.ttf") format("truetype"),
    url("../fonts/fa-solid-900.svg#fontawesome") format("svg");
}

/* ════════════════════════════════════════════ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--fb); background: var(--dark); color: var(--text); overflow-x: hidden; }
a     { color: inherit; text-decoration: none; }
img   { display: block; max-width: 100%; }
p     { color: var(--muted); line-height: 1.75; margin-bottom: 12px; }
ul    { list-style: none; }
h1,h2,h3 { font-family: var(--fh); line-height: 1.2; }

/* ════════════════════════════════════════════ UTILITIES */
.wrap { width: min(1220px, 92%); margin: 0 auto; }
.section     { padding: 96px 0; position: relative; z-index: 2; }
.sec-alt     { background: var(--dark-2); }
.section-sub { color: var(--muted); font-size: .92rem; margin-top: 6px; }

.section-head        { margin-bottom: 48px; }
.section-head h2     { font-size: clamp(1.6rem, 3.2vw, 2.5rem); max-width: 620px; margin-top: 8px; }

.kicker {
  display: inline-block;
  font-family: var(--fb);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--purple-lt);
}
.kicker::before { content: '// '; opacity: .55; }

/* ════════════════════════════════════════════ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  font-family: var(--fb); font-size: .97rem; font-weight: 600;
  cursor: pointer; border: 0;
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-white {
  background: #fff; color: #4a14b0;
  box-shadow: 0 10px 26px rgba(255,255,255,.15);
}
.btn-white:hover { box-shadow: 0 16px 36px rgba(255,255,255,.26); }

.btn-outline-white {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.68);
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); }

.btn-purple {
  background: linear-gradient(120deg, var(--purple), var(--purple-lt));
  color: #fff;
  box-shadow: 0 10px 26px rgba(140,40,220,.3);
}
.btn-purple:hover { box-shadow: 0 16px 38px rgba(140,40,220,.5); }

.btn-preview {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  font-size: .85rem;
}

/* ════════════════════════════════════════════ HEADER */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200; padding: 14px 0;
  transition: background .4s ease, box-shadow .4s ease;
}
.site-header.scrolled {
  background: rgba(7,5,15,.93);
  backdrop-filter: blur(18px);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.h-inner {
  display: flex; align-items: center; gap: 28px;
}

.brand {
  font-family: var(--fh); font-weight: 800; font-size: 1.45rem;
  color: #fff; flex-shrink: 0;
}

.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a {
  font-weight: 500; color: rgba(255,255,255,.88);
  position: relative; padding-bottom: 3px;
  transition: color .2s ease;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--pink);
  transition: width .25s ease;
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

.nav-cta {
  background: var(--pink); color: #fff; font-weight: 600;
  padding: 10px 22px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(218,26,138,.4); }

.menu-btn {
  display: none; flex-direction: column; justify-content: space-between; gap: 5px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07);
  border-radius: 8px; padding: 8px 9px; cursor: pointer; width: 40px; height: 40px;
}
.menu-btn span {
  display: block; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}

/* ════════════════════════════════════════════ HERO */
.hero {
  min-height: 100vh;
  background: linear-gradient(110deg, var(--hero-from) 0%, var(--hero-mid) 40%, #8a28d8 68%, var(--hero-to) 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  z-index: 1;
}

/* Particle canvas — contained within hero */
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* Decorative rings */
.ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.16);
  pointer-events: none;
}
.r1 { width: 310px; height: 310px; top: -65px; right: 17%; }
.r2 { width: 460px; height: 460px; top: -130px; right:  8%; }

/* Dot grid */
.dot-grid {
  position: absolute; bottom: 48px; right: 72px;
  width: 228px; height: 184px; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.42) 2px, transparent 2px);
  background-size: 22px 22px;
}

/* Social rail */
.social-rail {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 10;
}
.social-rail a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1rem;
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
  transition: background .2s ease, transform .2s ease;
}
.social-rail a:hover { background: rgba(255,255,255,.32); transform: scale(1.12); }

/* Hero body */
.hero-body {
  flex: 1; display: flex; align-items: center;
  padding-top: 90px; padding-bottom: 40px;
  position: relative; z-index: 2;
}

/* Circular photo */
.hero-photo-col { flex-shrink: 0; }

.hero-circle {
  width: min(490px, 62vmin); height: min(490px, 62vmin);
  border-radius: 50%; overflow: hidden;
  margin-left: min(-90px, -7vw);
  position: relative;
}
.hero-circle img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
/* Left-side gradient overlay to merge circle with background */
.hero-circle::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(to right,
    rgba(30,10,120,.72) 0%,
    rgba(30,10,100,.35) 38%,
    transparent 62%
  );
  z-index: 1; pointer-events: none;
}

/* Hero text */
.hero-text-col {
  flex: 1;
  padding: 0 30px 0 50px;
  margin-left: -32px;
  position: relative; z-index: 2;
}

.hero-h1 {
  font-family: var(--fh);
  font-size: clamp(2.1rem, 5.6vw, 4.5rem);
  font-weight: 800; color: #fff; line-height: 1.1;
  margin-bottom: 16px;
}

.hero-role {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.9); font-size: 1.05rem; font-weight: 500;
  margin-bottom: 18px; min-height: 30px;
}
.role-dash { flex-shrink: 0; display: block; width: 36px; height: 2px; background: rgba(255,255,255,.82); }
.cursor { color: rgba(255,255,255,.8); animation: blink .75s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-intro {
  max-width: 520px; color: rgba(255,255,255,.8);
  font-size: 1rem; line-height: 1.72; margin-bottom: 28px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }

.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--fh); font-size: 1.5rem; color: #fff; }
.hero-stats span   { font-size: .8rem; color: rgba(255,255,255,.6); }

/* ════════════════════════════════════════════ ABOUT */
.about-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start;
}
.about-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px;
}
.about-facts div { border-left: 3px solid var(--purple); padding-left: 12px; }
.about-facts strong { display: block; color: #fff; font-size: .88rem; }
.about-facts span   { color: var(--muted); font-size: .86rem; }

/* Floating chips */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font-size: .88rem; color: #d8ccff;
  text-align: center; backdrop-filter: blur(6px);
  animation: floatUp 4.5s ease-in-out infinite;
}
.chip:nth-child(2n) { animation-delay: .55s; }
.chip:nth-child(3n) { animation-delay: 1.1s; }
.chip:nth-child(4n) { animation-delay: 1.65s; }
@keyframes floatUp { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ════════════════════════════════════════════ SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }

.sk-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 24px; backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform .25s ease, border-color .25s ease;
}
.sk-card:hover { border-color: rgba(180,100,255,.7); }

.sk-ico {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.sk-card h3 { color: #fff; font-size: .97rem; margin-bottom: 8px; }

.bar {
  margin-top: 14px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.1); overflow: hidden;
}
.bar-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #7a57ff, var(--purple-lt));
  animation: grow 1.4s ease forwards;
}
@keyframes grow { to { width: var(--p); } }

/* ════════════════════════════════════════════ PROJECTS */
.proj-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 20px; perspective: 1200px;
}
.empty-note { color: var(--muted); font-size: .95rem; }

.proj-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transform-style: preserve-3d;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.proj-card:hover { border-color: rgba(170,90,255,.75); box-shadow: 0 22px 50px rgba(120,50,200,.3); }

.proj-thumb { position: relative; overflow: hidden; }
.proj-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .45s ease; }
.proj-card:hover .proj-thumb img { transform: scale(1.07); }

.proj-overlay {
  position: absolute; inset: 0;
  background: rgba(40,10,110,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.proj-card:hover .proj-overlay { opacity: 1; }

.proj-info { padding: 16px; }
.proj-info h3 { color: #fff; font-size: .95rem; margin-bottom: 6px; }
.proj-info p  { font-size: .86rem; margin-bottom: 0; }

.tech-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tech-chips span {
  font-size: .74rem;
  background: rgba(130,60,220,.22); border: 1px solid rgba(160,80,255,.38);
  border-radius: 999px; padding: 4px 10px; color: #d4b8ff;
}

/* ════════════════════════════════════════════ EXPERIENCE */
.timeline {
  border-left: 2px solid rgba(130,60,220,.4);
  margin-left: 14px; display: grid; gap: 0;
}
.exp-item { display: flex; position: relative; padding: 0 0 34px 36px; }
.exp-dot {
  position: absolute; left: -9px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--purple-lt); border: 3px solid var(--dark-2);
  box-shadow: 0 0 12px var(--purple-lt);
}
.exp-body {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; backdrop-filter: blur(8px);
}
.exp-body h3   { color: #fff; font-size: 1rem; margin: 8px 0 4px; }
.period {
  display: inline-block; font-size: .8rem;
  background: rgba(130,60,220,.22); border: 1px solid rgba(160,80,255,.3);
  border-radius: 999px; padding: 3px 11px; color: #c9a8ff; margin-bottom: 6px;
}
.company { font-weight: 600; color: var(--purple-lt); font-size: .9rem; margin-bottom: 8px; }

/* ════════════════════════════════════════════ EDUCATION */
.edu-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.edu-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 24px; backdrop-filter: blur(8px); transform-style: preserve-3d;
  transition: transform .25s ease, border-color .25s ease;
}
.edu-card:hover { border-color: rgba(160,80,255,.65); }
.edu-ico {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.edu-card h3 { color: #fff; font-size: .95rem; margin-bottom: 6px; }
.inst { font-weight: 600; color: var(--purple-lt); font-size: .88rem; margin-bottom: 4px; }

/* ════════════════════════════════════════════ CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 24px; align-items: start; }

.contact-info {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 28px; backdrop-filter: blur(10px);
}
.ci-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  color: var(--muted); font-size: .93rem;
}
.ci-row:last-of-type { border-bottom: none; }
.ci-row i {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(130,60,220,.22); color: var(--purple-lt); font-size: .95rem;
}
.ci-row a { color: var(--muted); transition: color .2s; }
.ci-row a:hover { color: #fff; }

.ci-socials { display: flex; gap: 10px; margin-top: 20px; }
.ci-socials a {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .98rem;
  transition: background .2s, color .2s, transform .2s;
}
.ci-socials a:hover { background: rgba(130,60,220,.38); color: #fff; transform: translateY(-3px); }

.contact-form {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 28px; backdrop-filter: blur(10px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0; }

.contact-form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: .88rem; font-weight: 600; color: #c8b8ff;
  margin-bottom: 14px;
}
.form-row label { margin-bottom: 14px; }

input, textarea {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px; color: #fff;
  padding: 11px 14px; font: inherit; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(150,80,255,.55);
  box-shadow: 0 0 0 3px rgba(150,80,255,.14);
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.28); }

.form-msg { min-height: 22px; font-size: .9rem; margin-top: 10px; }

/* ════════════════════════════════════════════ MODAL */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,3,15,.82); backdrop-filter: blur(10px);
  cursor: pointer;
}
.modal-box {
  position: relative; z-index: 1;
  width: min(840px, 94%);
  background: #120d28; border: 1px solid rgba(160,80,255,.3); border-radius: 20px;
  overflow: hidden; max-height: 92vh; overflow-y: auto;
}
.modal-box > img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: rgba(0,0,0,.25);
}
.modal-meta { padding: 24px; }
.modal-meta h3  { color: #fff; font-size: 1.25rem; margin-bottom: 10px; }
.modal-size {
  color: #c9b8ef;
  font-size: .84rem;
  margin-bottom: 10px;
}
.modal-meta p   { color: var(--muted); }
.modal-cta      { margin-top: 18px; display: inline-flex; }

.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); color: #fff;
  backdrop-filter: blur(4px); font-size: .92rem;
  display: flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════ FOOTER */
.site-footer {
  background: var(--dark-2); border-top: 1px solid rgba(255,255,255,.07);
  padding: 28px 0 36px; text-align: center; position: relative; z-index: 2;
}
.site-footer p       { font-size: .9rem; margin-bottom: 4px; }
.site-footer a:hover { color: var(--purple-lt); }

/* ════════════════════════════════════════════ REVEAL */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .72s ease, transform .72s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════ RESPONSIVE */
@media (max-width: 1100px) {
  .hero-circle { width: min(400px,56vmin); height: min(400px,56vmin); margin-left: min(-70px,-6vw); }
  .proj-grid, .skills-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 860px) {
  .menu-btn {
    display: flex;
    margin-left: auto;
  }

  .main-nav {
    position: absolute; top: 72px; right: 0; margin-right: 8px;
    background: rgba(10,6,28,.97); border: 1px solid var(--border); border-radius: 14px;
    min-width: 220px; padding: 14px; flex-direction: column; gap: 8px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
    margin-left: auto;
  }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-cta       { display: none; }

  .hero-body     { flex-direction: column; padding-top: 110px; align-items: flex-start; gap: 24px; }
  .hero-circle   { margin-left: auto; margin-right: auto; }
  .hero-text-col { padding: 0; margin-left: 0; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .hero-dots { right: 18px; }
  .social-rail { display: none; }
  .ring { display: none; }
  .dot-grid { right: 16px; }
}

@media (max-width: 600px) {
  .skills-grid, .proj-grid, .chip-grid, .edu-grid { grid-template-columns: 1fr; }
  .form-row  { grid-template-columns: 1fr; }
  .section   { padding: 72px 0; }
  .hero-h1   { font-size: clamp(1.85rem, 9vw, 2.6rem); }
  .btn       { width: 100%; justify-content: center; }
  .hero-stats { gap: 18px; }
  .hero-circle { width: 250px; height: 250px; }
}
