/* ═══════════════ VARIABLES ═══════════════ */
:root {
  --bg: #0a0e1a;
  --bg-card: rgba(15, 20, 40, 0.8);
  --bg-card-hover: rgba(20, 28, 55, 0.95);
  --surface: #0f1429;
  --surface-alt: #141930;
  --border: rgba(0, 210, 255, 0.08);
  --border-hover: rgba(0, 210, 255, 0.25);
  --cyan: #00d2ff;
  --cyan-dim: rgba(0, 210, 255, 0.15);
  --purple: #7b5cff;
  --purple-dim: rgba(123, 92, 255, 0.15);
  --magenta: #c926ff;
  --text: #e2e8f0;
  --text-dim: #8892b0;
  --text-bright: #ffffff;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 210, 255, 0.08);
}

/* ═══════════════ RESET ═══════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ═══════════════ PARTICLES ═══════════════ */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.nav__logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--cyan);
  letter-spacing: -1px;
}
.nav__links {
  display: flex;
  gap: 2rem;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--cyan);
  transition: width 0.3s;
}
.nav__links a:hover { color: var(--cyan); }
.nav__links a:hover::after { width: 100%; }
.nav__cv-link {
  color: var(--cyan) !important;
  border: 1px solid var(--cyan);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.8rem !important;
  transition: all 0.3s;
}
.nav__cv-link:hover {
  background: var(--cyan-dim);
}
.nav__cv-link::after { display: none !important; }
.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lang-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.3s;
  overflow: hidden;
}
.lang-toggle:hover {
  border-color: var(--border-hover);
}
.lang-toggle__indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: 99px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}
.lang-toggle__indicator--en {
  transform: translateX(100%);
}
.lang-toggle__option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.35s;
  user-select: none;
  white-space: nowrap;
}
.lang-toggle__option--active {
  color: var(--bg);
}
.lang-toggle__flag {
  font-size: 0.9rem;
  line-height: 1;
}
.lang-toggle__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
  gap: 4rem;
  max-width: 1280px;
  margin: 0 auto;
}
.hero__content { flex: 1; min-width: 320px; }
.hero__greeting {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}
.hero__name {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-bright);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}
.hero__accent {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__role {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--purple);
  margin-bottom: 1.5rem;
  min-height: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--cyan);
}
.hero__desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 500px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 1s forwards;
}
.hero__social {
  display: flex;
  gap: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.6s 1.2s forwards;
}
.hero__social a {
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s;
}
.hero__social a:hover {
  color: var(--cyan);
  transform: translateY(-2px);
}

/* Hero Visual — Code Window */
.hero__visual {
  flex: 1;
  min-width: 320px;
  max-width: 520px;
  opacity: 0;
  animation: fadeLeft 0.8s 0.6s forwards;
}
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}
.code-window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot--red { background: #ff5f57; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #28ca42; }
.code-window__title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.code-window__code {
  padding: 1.2rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--text-dim);
}
.code-window__code .kw { color: var(--purple); font-weight: 600; }
.code-window__code .cls { color: var(--cyan); font-weight: 600; }
.code-window__code .fn { color: #ffca28; }
.code-window__code .str { color: #28ca42; }
.code-window__code .cm { color: #5c6370; font-style: italic; }

/* ═══════════════ SECTIONS ═══════════════ */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}
.section--dark { background: var(--surface); }
.container { max-width: 1100px; margin: 0 auto; }
.section__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-bright);
}
.section__num {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 1rem;
  margin-right: 0.5rem;
}

/* ═══════════════ ABOUT ═══════════════ */
.about { display: flex; gap: 4rem; align-items: flex-start; }
.about__text { flex: 1.6; }
.about__text p { margin-bottom: 1rem; color: var(--text-dim); }
.about__text strong { color: var(--text-bright); }
.about__stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s;
}
.stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.stat__num {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat__plus {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ═══════════════ SKILLS ═══════════════ */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.skill-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.skill-card__icon { font-size: 2rem; margin-bottom: 0.8rem; }
.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
}
.skill-card ul { display: flex; flex-direction: column; gap: 0.4rem; }
.skill-card li {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ═══════════════ PROJECTS ═══════════════ */
.projects { display: flex; flex-direction: column; gap: 2rem; }
.project-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.project-card--featured {
  border-color: rgba(0, 210, 255, 0.15);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.03), rgba(123, 92, 255, 0.03));
}
.project-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.project-card__name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-bright);
}
.project-card__subtitle {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 500;
  margin-top: 0.2rem;
}
.project-card__version {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-dim);
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  white-space: nowrap;
  align-self: flex-start;
}
.project-card__version--live {
  color: #28ca42;
  background: rgba(40, 202, 66, 0.12);
}

/* ═══════════════ PROJECT CATEGORIES ═══════════════ */
.project-category { margin-bottom: 2.5rem; }
.project-category:last-child { margin-bottom: 0; }
.project-category__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.project-category__icon {
  font-size: 1.3rem;
}
.project-category__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: -0.3px;
}
.project-card__desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  max-width: 680px;
}
.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.project-card__tech span {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: var(--cyan-dim);
  color: var(--cyan);
  border-radius: 99px;
  font-weight: 500;
}
.project-card__links { margin-bottom: 1rem; }
.project-card__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
}
.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.feature__icon { font-size: 1rem; }

/* Project images */
.project-card__image {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border);
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}
.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__image img {
  transform: scale(1.03);
}
.project-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(10, 14, 26, 0.6));
  pointer-events: none;
}

/* ═══════════════ CONTACT ═══════════════ */
.contact { text-align: center; }
.contact__text {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 2.5rem;
}
.contact__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  min-width: 200px;
}
.contact__card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  color: var(--cyan);
}
.contact__card svg { transition: color 0.3s; }
.contact__card span:nth-child(2) { font-weight: 600; font-size: 1rem; }
.contact__card__handle {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg);
}
.btn--primary:hover {
  box-shadow: 0 4px 24px rgba(0, 210, 255, 0.3);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border-hover);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn--sm { padding: 0.5rem 1.2rem; font-size: 0.8rem; }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes blink {
  50% { opacity: 0; }
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 7rem; gap: 2rem; }
  .hero__desc { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__social { justify-content: center; }
  .hero__visual { max-width: 100%; }
  .about { flex-direction: column; gap: 2rem; }
  .about__stats { flex-direction: row; }
  .stat { flex: 1; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__actions { gap: 0.8rem; }
  .nav__links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .nav__toggle { display: flex; }
  .hero__name { font-size: 2rem; }
  .about__stats { flex-direction: column; }
  .project-card__features { grid-template-columns: 1fr; }
  .contact__links { flex-direction: column; align-items: center; }
  .contact__card { min-width: 100%; }
}
