/* ===== Variables ===== */
:root{
  --bg-primary:#0a0a0a;
  --bg-secondary:#111111;
  --bg-card:rgba(255,255,255,0.04);
  --bg-card-hover:rgba(255,255,255,0.07);
  --accent:#4F8EF7;
  --accent-glow:rgba(79,142,247,0.15);
  --accent-secondary:#7C5CFC;
  --text-primary:#F2F2F2;
  --text-secondary:#9A9A9A;
  --text-muted:#555555;
  --border:rgba(255,255,255,0.08);
  --border-accent:rgba(79,142,247,0.3);
  --font-head:'Space Grotesk',sans-serif;
  --font-body:'Inter',sans-serif;
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg-primary);
  color:var(--text-primary);
  font-family:var(--font-body);
  line-height:1.6;
  overflow-x:hidden;
  cursor:default;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;}
.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 clamp(1.5rem,5vw,4rem);
}

h1,h2,h3{font-family:var(--font-head);font-weight:700;letter-spacing:-0.01em;}
h1{font-size:clamp(2.5rem,6vw,5rem);line-height:1.1;}
h2{font-size:clamp(1.8rem,4vw,3rem);line-height:1.15;}
p{font-size:clamp(0.95rem,1.5vw,1.1rem);color:var(--text-secondary);}

.gradient-text{
  background:linear-gradient(135deg,#4F8EF7,#7C5CFC);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
}

.badge{
  display:inline-block;
  font-size:0.8rem;
  font-weight:600;
  letter-spacing:0.04em;
  color:var(--accent);
  background:var(--accent-glow);
  border:1px solid var(--border-accent);
  padding:0.4rem 0.9rem;
  border-radius:999px;
  margin-bottom:1.2rem;
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.85rem 1.6rem;
  border-radius:10px;
  font-weight:600;
  font-size:0.95rem;
  transition:all .25s ease;
  border:1px solid transparent;
}
.btn-primary{
  background:linear-gradient(135deg,#4F8EF7,#7C5CFC);
  color:#fff;
}
.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px var(--accent-glow);
}
.btn-ghost{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-primary);
}
.btn-ghost:hover{
  border-color:var(--border-accent);
  background:var(--bg-card-hover);
  transform:translateY(-2px);
}

/* ===== Loader ===== */
#loader{
  position:fixed;inset:0;
  background:var(--bg-primary);
  display:flex;align-items:center;justify-content:center;
  z-index:9999;
  transition:opacity .6s ease;
}
#loader.hide{opacity:0;pointer-events:none;}
.loader-logo{
  font-family:var(--font-head);
  font-size:3rem;font-weight:700;
  background:linear-gradient(135deg,#4F8EF7,#7C5CFC);
  background-size:200% 200%;
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
  animation:gradientShift 1.5s ease infinite;
}
@keyframes gradientShift{
  0%{background-position:0% 50%;}
  50%{background-position:100% 50%;}
  100%{background-position:0% 50%;}
}

/* ===== Custom cursor ===== */
.cursor-dot,.cursor-ring{
  position:fixed;
  top:0;left:0;
  border-radius:50%;
  pointer-events:none;
  z-index:9998;
  transform:translate(-50%,-50%);
}
.cursor-dot{
  width:8px;height:8px;
  background:var(--accent);
}
.cursor-ring{
  width:36px;height:36px;
  border:1px solid var(--text-primary);
  mix-blend-mode:difference;
  transition:width .2s,height .2s;
}
.cursor-ring.hover,.cursor-dot.hover{
  width:60px;height:60px;
}
@media (max-width:768px), (hover:none){
  .cursor-dot,.cursor-ring{display:none;}
}

/* ===== Scroll progress ===== */
.scroll-progress{
  position:fixed;
  top:0;left:0;
  height:3px;
  width:0%;
  background:var(--accent);
  z-index:10000;
  transition:width .1s ease-out;
}

/* ===== Navbar ===== */
.navbar{
  position:fixed;
  top:0;left:0;right:0;
  z-index:1000;
  padding:1.2rem 0;
  transition:background .3s ease, backdrop-filter .3s ease, padding .3s ease;
}
.navbar.scrolled{
  background:rgba(10,10,10,0.8);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  padding:0.8rem 0;
  border-bottom:1px solid var(--border);
}
.navbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo{
  font-family:var(--font-head);
  font-weight:700;
  font-size:1.4rem;
  background:linear-gradient(135deg,#4F8EF7,#7C5CFC);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
}
.nav-links{
  display:flex;
  gap:2rem;
}
.nav-links a{
  font-size:0.95rem;
  font-weight:500;
  color:var(--text-secondary);
  position:relative;
  transition:color .2s ease;
}
.nav-links a:hover,.nav-links a.active{
  color:var(--accent);
}
.nav-links a.active::after{
  content:'';
  position:absolute;
  bottom:-6px;left:0;
  width:100%;height:2px;
  background:var(--accent);
}
.hamburger{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none;border:none;cursor:pointer;
  padding:0.4rem;
}
.hamburger span{
  width:24px;height:2px;
  background:var(--text-primary);
  transition:all .3s ease;
}
.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);}

@media (max-width:768px){
  .nav-links{
    position:fixed;
    top:64px;right:0;
    flex-direction:column;
    background:rgba(10,10,10,0.97);
    backdrop-filter:blur(20px);
    width:100%;
    padding:2rem clamp(1.5rem,5vw,4rem);
    gap:1.5rem;
    border-bottom:1px solid var(--border);
    transform:translateY(-150%);
    opacity:0;
    transition:transform .35s ease, opacity .35s ease;
  }
  .nav-links.open{
    transform:translateY(0);
    opacity:1;
  }
  .hamburger{display:flex;}
}

/* ===== Hero ===== */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  align-items:center;
  padding-top:6rem;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  background:radial-gradient(ellipse at 60% 0%, rgba(79,142,247,0.12) 0%, transparent 60%);
  pointer-events:none;
}
.hero-dots{
  position:absolute;
  inset:0;
  background-image:radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size:28px 28px;
  pointer-events:none;
  mask-image:linear-gradient(to bottom, black, transparent 90%);
}
.hero-inner{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1.2fr 0.8fr;
  align-items:center;
  gap:3rem;
}
.hero-sub{
  margin:1.2rem 0 1.8rem;
  max-width:520px;
}
.hero-ctas{
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
}
.fade-seq{
  opacity:0;
  transform:translateY(20px);
  animation:fadeUp .7s ease forwards;
  animation-delay:var(--d,0ms);
}
@keyframes fadeUp{
  to{opacity:1;transform:translateY(0);}
}
.hero-photo{
  display:flex;
  justify-content:center;
}
.slide-in-right{
  opacity:0;
  transform:translateX(40px);
  animation:slideInRight .8s ease forwards;
  animation-delay:200ms;
}
@keyframes slideInRight{
  to{opacity:1;transform:translateX(0);}
}
.photo-ring{
  width:280px;height:280px;
  border-radius:50%;
  border:2px solid transparent;
  background:linear-gradient(#0a0a0a,#0a0a0a) padding-box, linear-gradient(135deg,#4F8EF7,#7C5CFC) border-box;
  overflow:hidden;
  position:relative;
  animation:ringSpin 8s linear infinite;
}
@keyframes ringSpin{
  0%{background:linear-gradient(0deg,#0a0a0a,#0a0a0a) padding-box, linear-gradient(135deg,#4F8EF7,#7C5CFC) border-box;}
  100%{background:linear-gradient(360deg,#0a0a0a,#0a0a0a) padding-box, linear-gradient(495deg,#4F8EF7,#7C5CFC) border-box;}
}
.photo-ring img{
  width:100%;height:100%;
  object-fit:cover;
  border-radius:50%;
}
.photo-placeholder{
  display:none;
  width:100%;height:100%;
  align-items:center;justify-content:center;
  font-family:var(--font-head);
  font-size:4rem;font-weight:700;
  background:linear-gradient(135deg, rgba(79,142,247,0.15), rgba(124,92,252,0.15));
  position:absolute;inset:0;
  border-radius:50%;
}
.photo-placeholder{
  background-clip:text;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
  background-image:linear-gradient(135deg,#4F8EF7,#7C5CFC), radial-gradient(circle, rgba(255,255,255,0.04), rgba(255,255,255,0.04));
}

/* ===== Sections ===== */
.section{
  padding:clamp(4rem,8vw,7rem) 0;
}
.section-alt{
  background:var(--bg-secondary);
}
.section-head{
  text-align:center;
  max-width:650px;
  margin:0 auto 3rem;
}
.section-sub{
  margin-top:0.8rem;
  color:var(--text-secondary);
}

/* ===== Reveal animation ===== */
.reveal{
  opacity:0;
  transform:translateY(30px);
  transition:opacity .6s ease-out, transform .6s ease-out;
  transition-delay:var(--d,0ms);
}
.reveal.in-view{
  opacity:1;
  transform:translateY(0);
}

/* ===== About ===== */
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3rem;
  align-items:start;
}
.about-text p{
  margin-bottom:1rem;
}
.timeline{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  margin-top:1.5rem;
  padding-top:1.5rem;
  border-top:1px solid var(--border);
}
.timeline li{
  display:flex;
  align-items:center;
  gap:0.5rem;
  font-size:0.85rem;
  color:var(--text-secondary);
  background:var(--bg-card);
  border:1px solid var(--border);
  padding:0.5rem 0.9rem;
  border-radius:999px;
}
.timeline strong{color:var(--text-primary);}
#map{
  width:100%;
  height:350px;
  border-radius:16px;
  filter:brightness(0.85) contrast(1.1);
  border:1px solid var(--border);
}
.languages{
  display:flex;
  gap:0.8rem;
  margin-top:1.2rem;
  flex-wrap:wrap;
}
.lang-badge{
  font-size:0.85rem;
  font-weight:600;
  color:var(--text-primary);
  background:var(--bg-card);
  border:1px solid var(--border);
  padding:0.5rem 1rem;
  border-radius:999px;
}
.lang-badge small{
  font-weight:400;
  color:var(--text-secondary);
  margin-left:0.4rem;
}

/* ===== Experience ===== */
.exp-list{
  display:flex;
  flex-direction:column;
  gap:1.5rem;
  margin-bottom:3rem;
}
.exp-item{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:16px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  padding:2rem;
}
.exp-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  flex-wrap:wrap;
  gap:0.5rem;
}
.exp-head h3{font-size:1.3rem;}
.exp-period{
  font-size:0.85rem;
  color:var(--accent);
  font-weight:600;
}
.exp-company{
  display:block;
  color:var(--text-secondary);
  font-size:0.95rem;
  margin:0.2rem 0 1.2rem;
}
.tools-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:2rem;
}
.tools-col h4{
  font-family:var(--font-head);
  font-size:1rem;
  margin-bottom:1rem;
  color:var(--text-primary);
}
.tool-bar{
  margin-bottom:0.9rem;
}
.tool-bar span{
  display:block;
  font-size:0.8rem;
  color:var(--text-secondary);
  margin-bottom:0.3rem;
}
.tool-bar .bar{
  height:6px;
  background:var(--bg-card);
  border-radius:999px;
  overflow:hidden;
}
.tool-bar .bar div{
  height:100%;
  background:linear-gradient(90deg,#4F8EF7,#7C5CFC);
  border-radius:999px;
}
.pulse-marker{
  width:14px;height:14px;
  background:var(--accent);
  border-radius:50%;
  box-shadow:0 0 0 0 rgba(79,142,247,0.7);
  animation:pulseMarker 2s infinite;
}
@keyframes pulseMarker{
  0%{box-shadow:0 0 0 0 rgba(79,142,247,0.6);}
  70%{box-shadow:0 0 0 12px rgba(79,142,247,0);}
  100%{box-shadow:0 0 0 0 rgba(79,142,247,0);}
}

/* ===== Why marketing ===== */
.why-content{
  max-width:720px;
  margin:0 auto;
}
.why-content p{margin-bottom:1rem;}
.pull-quote{
  text-align:center;
  font-family:var(--font-head);
  font-size:clamp(1.6rem,3.5vw,2.6rem);
  font-weight:700;
  max-width:780px;
  margin:3rem auto 0;
  line-height:1.3;
}

/* ===== Skills ===== */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1.5rem;
}
.card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:16px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  padding:2rem;
  transition:transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.card:hover{
  transform:translateY(-4px);
  border-color:var(--border-accent);
  background:var(--bg-card-hover);
  box-shadow:0 20px 40px -20px var(--accent-glow);
}
.skill-icon{
  font-size:1.8rem;
  color:var(--accent);
  margin-bottom:1.2rem;
}
.skill-card h3{
  font-size:1.2rem;
  margin-bottom:0.6rem;
}
.skill-card p{
  font-size:0.95rem;
}

/* ===== Projects ===== */
.project-card{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2.5rem;
  align-items:center;
  margin-bottom:4rem;
}
.project-card:last-child{margin-bottom:0;}
.project-reverse .project-content{order:1;}
.project-reverse .project-visual{order:2;}
.project-mockup{
  width:100%;
  height:280px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-family:var(--font-head);
  font-weight:700;
  font-size:1.4rem;
  color:#fff;
  border:1px solid var(--border);
  padding:1.5rem;
}
.mockup-1{background:linear-gradient(135deg, rgba(79,142,247,0.25), rgba(124,92,252,0.15));}
.mockup-2{background:linear-gradient(135deg, rgba(124,92,252,0.25), rgba(79,142,247,0.15));}
.project-content h3{
  margin:0.8rem 0 0.4rem;
}
.project-url{
  display:inline-block;
  color:var(--accent);
  font-size:0.9rem;
  margin-bottom:1rem;
}
.project-content p{margin-bottom:1.2rem;}
.check-list{margin-bottom:1.5rem;}
.check-list li{
  display:flex;
  align-items:flex-start;
  gap:0.6rem;
  margin-bottom:0.6rem;
  font-size:0.95rem;
  color:var(--text-secondary);
}
.check-list i{
  color:var(--accent);
  margin-top:0.2rem;
}
.metric-highlight{
  font-size:0.95rem;
  color:var(--text-secondary);
  margin-bottom:1.5rem;
}
.metric-number{
  font-family:var(--font-head);
  font-size:2.2rem;
  font-weight:700;
  margin-right:0.4rem;
}

/* ===== Testimonials ===== */
.testimonials-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1.5rem;
}
.testimonial-head{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-bottom:1rem;
}
.avatar{
  width:48px;height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;justify-content:center;
  font-weight:700;
  color:#fff;
  flex-shrink:0;
}
.testimonial-head strong{display:block;font-size:1rem;}
.testimonial-role{
  font-size:0.8rem;
  color:var(--text-secondary);
}
.stars{margin-bottom:0.8rem;font-size:0.85rem;}
.testimonial-text{
  font-size:0.95rem;
  margin-bottom:1.2rem;
  font-style:italic;
}
.testimonial-linkedin{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  color:var(--accent);
  font-size:0.9rem;
  font-weight:600;
}
.testimonials-note{
  text-align:center;
  margin-top:2rem;
  font-size:0.85rem;
  color:var(--text-muted);
}

/* ===== Extra grid ===== */
.extra-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1.5rem;
}
.extra-icon{
  font-size:2.2rem;
  margin-bottom:1.2rem;
  display:block;
}
.extra-card h3{
  margin-bottom:0.6rem;
  font-size:1.15rem;
}
.extra-card p{font-size:0.92rem;}

/* ===== Contact ===== */
.contact-card{
  max-width:700px;
  margin:0 auto;
  text-align:center;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:24px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  padding:clamp(2.5rem,6vw,4rem);
  box-shadow:0 0 80px -20px var(--accent-glow);
}
.contact-card h2{margin-bottom:0.8rem;}
.contact-items{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  margin:2rem 0;
}
.contact-item{
  display:flex;
  align-items:center;
  gap:0.6rem;
  font-size:1rem;
  color:var(--text-primary);
  transition:color .2s ease;
}
.contact-item i{color:var(--accent);}
.contact-item:hover{color:var(--accent);}
.contact-linkedin{margin-top:0.5rem;}
.contact-note{
  color:var(--text-secondary);
  font-size:0.95rem;
}

/* ===== Footer ===== */
.footer{
  background:var(--bg-primary);
  border-top:1px solid var(--border);
  padding:2rem 0;
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.5rem;
  flex-wrap:wrap;
}
.footer-left{
  display:flex;
  align-items:center;
  gap:0.8rem;
  font-size:0.9rem;
  color:var(--text-secondary);
}
.footer-links{
  display:flex;
  gap:1.5rem;
  font-size:0.85rem;
  color:var(--text-secondary);
}
.footer-links a:hover{color:var(--accent);}
.footer-right{
  font-size:0.85rem;
  color:var(--text-muted);
}

/* ===== Back to top ===== */
.back-to-top{
  position:fixed;
  bottom:2rem;right:2rem;
  width:48px;height:48px;
  border-radius:50%;
  background:linear-gradient(135deg,#4F8EF7,#7C5CFC);
  color:#fff;
  border:none;
  display:flex;
  align-items:center;justify-content:center;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .3s ease, transform .3s ease;
  z-index:500;
  box-shadow:0 10px 30px var(--accent-glow);
}
.back-to-top.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

/* ===== Leaflet popup theming ===== */
.leaflet-popup-content-wrapper{
  background:var(--bg-secondary);
  color:var(--text-primary);
  border-radius:10px;
  border:1px solid var(--border);
}
.leaflet-popup-tip{background:var(--bg-secondary);}
.leaflet-container a.leaflet-popup-close-button{color:var(--text-secondary);}

/* ===== Responsive ===== */
@media (max-width:768px){
  .hero-inner{
    grid-template-columns:1fr;
    text-align:center;
  }
  .hero-ctas{justify-content:center;}
  .hero-photo{order:-1;margin-bottom:1rem;}
  .photo-ring{width:200px;height:200px;}
  .photo-placeholder{font-size:2.8rem;}
  .about-grid{grid-template-columns:1fr;}
  #map{height:250px;}
  .skills-grid{grid-template-columns:repeat(2,1fr);}
  .project-card,.project-reverse .project-content,.project-reverse .project-visual{
    grid-template-columns:1fr;
    order:initial;
  }
  .project-card{grid-template-columns:1fr;}
  .testimonials-grid{grid-template-columns:1fr;}
  .extra-grid{grid-template-columns:1fr;}
  .footer-inner{flex-direction:column;text-align:center;}
  .tools-grid{grid-template-columns:repeat(2,1fr);}
  .exp-head{flex-direction:column;}
}
@media (max-width:480px){
  .skills-grid{grid-template-columns:1fr;}
  .timeline{flex-direction:column;align-items:flex-start;}
}
