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

:root {
  --bg:       #0a0a0f;
  --bg2:      #111118;
  --bg3:      #17171f;
  --border:   rgba(255,255,255,0.07);
  --text:     #e8e8f0;
  --muted:    #8888a0;
  --accent:   #7c5cfc;
  --accent2:  #5ce0e6;
  --grad:     linear-gradient(135deg, #7c5cfc, #5ce0e6);
  --radius:   14px;
  --radius-sm:8px;
  --shadow:   0 4px 32px rgba(0,0,0,0.4);
  --nav-h:    68px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
#nav.scrolled { background: rgba(10,10,15,0.95); }

.nav-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
}

.nav-logo {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}

.nav-links {
  list-style: none; display: flex; gap: 28px; margin-left: auto;
}
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--grad); border: none; border-radius: 8px;
  color: #fff; font-size: .875rem; font-weight: 600;
  padding: 9px 20px; cursor: pointer; flex-shrink: 0;
  transition: opacity .2s, transform .15s;
}
.nav-cta:hover { opacity: .85; transform: translateY(-1px); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none; flex-direction: column;
  padding: 16px 24px 20px; gap: 4px;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.mobile-link {
  padding: 12px 0; font-size: 1rem; font-weight: 500;
  color: var(--muted); border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.mobile-link:hover { color: var(--text); }
.cta-mobile {
  margin-top: 8px; border-bottom: none;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ── Sections shared ── */
section { padding: 100px 24px; }
section:nth-child(even) { background: var(--bg2); }

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted); font-size: 1.05rem;
  max-width: 560px; margin-bottom: 48px;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 60px;
  position: relative; overflow: hidden;
  gap: 48px;
  max-width: 1160px; margin: 0 auto;
  padding-left: 24px; padding-right: 24px;
}

.hero-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(124,92,252,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 60%, rgba(92,224,230,0.08) 0%, transparent 70%),
    var(--bg);
  pointer-events: none;
}

.hero-content { flex: 1; min-width: 0; }

.hero-intro {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
}
.hero-welcome {
  font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.3;
}
.hero-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(124,92,252,0.4);
  box-shadow: 0 0 24px rgba(124,92,252,0.2);
  flex-shrink: 0;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,92,252,0.12); border: 1px solid rgba(124,92,252,0.3);
  border-radius: 999px; padding: 6px 16px;
  font-size: .8rem; font-weight: 600; color: #a07cf8;
  margin-bottom: 24px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.hero-badge:hover { background: rgba(124,92,252,0.22); border-color: rgba(124,92,252,0.6); }
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #7c5cfc;
  box-shadow: 0 0 8px #7c5cfc;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.4); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -1px;
}

.hero-sub {
  color: var(--muted); font-size: 1.1rem;
  line-height: 1.7; margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.btn-primary {
  background: var(--grad); border-radius: 10px;
  color: #fff; font-weight: 600; font-size: .95rem;
  padding: 13px 28px;
  transition: opacity .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { opacity: .85; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-weight: 600; font-size: .95rem;
  padding: 13px 28px;
  transition: border-color .2s, background .2s, transform .15s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(124,92,252,0.08); transform: translateY(-2px); }

.hero-dev-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-top: 4px; margin-bottom: 2px;
}
.hero-certs { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-chip {
  font-size: .75rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 12px;
  text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
}
.cert-chip:hover { color: var(--accent2); border-color: var(--accent2); background: rgba(92,224,230,0.06); }

/* ── Hero chart card ── */
.hero-visual { flex: 0 0 380px; }

.chart-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow), 0 0 60px rgba(124,92,252,0.06);
}

.chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.chart-title { font-size: .85rem; font-weight: 600; }
.chart-badge {
  font-size: .7rem; font-weight: 700;
  background: rgba(124,92,252,0.15); color: #a07cf8;
  border-radius: 6px; padding: 3px 10px;
}

.bars {
  display: flex; gap: 10px; align-items: flex-end;
  height: 120px; margin-bottom: 12px;
}
.bar-group { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.bar {
  flex: 1; border-radius: 4px 4px 0 0;
  height: var(--h); transition: height .8s cubic-bezier(.23,1,.32,1);
}
.bar-a { background: rgba(124,92,252,0.35); }
.bar-b { background: var(--grad); }

.chart-legend {
  display: flex; gap: 16px; font-size: .75rem; color: var(--muted);
  margin-bottom: 16px;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot-a { background: rgba(124,92,252,0.6); }
.dot-b { background: var(--accent); }

.chart-kpis {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; border-top: 1px solid var(--border); padding-top: 16px;
}
.kpi-val { font-size: 1.1rem; font-weight: 700; }
.kpi-label { font-size: .7rem; color: var(--muted); margin-top: 2px; }

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

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}

.about-text p {
  color: var(--muted); margin-bottom: 14px; font-size: 1rem; line-height: 1.75;
}
.about-text p strong { color: var(--text); }
.about-text a { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; }

.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.icon-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  transition: color .2s, border-color .2s, transform .15s;
}
.icon-link svg { width: 16px; height: 16px; }
.icon-link:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* Skills panel */
.skills-panel {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.skills-title { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }

.skill-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.skill-row { display: flex; flex-direction: column; gap: 6px; }
.skill-name { font-size: .85rem; font-weight: 600; }
.skill-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.skill-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: var(--grad);
  transition: width 1.2s cubic-bezier(.23,1,.32,1);
}
.skill-fill.animated { width: var(--w); }

.exp-chips-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; margin-top: 4px;
}
.skills-title { margin-top: 24px; }
.experience-chips { display: flex; flex-direction: column; gap: 10px; }
.exp-chip {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.exp-chip-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.exp-role { font-size: .82rem; font-weight: 700; }
.exp-org { font-size: .75rem; color: var(--muted); margin-top: 1px; }
.exp-period {
  font-size: .72rem; color: var(--accent2); white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; flex-shrink: 0; padding-top: 1px;
}
.exp-chip-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.exp-chip-list li {
  font-size: .77rem; color: var(--muted); line-height: 1.5;
  padding-left: 13px; position: relative;
}
.exp-chip-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

/* ── Portfolio ── */
#portfolio { background: var(--bg); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-size: .85rem; font-weight: 600; padding: 7px 18px;
  cursor: pointer; transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(124,92,252,0.12); border-color: var(--accent); color: var(--text);
}

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

.project-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  cursor: default;
}
.project-card:hover {
  border-color: rgba(124,92,252,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124,92,252,0.12);
}
.project-card.hidden { display: none; }

.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-icon {
  font-size: 1.6rem; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border-radius: 10px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tag {
  font-size: .7rem; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 9px; color: var(--muted);
}

.project-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.project-desc { font-size: .875rem; color: var(--muted); line-height: 1.65; flex: 1; }

.project-footer { margin-top: auto; }
.project-link {
  font-size: .85rem; font-weight: 600; color: var(--accent2);
  transition: color .2s;
}
.project-link:hover { color: var(--accent); }

/* ── Services ── */
#services { background: var(--bg2); }

.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-icon { font-size: 2rem; margin-bottom: 14px; }
.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: .875rem; color: var(--muted); line-height: 1.65; }

/* ── Contact ── */
#contact { background: var(--bg); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }

.contact-channels { display: flex; flex-direction: column; gap: 12px; }
.channel-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: border-color .2s, transform .2s;
}
.channel-card:hover { border-color: var(--accent); transform: translateX(4px); }
.channel-icon { font-size: 1.3rem; }
.channel-name { font-size: .9rem; font-weight: 700; }
.channel-desc { font-size: .8rem; color: var(--muted); }
.channel-arrow { margin-left: auto; color: var(--muted); font-size: 1.1rem; }

/* Form */
.contact-form {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .9rem; padding: 11px 14px;
  outline: none; resize: vertical;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(136,136,160,0.5); }

.form-note { font-size: .82rem; color: var(--accent2); min-height: 1.2em; }

/* ── Professional Development ── */
#certifications { background: var(--bg2); }
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cert-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .15s;
}
.cert-card:hover {
  border-color: var(--accent2); background: rgba(92,224,230,0.05);
  transform: translateY(-2px);
}
.cert-card-star { color: var(--accent); font-size: .9rem; flex-shrink: 0; }
.cert-card span:nth-child(2) { font-size: .85rem; font-weight: 600; color: var(--text); flex: 1; line-height: 1.4; }
.cert-card-year {
  font-size: .72rem; color: var(--accent2); font-family: 'JetBrains Mono', monospace;
  background: rgba(92,224,230,0.08); border: 1px solid rgba(92,224,230,0.2);
  border-radius: 4px; padding: 2px 7px; flex-shrink: 0;
}

/* ── Footer ── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-size: 1rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-copy { font-size: .82rem; color: var(--muted); }
.footer-links { margin-left: auto; display: flex; gap: 20px; }
.footer-links a { font-size: .82rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  #hero { flex-direction: column; text-align: center; }
  .hero-intro { justify-content: center; }
  .hero-badge { margin: 0 auto 24px; }
  .hero-actions { justify-content: center; }
  .hero-certs { justify-content: center; }
  .hero-visual { width: 100%; max-width: 400px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { order: -1; }
  .contact-channels { order: 1; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 72px 18px; }
}

/* ── Scroll animations ── */
.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
