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

:root {
  --bg: #0c0c14;
  --surface: #13131f;
  --surface2: #1a1a2e;
  --border: #1e1e30;
  --accent: #a78bfa;
  --accent2: #7c3aed;
  --text: #e2e8f0;
  --muted: #6b7280;
  --success: #4ade80;
  --danger: #f87171;
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: var(--accent);
  transition: all 0.3s ease;
}

.hidden {
  display: none !important;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-text {
  font-size: 3rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(12, 12, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 18px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 12px 60px;
  border-bottom-color: var(--accent);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 3px;
}

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

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

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 3px;
  transition: all 0.3s ease;
}


.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 60px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 580px;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.hero-title {
  font-size: 3.8rem;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

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

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 480px;
  line-height: 1.8;
  animation: fadeUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  animation: fadeUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.btn {
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #c4b5fd;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--bg);
}



.hero-visual {
  z-index: 2;
  animation: fadeUp 0.8s ease 0.8s forwards;
  opacity: 0;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 380px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(167, 139, 250, 0.1);
}

.code-header {
  background: var(--surface2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #4ade80; }

.code-title {
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 8px;
}

.code-body {
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 2;
}

.code-keyword { color: #c084fc; }
.code-var { color: #60a5fa; }
.code-key { color: #e2e8f0; }
.code-str { color: #4ade80; }
.code-bool { color: #fb923c; }


.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 46px;
  border: 2px solid rgba(167, 139, 250, 0.4);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6px;
}

.scroll-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}


section {
  padding: 100px 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: #ffffff;
  font-weight: bold;
}

.section-header h2 span {
  color: var(--accent);
}


.about {
  background: var(--surface);
}

.about-content {
  display: flex;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-text {
  flex: 1;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-list {
  list-style: none;
  margin-top: 20px;
}

.about-list li {
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.about-list li:last-child {
  border-bottom: none;
}

.about-card {
  flex: 0 0 280px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.about-avatar {
  width: 80px;
  height: 80px;
  background: rgba(167, 139, 250, 0.1);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent);
  margin: 0 auto 20px;
  letter-spacing: 2px;
}

.about-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.about-card > p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.about-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-stat span {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent);
  display: block;
}

.about-stat p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.about-links {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.about-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.about-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}


.skills-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-item {
  margin-bottom: 20px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.skill-info span:first-child {
  color: var(--text);
}

.skill-info span:last-child {
  color: var(--accent);
}

.skill-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0;
  transition: width 1.5s ease;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.skill-tag {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--accent);
  color: var(--bg);
}


.projects {
  background: var(--surface);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card.featured {
  grid-column: span 2;
}

.project-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(167, 139, 250, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: rgba(167, 139, 250, 0.2);
  line-height: 1;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--muted);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

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

.project-card h3 {
  color: #ffffff;
  font-size: 1.1rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

/* ========================
   CONTACT
   ======================== */
.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-text {
  color: var(--muted);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.8;
  font-size: 1.05rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  min-height: 16px;
}

#submit-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

#submit-btn:hover {
  background: #c4b5fd;
  transform: translateY(-2px);
}

#submit-btn:disabled {
  background: var(--muted);
  cursor: not-allowed;
  transform: none;
}

/* ========================
   FOOTER
   ======================== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 60px;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 3px;
  margin-bottom: 12px;
}

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

.footer-content p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer-content p span {
  color: var(--accent);
}

.footer-sub {
  font-size: 0.8rem !important;
  opacity: 0.6;
}

/* ========================
   ANIMATIONS
   ======================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 968px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 120px 30px 60px;
    gap: 50px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-subtitle {
    margin: 0 auto 40px;
  }

  .code-block {
    width: 100%;
    max-width: 420px;
  }

  .about-content {
    flex-direction: column;
  }

  .about-card {
    flex: none;
    width: 100%;
  }

  .skills-content {
    grid-template-columns: 1fr;
  }

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

  .project-card.featured {
    grid-column: span 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  section {
    padding: 80px 24px;
  }

  .navbar {
    padding: 18px 24px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    gap: 20px;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .code-block {
    display: none;
  }
}