:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --accent: #6c63ff;
  --accent-light: #3b82f6;
  --gradient: linear-gradient(135deg, #6c63ff, #3b82f6);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-heading: #ffffff;
  --border: rgba(255, 255, 255, 0.06);
  --glow: rgba(108, 99, 255, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav__menu {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav__link:hover {
  color: var(--text-heading);
  background: var(--bg-card-hover);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero__greeting {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero__name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 2.4rem;
}

.hero__cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.hero__circle--1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.hero__circle--2 {
  width: 300px;
  height: 300px;
  background: var(--accent-light);
  bottom: -50px;
  left: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero__circle--3 {
  width: 200px;
  height: 200px;
  background: #8b5cf6;
  top: 50%;
  left: 50%;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ===== ABOUT ===== */
.about {
  padding: 120px 0;
}

.about__content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about__text {
  flex: 1;
}

.about__text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.about__photo {
  flex-shrink: 0;
}

.about__photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about__photo-placeholder svg {
  width: 120px;
  height: 120px;
}

/* ===== SKILLS ===== */
.skills {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
}

.skill-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108, 99, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.skill-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}

.skill-card__icon svg {
  width: 100%;
  height: 100%;
}

.skill-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.skill-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== PROJECTS ===== */
.projects {
  padding: 120px 0;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-card__img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: var(--bg-secondary);
  display: block;
  border-bottom: 1px solid var(--border);
}

.project-card__body {
  padding: 24px;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__url {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--accent);
  word-break: break-all;
}

/* Skeleton */
.projects__loading {
  display: contents;
}

.skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 320px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== CONTACT ===== */
.contact {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.contact__content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.contact__text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.contact__links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.contact__link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact__link:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .projects__grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav__menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero__name {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__title {
    font-size: 1.1rem;
  }

  .about {
    padding: 80px 0;
  }

  .about__content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .about__photo-placeholder {
    width: 160px;
    height: 160px;
  }

  .skills {
    padding: 80px 0;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .projects {
    padding: 80px 0;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 80px 0;
  }

  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .project-card__img {
    height: 180px;
  }
}
