/* ============================================================
   style.css — Lazuardy Portfolio (Final Optimized v3)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #060612;
  --bg2:         #08081a;
  --surface:     #0c0c1e;
  --surface2:    #111128;
  --surface3:    #161630;
  --border:      rgba(255,255,255,0.06);
  --border2:     rgba(255,255,255,0.12);
  --border3:     rgba(255,255,255,0.18);
  --text:        #e2e8f0;
  --text2:       #cbd5e1;
  --muted:       #64748b;
  --muted2:      #475569;
  --primary:      #6366f1;
  --primary2:     #818cf8;
  --primary3:     #a5b4fc;
  --purple:       #8b5cf6;
  --cyan:         #06b6d4;
  --pink:         #ec4899;
  --grad:         linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --grad2:        linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --grad-text:    linear-gradient(90deg, #a5b4fc 0%, #c084fc 50%, #818cf8 100%);
  --grad-hero:    linear-gradient(160deg, #ffffff 0%, #e0e7ff 30%, #c7d2fe 55%, #a5b4fc 75%, #818cf8 90%, #6366f1 100%);
  --glow:         rgba(99,102,241,0.35);
  --glow2:        rgba(139,92,246,0.25);
  --r:            16px;
  --r2:           20px;
  --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display { font-family: 'Syne', sans-serif !important; }
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; transition: all 0.3s var(--ease); }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--purple));
  border-radius: 10px;
}

/* ---- SELECTION ---- */
::selection { background: rgba(99,102,241,.35); color: #fff; }

/* ---- NOISE OVERLAY ---- */
.noise-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px; mix-blend-mode: overlay; opacity: .6;
}

/* ---- CUSTOM CURSOR ---- */
#cursor-dot, #cursor-ring {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); will-change: left, top;
}
#cursor-dot {
  width: 6px; height: 6px; background: var(--primary3);
  box-shadow: 0 0 15px var(--primary);
  transition: width .2s var(--spring), height .2s var(--spring), background .2s;
}
#cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid rgba(99,102,241,.3);
  transition: width .25s var(--spring), height .25s var(--spring), border-color .25s;
}
@media (pointer: coarse) { #cursor-dot, #cursor-ring { display: none; } }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  background: transparent;
  transition: background .45s var(--ease), transform .4s var(--ease), border-color .4s, box-shadow .4s;
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgba(6,6,18, .85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 40px rgba(0,0,0,.4);
}
#site-header.hide { transform: translateY(-100%); }

.logo-text {
  font-family: 'Syne', sans-serif;
  background: var(--grad-text);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradMove 5s linear infinite;
}

.nav-link {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .03em;
  position: relative;
  transition: color .25s;
  padding-bottom: 4px;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 0; height: 1.5px; background: var(--grad);
  transition: width .3s var(--ease), left .3s var(--ease);
  border-radius: 2px;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; left: 0; }

.lang-btn {
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--muted); letter-spacing: .08em;
  transition: border-color .25s, color .25s, background .25s;
}
.lang-btn:hover { border-color: var(--primary); color: #fff; background: rgba(99,102,241,.1); }

.cta-pill {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
  transition: transform .3s var(--spring), box-shadow .3s;
  position: relative; overflow: hidden;
}
.cta-pill:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 35px rgba(99,102,241,.5); }
.cta-pill .arrow-icon { transition: transform .25s; display: inline-block; }
.cta-pill:hover .arrow-icon { transform: translateX(4px); }

/* ============================================================
   HERO
   ============================================================ */
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 10%, transparent 100%);
}

.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: 0.5;
}
.hero-orb-1 {
  width: 600px; height: 600px; top: -150px; left: -120px;
  background: radial-gradient(circle, rgba(99,102,241,.22) 0%, transparent 70%);
  animation: orbFloat 14s ease-in-out infinite;
}
.hero-orb-2 {
  width: 450px; height: 450px; bottom: -50px; right: -100px;
  background: radial-gradient(circle, rgba(139,92,246,.18) 0%, transparent 70%);
  animation: orbFloat 18s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 350px; height: 350px; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6,182,212,.1) 0%, transparent 70%);
  animation: orbPulse 10s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -30px) scale(1.04); }
  66% { transform: translate(-15px, 20px) scale(0.97); }
}
@keyframes orbPulse {
  0%, 100% { opacity:.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity:.9;  transform: translate(-50%, -50%) scale(1.2); }
}

.hero-badge {
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.25);
  color: var(--primary3); letter-spacing: .12em;
}
.status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
  animation: pulseDot 2.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
  50% { box-shadow: 0 0 0 7px rgba(34,197,94,.06); }
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 12vw, 10.5rem);
  line-height: .86; letter-spacing: -.04em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-italic { font-style: italic; color: var(--primary2); }

.reveal-line {
  display: inline-block;
  animation: revealUp 1s var(--ease) forwards;
  transform: translateY(115%);
}
.delay-1 { animation-delay: .15s; }

@keyframes revealUp {
  from { transform: translateY(115%) skewY(3deg); opacity: 0; }
  to { transform: translateY(0) skewY(0deg); opacity: 1; }
}

.hero-stats {
  background: rgba(12,12,30,.7);
  border: 1px solid var(--border);
  border-radius: var(--r);
  backdrop-filter: blur(16px);
}
.stat-item {
  border-right: 1px solid var(--border);
  transition: background .3s;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Syne', sans-serif;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.scroll-line {
  width: 1px; height: 52px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1) translateY(0); opacity: .4; }
  50% { transform: scaleY(.65) translateY(8px); opacity: 1; }
}

.cta-primary {
  background: var(--grad); color: #fff !important;
  box-shadow: 0 4px 25px rgba(99,102,241,.35);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px rgba(99,102,241,.55);
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-bg-accent {
  position: absolute; top: 50%; width: 600px; height: 600px;
  border-radius: 50%; pointer-events: none;
  filter: blur(150px);
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
}
.section-bg-left  { left: -200px;  transform: translateY(-50%); }
.section-bg-right { right: -200px; transform: translateY(-50%); }

.section-eyebrow {
  font-size: .75rem; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--primary2);
  display: flex; align-items: center; gap: 10px;
}
.section-eyebrow::before {
  content: ''; width: 20px; height: 2px; background: var(--grad);
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; letter-spacing: -.03em;
  line-height: 1.1; /* Fix for cutting off text */
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   CARDS
   ============================================================ */
.service-card, .project-card, .cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  transition: all 0.4s var(--ease);
}

.service-card:hover, .project-card:hover, .cert-card:hover {
  border-color: rgba(99,102,241,.35);
  transform: translateY(-10px);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

.service-icon-wrap {
  width: 52px; height: 52px;
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary2); transition: all .4s var(--spring);
}
.service-card:hover .service-icon-wrap {
  background: var(--grad); color: #fff; transform: scale(1.1) rotate(-5deg);
}

.project-overlay, .cert-overlay {
  position: absolute; inset: 0;
  background: rgba(5,5,18,.8);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.project-card:hover .project-overlay, .cert-card:hover .cert-overlay {
  opacity: 1; pointer-events: all;
}

.view-full-btn, .project-overlay-btn {
  background: var(--grad); color: #fff !important;
  padding: 10px 24px; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
  transform: translateY(15px); transition: all 0.4s var(--spring);
}
.project-card:hover .project-overlay-btn, .cert-card:hover .view-full-btn {
  transform: translateY(0);
}

/* ============================================================
   SKILLS GRID
   ============================================================ */
.skill-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1/1; transition: all 0.3s var(--spring);
}
.skill-card:hover {
  background: rgba(99,102,241, 0.1);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 28px; transition: all .35s var(--ease);
}
.testi-card:hover {
  border-color: rgba(99,102,241,.25);
  transform: translateY(-5px);
}

/* ============================================================
   CONTACT
   ============================================================ */
.form-input {
  width: 100%; background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px; color: var(--text);
  padding: 12px 16px; transition: all .25s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241, 0.15);
  background: rgba(255,255,255,0.08);
  outline: none;
}

/* ============================================================
   MODALS & UI
   ============================================================ */
.message-modal {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 24px);
  z-index: 10000; padding: 16px 22px; border-radius: 14px;
  opacity: 0; pointer-events: none; transition: all .45s var(--spring);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.message-modal.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.cert-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.95); backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all .35s var(--ease);
}
.cert-modal-overlay.open { opacity: 1; pointer-events: auto; }

.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); transition: all .35s var(--spring);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary); color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-name { line-height: 1; }
  .section-title { font-size: 2.5rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 10px; }
  .message-modal { width: calc(100% - 32px); }
}

@keyframes gradMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}