/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }

/* ============ Theme tokens ============ */
body.dark {
  --bg: #0B0B0F;
  --bg-alt: #101018;
  --card: #15151F;
  --fg: #F5F5F7;
  --muted: #8b8b95;
  --primary: #0A84FF;
  --primary-2: #5EB1FF;
  --border: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.04);
}
body.light {
  --bg: #F7F8FA;
  --bg-alt: #FFFFFF;
  --card: #FFFFFF;
  --fg: #0B0B0F;
  --muted: #5a5a66;
  --primary: #0A84FF;
  --primary-2: #5EB1FF;
  --border: rgba(0,0,0,0.08);
  --glass: rgba(255,255,255,0.6);
}

::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(10,132,255,.5); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============ Typography ============ */
h1, h2, h3, h4, h5 { font-family: 'Space Grotesk', sans-serif; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.8vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { color: var(--muted); }
.text-gradient {
  background: linear-gradient(135deg, var(--fg) 0%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============ Layout ============ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 3rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ============ Buttons & chips ============ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 30px -10px rgba(10,132,255,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(10,132,255,.8); }
.btn-ghost { background: var(--glass); color: var(--fg); border: 1px solid var(--border); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-light { background: #fff; color: #0B0B0F; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border); font-size: .85rem; margin-bottom: 1.5rem;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5);} 70%{box-shadow:0 0 0 10px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }

/* ============ Loader ============ */
.loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { font-family: 'Space Grotesk'; font-weight: 700; font-size: 2.5rem; color: var(--primary); margin-bottom: 1.2rem; text-align: center; }
.loader-bar { width: 200px; height: 3px; background: var(--border); border-radius: 4px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0%; background: var(--primary); animation: load 1.4s ease forwards; }
@keyframes load { to { width: 100%; } }

/* ============ Cursor ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  border-radius: 50%; transform: translate(-50%,-50%); mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; transition: transform .15s ease; }
.cursor-ring { width: 38px; height: 38px; border: 1.5px solid #fff; transition: transform .25s ease, width .25s, height .25s, border-color .25s; }
.cursor-ring.hover { width: 64px; height: 64px; border-color: var(--primary); }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ============ Progress bar ============ */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  z-index: 100; box-shadow: 0 0 12px var(--primary);
}

/* ============ Header ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: .9rem 0; transition: all .3s ease;
}
.glass-strong {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.4rem; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--muted); transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }
.nav-actions { display: flex; align-items: center; gap: .8rem; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--glass); border: 1px solid var(--border); transition: all .2s;
}
.icon-btn:hover { background: var(--primary); color: #fff; }
.mobile-only { display: none; }
.hide-mobile {}
@media (max-width: 800px) {
  .nav-links { position: fixed; top: 70px; right: 1rem; left: 1rem; flex-direction: column; padding: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 18px; transform: translateY(-20px); opacity: 0; pointer-events: none; transition: all .3s; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .mobile-only { display: inline-flex; }
  .hide-mobile { display: none; }
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  padding: 7rem 0 4rem; overflow: hidden;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
}
body.light .bg-grid { background-image: linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px); }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; z-index: 0;
  animation: blob 18s ease-in-out infinite;
}
.blob-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.blob-2 { width: 500px; height: 500px; background: #a855f7; bottom: -150px; right: -150px; animation-delay: -6s; }
@keyframes blob {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.1); }
  66% { transform: translate(-30px,20px) scale(.95); }
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } }
.hero-text .lead { font-size: 1.15rem; margin: 1.5rem 0 2rem; max-width: 560px; }
@media (max-width: 900px) { .hero-text .lead { margin-left: auto; margin-right: auto; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
@media (max-width: 900px) { .hero-actions { justify-content: center;} }
.stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
@media (max-width: 900px) { .stats { justify-content: center; } }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-family: 'Space Grotesk'; font-size: 2rem; color: var(--fg); }
.stats span { font-size: .85rem; color: var(--muted); }


.portrait-wrap { position: relative; max-width: 420px; margin: 0 auto; }
.portrait-wrap img { border-radius: 30px; border: 1px solid var(--border); aspect-ratio: 4/5; object-fit: cover; }
.portrait-glow { position: absolute; inset: -20px; background: radial-gradient(circle, rgba(10,132,255,.4), transparent 70%); filter: blur(40px); z-index: -1; }
.floating-card {
  position: absolute; background: var(--card); border: 1px solid var(--border);
  padding: .7rem 1.1rem; border-radius: 14px; font-size: .85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .5rem;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.4); backdrop-filter: blur(10px);
}
.floating-card i { color: var(--primary); }
.card-top { top: 30px; left: -30px; }
.card-bottom { bottom: 40px; right: -20px; }
.animate-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-15px); } }

.scroll-down {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-down span { width: 4px; height: 8px; background: var(--muted); border-radius: 2px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0%{ transform: translateY(0); opacity:1;} 100%{ transform: translateY(14px); opacity:0;} }

/* ============ About ============ */
.check-list { list-style: none; margin-top: 1.5rem; display: grid; gap: .7rem; }
.check-list i { color: var(--primary); margin-right: .6rem; }
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--border); display: grid; gap: 2rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.55rem; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--bg);
}
.t-year { font-family: 'Space Grotesk'; color: var(--primary); font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.timeline-item h4 { font-size: 1.1rem; margin-bottom: .3rem; }

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; }
@media (max-width: 700px) { .skills-grid { grid-template-columns: 1fr; } }
.skill .s-head { display: flex; justify-content: space-between; margin-bottom: .55rem; font-weight: 500; }
.skill .s-head i { color: var(--primary); margin-right: .5rem; }
.bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 999px; transition: width 1.5s cubic-bezier(.2,.8,.2,1); }

/* ============ Portfolio ============ */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.5rem; }
.filter { padding: .55rem 1.2rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--border); font-size: .9rem; transition: all .2s; }
.filter:hover, .filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects-grid { grid-template-columns: 1fr; } }
.project { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--border); }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.project:hover img { transform: scale(1.08); }
.project-overlay {
  position: absolute; inset: 0; padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent 70%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem;
  color: #fff; opacity: 0; transition: opacity .35s;
}
.project:hover .project-overlay { opacity: 1; }
.project-overlay p { color: rgba(255,255,255,.8); font-size: .85rem; margin-bottom: .5rem; }
.project-overlay .btn { align-self: flex-start; margin-top: .3rem; }
.project.hide { display: none; }

/* ============ Services ============ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }
.service {
  padding: 2rem; border-radius: 20px; background: var(--card); border: 1px solid var(--border);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.service:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 20px 40px -20px rgba(10,132,255,.4); }
.s-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(10,132,255,.2), rgba(168,85,247,.2));
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  color: var(--primary); margin-bottom: 1.2rem;
}
.service h3 { margin-bottom: .5rem; }

/* ============ Testimonials slider ============ */
.slider { max-width: 760px; margin: 0 auto; overflow: hidden; position: relative; }
.slides { display: flex; transition: transform .6s cubic-bezier(.5,0,.2,1); }
.slide {
  min-width: 100%; padding: 2.5rem; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
}
.slide p { font-size: 1.15rem; color: var(--fg); font-style: italic; margin-bottom: 1.5rem; }
.who { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.who img { width: 50px; height: 50px; border-radius: 50%; }
.who div { text-align: left; }
.who span { display: block; font-size: .8rem; color: var(--muted); }
.slider-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: all .2s; }
.slider-dots button.active { background: var(--primary); width: 24px; border-radius: 5px; }

/* ============ Contact ============ */
.contact-list { list-style: none; margin: 1.5rem 0; display: grid; gap: .75rem;  }
.contact-list i { color: var(--primary); margin-right: .7rem; }
.socials { display: flex; gap: .7rem; margin-top: 1rem; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; background: var(--glass);
  border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.socials a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }
.contact-form { background: var(--card); border: 1px solid var(--border); padding: 2rem; border-radius: 20px; display: grid; gap: 1rem; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .contact-form .row { grid-template-columns: 1fr; } }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .9rem 1rem; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border); color: var(--fg);
  transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }

/* ============ Footer ============ */
.footer { padding: 4rem 0 2rem; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-family: 'Space Grotesk'; margin-bottom: 1rem; font-size: 1rem; }
.footer a { display: block; color: var(--muted); padding: .25rem 0; transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer .socials { margin-top: 0; }
.footer .socials a { padding: 0; }
.copyright { text-align: center; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.map { width: 100%;}


/* ============ Floating WhatsApp & Back top ============ */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 80;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  box-shadow: 0 12px 28px -10px rgba(37,211,102,.6); transition: transform .25s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.back-top {
  position: fixed; bottom: 1.5rem; right: 5.5rem; z-index: 80;
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all .3s; transform: translateY(20px);
  box-shadow: 0 12px 28px -10px rgba(10,132,255,.7);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ============ Modal ============ */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 1.5rem;
}
.modal.open { display: flex; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 2rem; max-width: 420px; width: 100%; position: relative; display: grid; gap: 1rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; font-size: 1.6rem; color: var(--muted);
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.modal-close:hover { background: var(--glass); color: var(--fg); }
.modal-card input {
  padding: .85rem 1rem; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--border); color: var(--fg);
}
.modal-card input:focus { outline: none; border-color: var(--primary); }
.modal-msg { font-size: .9rem; }
.modal-msg.error { color: #ef4444; }
.modal-msg.success { color: #22c55e; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
