*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── THEMES ── */
:root,
[data-theme="dark"] {
  --bg: #0a0a0f;
  --surface: #12121a;
  --card: #1a1a26;
  --accent: #6c63ff;
  --accent2: #00d4ff;
  --text: #e8e8f0;
  --muted: #7a7a9a;
  --border: #2a2a3a;
  --glow1: rgba(108,99,255,.18);
  --glow2: rgba(0,212,255,.12);
}
[data-theme="light"] {
  --bg: #f4f4fb;
  --surface: #ffffff;
  --card: #ffffff;
  --accent: #5b52e0;
  --accent2: #0088bb;
  --text: #0a0a1a;
  --muted: #5a5a7a;
  --border: #d0d0e0;
  --glow1: rgba(108,99,255,.08);
  --glow2: rgba(0,180,220,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* ── CANVAS BACKGROUND ── */
#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

body::before, body::after { display: none; }


/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2.5rem;
  transition: padding .3s, background .3s;
}
html[data-theme="light"] nav { background: rgba(244,244,251,.92); }
nav.scrolled { padding: .6rem 2.5rem; }

.nav-logo-img { height: 38px; width: 38px; transition: transform .3s; }
.nav-logo-img:hover { transform: rotate(15deg) scale(1.1); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .9rem;
  transition: color .2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transition: width .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; gap: .6rem; align-items: center; }
.lang-btn, .theme-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  padding: .35rem .7rem; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.lang-btn:hover, .theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem;
  position: relative; z-index: 1;
}
.hero-inner { max-width: 700px; }

.avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: #0a0a0f;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px rgba(108,99,255,.4);
  animation: pulse 3s ease-in-out infinite;
  border: 2px solid rgba(108,99,255,.4);
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 40px rgba(108,99,255,.4); }
  50%      { box-shadow: 0 0 70px rgba(108,99,255,.7); }
}

.badge {
  display: inline-block;
  background: rgba(108,99,255,.15); border: 1px solid rgba(108,99,255,.4);
  color: var(--accent2); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; padding: .35rem .9rem; border-radius: 999px;
  margin-bottom: 1.2rem; text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.1; margin-bottom: .6rem; }
h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.subtitle { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  padding: .75rem 1.8rem; border-radius: 8px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .2s; display: inline-block;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; box-shadow: 0 4px 20px rgba(108,99,255,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,.6); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── SECTIONS ── */
section { position: relative; z-index: 1; padding: 5rem 2rem; }
.container { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: .5rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 2.5rem; }

/* ── SKILLS GRID ── */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem; margin-bottom: 3rem;
}
.skill-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem .8rem; text-align: center;
  transition: all .25s; cursor: default;
  opacity: 0; transform: translateY(20px);
}
.skill-card.visible { opacity: 1; transform: translateY(0); }
.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(108,99,255,.2); }
.skill-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.skill-name { font-size: .82rem; font-weight: 600; color: var(--text); }

/* ── SKILL BARS ── */
.skill-bars { display: flex; flex-direction: column; gap: 1.1rem; }
.skill-bar-item {}
.skill-bar-label {
  display: flex; justify-content: space-between;
  font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--text);
}
.skill-bar-track {
  height: 7px; background: var(--border); border-radius: 999px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: .3;
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2rem; top: 1.2rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 10px rgba(108,99,255,.5);
}
.timeline-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem 1.8rem;
  transition: border-color .2s, box-shadow .2s;
}
.timeline-card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(108,99,255,.15); }
.timeline-date { font-size: .78rem; color: var(--accent2); font-weight: 600; letter-spacing: .05em; }
.timeline-card h3 { font-size: 1.05rem; font-weight: 700; margin: .3rem 0 .2rem; }
.timeline-company { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.timeline-desc { font-size: .88rem; color: var(--muted); line-height: 1.6; margin-bottom: .8rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.timeline-tags span {
  background: rgba(108,99,255,.1); border: 1px solid rgba(108,99,255,.3);
  color: var(--accent); font-size: .75rem; font-weight: 600;
  padding: .2rem .7rem; border-radius: 999px;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem;
}
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.6rem;
  transition: all .25s; display: flex; flex-direction: column; gap: .8rem;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(108,99,255,.2); }
.project-header { display: flex; justify-content: space-between; align-items: center; }
.project-icon { font-size: 2rem; }
.project-links { display: flex; gap: .8rem; }
.project-links a {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: color .2s;
}
.project-links a:hover { color: var(--accent2); }
.project-card h3 { font-size: 1rem; font-weight: 700; }
.project-card p { font-size: .86rem; color: var(--muted); line-height: 1.6; flex: 1; }
.project-stack { display: flex; flex-wrap: wrap; gap: .4rem; }
.project-stack span {
  background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.25);
  color: var(--accent2); font-size: .74rem; font-weight: 600;
  padding: .2rem .7rem; border-radius: 999px;
}

/* ── TECH PILLS ── */
.tech-group { margin-bottom: 2rem; }
.tech-group h3 { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: .4rem 1rem;
  font-size: .82rem; font-weight: 500; transition: all .2s;
}
.pill:hover { border-color: var(--accent2); color: var(--accent2); }
.pill.highlight { border-color: rgba(108,99,255,.5); color: var(--accent); }

/* ── CONTACT ── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start;
}
.contact-info-block h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.contact-info-block p { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
.contact-info-block a { color: var(--accent2); text-decoration: none; }
.contact-info-block a:hover { text-decoration: underline; }
.contact-socials { display: flex; gap: .8rem; margin-top: 1.2rem; }
.social-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: .5rem 1.1rem;
  font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── FORM ── */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1rem .6rem;
  color: var(--text); font-family: inherit; font-size: .95rem;
  outline: none; transition: border-color .2s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group label {
  position: absolute; left: 1rem; top: .85rem;
  color: var(--muted); font-size: .9rem; pointer-events: none;
  transition: all .2s;
}
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: .25rem; font-size: .72rem; color: var(--accent);
}
.form-status { font-size: .85rem; color: var(--accent2); min-height: 1.2rem; }

/* ── DIVIDER ── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2rem;
  color: var(--muted); font-size: .82rem;
  position: relative; z-index: 1;
}

/* ── FADE-IN ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
}
@media (max-width: 600px) {
  nav { padding: 1rem 1.2rem; }
  .nav-links { display: none; }
}
