/* Reset + Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #020617; /* solid base, WebGL behind */
  color: #e5e5e5;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Three.js canvas behind everything */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
}

.nav-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.7);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 55%);
  animation: logoPulse 2.4s ease-in-out infinite;
}

.nav-logo-text {
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-dot {
  color: #f97316;
}

@keyframes logoPulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.65);
  }
  50% {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 0 24px rgba(248, 113, 113, 0.85);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.65);
  }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #e5e5e5;
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 40px auto 20px;
  padding: 40px 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-content {
  flex: 1.2;
}

.hero-tag {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: #a5b4fc;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
}

.hero h1 span {
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 12px;
  max-width: 420px;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 14px;
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(120deg, #38bdf8, #a855f7);
  color: #0b1120;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.45);
}

.ghost-btn {
  background: transparent;
  color: #e5e5e5;
  border-color: rgba(148, 163, 184, 0.6);
}

.ghost-btn:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.hero-image {
  flex: 0.9;
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.25), transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.25), transparent 55%);
}

/* Sections */
.section {
  max-width: 900px;
  margin: 26px auto;
  padding: 22px 16px 26px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
}

.section h2 {
  margin-bottom: 10px;
  font-size: 1.4rem;
  border-left: 4px solid #38bdf8;
  padding-left: 10px;
}

.section p {
  font-size: 0.95rem;
  color: #e5e7eb;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.skill-card {
  padding: 14px 12px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 55%),
              rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.skill-card p {
  color: #cbd5f5;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.9);
  border-color: #38bdf8;
}

/* Projects */
.project-card {
  margin-top: 16px;
  padding: 16px 14px;
  border-radius: 16px;
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 55%),
              rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.95);
  border-color: #38bdf8;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.project-header h3 {
  font-size: 1.05rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
}

.project-card p {
  font-size: 0.9rem;
  color: #e5e7eb;
}

.project-links {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.project-links a {
  font-size: 0.85rem;
  color: #38bdf8;
  text-decoration: none;
  position: relative;
}

.project-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: #38bdf8;
  transition: width 0.2s ease;
}

.project-links a:hover::after {
  width: 100%;
}

/* Contact */
#contact a {
  color: #38bdf8;
  text-decoration: none;
}

#contact a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 18px 10px 24px;
  margin-top: 32px;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Simple animations */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.7s ease-out forwards;
}

.float-in {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  animation: floatIn 0.9s ease-out forwards;
  animation-delay: 0.15s;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.7s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll slide animations */
.slide-from-left,
.slide-from-right {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.slide-from-left {
  transform: translate(-40px, 20px);
}

.slide-from-right {
  transform: translate(40px, 20px);
}

.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

.section .project-card.slide-from-left,
.section .project-card.slide-from-right {
  transition-delay: 0.08s;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    margin-top: 24px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tag {
    font-size: 0.75rem;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  .section {
    margin: 20px 10px;
    padding: 18px 14px 22px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding-inline: 10px;
  }

  .nav-logo-text {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 14px 12px;
  }
}
