/* ──────────────────────────────────────────
   RESET & BASE
────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #09090f;
  --bg2:       #0f0f1a;
  --bg3:       #141422;
  --surface:   #1a1a2e;
  --border:    rgba(255,255,255,0.07);
  --text:      #e8e8f0;
  --muted:     #8888aa;
  --accent:    #6c63ff;
  --accent2:   #a78bfa;
  --accent3:   #38bdf8;
  --grad:      linear-gradient(135deg, #6c63ff, #a78bfa);
  --grad2:     linear-gradient(135deg, #38bdf8, #6c63ff);
  --radius:    16px;
  --nav-h:     70px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ──────────────────────────────────────────
   CURSOR GLOW
────────────────────────────────────────── */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: left .12s ease, top .12s ease;
}

/* ──────────────────────────────────────────
   NAV
────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  z-index: 100;
  transition: background .3s, backdrop-filter .3s, border-bottom .3s;
}
#navbar.scrolled {
  background: rgba(9,9,15,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1.4rem; font-weight: 800; letter-spacing: 2px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2rem; list-style: none;
}
.nav-links a {
  font-size: .95rem; font-weight: 500; color: var(--muted);
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--grad);
  transition: width .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: .5rem 1.2rem !important;
  background: var(--grad);
  border-radius: 999px;
  color: #fff !important;
  font-weight: 600 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: .85; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 26px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .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); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(9,9,15,.97);
    backdrop-filter: blur(20px);
    padding: 1rem 0 2rem;
    transform: translateY(-110%);
    transition: transform .35s ease;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: .9rem 0; font-size: 1.1rem; }
}

/* ──────────────────────────────────────────
   HERO
────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: var(--nav-h) 5% 0;
}

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  background: rgba(108,99,255,.2);
  top: -100px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: rgba(56,189,248,.15);
  bottom: -80px; right: -80px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px, -30px) scale(1.05); }
}

.hero-particles {
  position: absolute; inset: 0; pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem 1rem;
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.35);
  border-radius: 999px;
  font-size: .85rem; color: var(--accent2);
  animation: fadeInDown .6s ease both;
}

.hero-name {
  display: flex; flex-direction: column;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  animation: fadeInUp .7s ease both;
}
.firstname { color: var(--text); }
.lastname {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 500; color: var(--accent3);
  min-height: 2rem;
  animation: fadeInUp .8s ease both;
}
.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-sub {
  color: var(--muted); font-size: 1rem;
  max-width: 420px;
  animation: fadeInUp .9s ease both;
}

.hero-btns {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  margin-top: .5rem;
  animation: fadeInUp 1s ease both;
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.8rem;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all .25s;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 0 30px rgba(108,99,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(108,99,255,.55); }
.btn-ghost {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-dot {
  width: 24px; height: 40px;
  border: 2px solid var(--border);
  border-radius: 999px;
  position: relative;
}
.scroll-dot::after {
  content: ''; position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 999px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%      { transform: translateX(-50%) translateY(14px); opacity: 0; }
}

/* ──────────────────────────────────────────
   SHARED SECTION STYLES
────────────────────────────────────────── */
section { padding: 7rem 0; position: relative; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
.section-label {
  font-size: .8rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; margin-bottom: 3rem;
  line-height: 1.15;
}

/* ──────────────────────────────────────────
   ABOUT
────────────────────────────────────────── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem; align-items: center;
}
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

.about-card-visual {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}

.avatar-wrap {
  position: relative; width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.avatar-ring {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--grad);
  padding: 3px;
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-letter {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

.avatar-float-badge {
  position: absolute;
  padding: .35rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  color: var(--accent2);
  animation: floatBadge 3s ease-in-out infinite;
  animation-delay: var(--delay);
}
.avatar-float-badge:nth-child(2) { top: 0;   left: -10px; }
.avatar-float-badge:nth-child(3) { top: 0;   right: -10px; }
.avatar-float-badge:nth-child(4) { bottom: 20px; left: -20px; }
.avatar-float-badge:nth-child(5) { bottom: 20px; right: -20px; }
@keyframes floatBadge { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.about-facts {
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
}
.fact-chip {
  padding: .4rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .82rem; color: var(--muted);
}

.about-text-area p { color: var(--muted); margin-bottom: 1rem; }
.about-text-area strong { color: var(--text); }

.about-stats {
  display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap;
}
.stat-box {
  display: flex; flex-direction: column;
}
.stat-val {
  font-size: 2rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-box span { color: var(--accent2); font-weight: 700; }
.stat-box p { color: var(--muted); font-size: .85rem; }

/* ──────────────────────────────────────────
   SKILLS
────────────────────────────────────────── */
#skills { background: var(--bg); }

.skills-container {
  display: flex; flex-direction: column; gap: 2.5rem;
}
.skill-group-title {
  font-size: .9rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 1rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: .7rem; }

.pill {
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  cursor: default; transition: all .25s;
}
.pill-primary {
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.35);
  color: var(--accent2);
}
.pill-primary:hover { background: rgba(108,99,255,.3); transform: translateY(-2px); }
.pill-secondary {
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.3);
  color: var(--accent3);
}
.pill-secondary:hover { background: rgba(56,189,248,.2); transform: translateY(-2px); }
.pill-accent {
  background: rgba(167,139,250,.1);
  border: 1px solid rgba(167,139,250,.3);
  color: #c4b5fd;
}
.pill-accent:hover { background: rgba(167,139,250,.2); transform: translateY(-2px); }
.pill-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.pill-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* ──────────────────────────────────────────
   PROJECTS
────────────────────────────────────────── */
#projects { background: var(--bg2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  cursor: pointer;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem;
}
.project-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad);
  opacity: 0; transition: opacity .3s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108,99,255,.5);
  box-shadow: 0 20px 60px rgba(108,99,255,.15);
}
.project-card:hover::before { opacity: .04; }

.project-card-more {
  border-style: dashed;
  border-color: rgba(108,99,255,.3);
  background: rgba(108,99,255,.04);
}

.project-header {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.project-icon { font-size: 2rem; }
.project-arrow {
  color: var(--muted); font-size: 1.2rem;
  transition: transform .3s, color .3s;
}
.project-card:hover .project-arrow { transform: translate(4px, -4px); color: var(--accent2); }

.project-card h3 { font-size: 1.1rem; font-weight: 700; }
.project-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; flex: 1; }

.project-tags {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: auto;
}
.project-tags span {
  font-size: .75rem; font-weight: 600; padding: .25rem .7rem;
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.25);
  border-radius: 999px; color: var(--accent2);
}

/* ──────────────────────────────────────────
   CONTACT
────────────────────────────────────────── */
#contact { background: var(--bg); text-align: center; }
.contact-desc { color: var(--muted); max-width: 480px; margin: 0 auto 3rem; }

.contact-links {
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center;
}
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 2rem;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  min-width: 220px;
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108,99,255,.5);
  box-shadow: 0 12px 40px rgba(108,99,255,.15);
}
.contact-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(108,99,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--accent);
  flex-shrink: 0;
}
.contact-card small { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.contact-card p { font-size: .95rem; font-weight: 600; margin: 0; }

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 5%;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.footer-name { font-weight: 700; font-size: 1rem; }
.footer-copy { color: var(--muted); font-size: .85rem; }
.footer-links {
  display: flex; gap: 1.5rem; margin-top: .5rem;
}
.footer-links a {
  color: var(--muted); font-size: .85rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent2); }

/* ──────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
