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

:root {
  --bg: #0d0d12;
  --surface: #16161d;
  --accent: #7c5cff;
  --accent2: #00e0c6;
  --text: #e8e8f0;
  --muted: #9a9ab0;
}

html {
  scroll-behavior: smooth;
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6%;
  background: rgba(13,13,18,0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  border: 1px solid var(--accent);
  padding: 8px 18px;
  border-radius: 30px;
  color: var(--accent) !important;
  transition: background 0.3s, color 0.3s;
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff !important;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 6% 60px;
  gap: 40px;
  background: radial-gradient(circle at 80% 20%, rgba(124,92,255,0.15), transparent 50%);
}

.hero-sub {
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124,92,255,0.4);
}

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

.btn-outline:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* 3D Cube */
.hero-visual {
  perspective: 900px;
}

.cube {
  width: 180px;
  height: 180px;
  position: relative;
  transform-style: preserve-3d;
  animation: spin 12s linear infinite;
}

.face {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px solid var(--accent);
  background: rgba(124,92,255,0.08);
  box-shadow: inset 0 0 40px rgba(124,92,255,0.25);
}

.front  { transform: translateZ(90px); }
.back   { transform: rotateY(180deg) translateZ(90px); }
.right  { transform: rotateY(90deg) translateZ(90px); }
.left   { transform: rotateY(-90deg) translateZ(90px); }
.top    { transform: rotateX(90deg) translateZ(90px); }
.bottom { transform: rotateX(-90deg) translateZ(90px); }

@keyframes spin {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}

/* Sections */
.section {
  padding: 90px 6%;
}

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 12px auto 0;
  border-radius: 2px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}

.stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
}

.about-card {
  background: var(--surface);
  border: 1px solid #26262f;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}

.avatar {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.tags span {
  background: rgba(124,92,255,0.15);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Portfolio */
.filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter {
  padding: 10px 24px;
  border-radius: 30px;
  border: 1px solid #33333f;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s;
}

.filter.active, .filter:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.card.hide {
  display: none;
}

.card-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.card-info {
  padding: 20px;
}

.card-info h3 {
  font-size: 1.1rem;
}

.card-info p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Skills */
.skills-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
}

.bar {
  height: 10px;
  background: #22222b;
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 5px;
  transition: width 1.2s ease;
}

/* Contact */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.contact-form input,
.contact-form textarea {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid #2a2a35;
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-msg {
  text-align: center;
  color: var(--accent2);
  min-height: 24px;
}

/* Footer */
footer {
  padding: 40px 6%;
  text-align: center;
  border-top: 1px solid #22222b;
  color: var(--muted);
}

.socials {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 14px;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

.socials a:hover {
  color: var(--accent);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }
  .hero-buttons, .stats {
    justify-content: center;
  }
  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 0.8rem;
  }
}