/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #050816 0%, #061025 50%, #07102a 100%);
  color: #f5f5f5;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Color variables (change theme here if you want) */
:root {
  --primary: #7c3aed; /* richer purple */
  --accent: #06b6d4;  /* aqua accent */
  --primary-soft: rgba(124, 58, 237, 0.12);
  --bg-dark: #050816;
  --bg-card: rgba(15, 23, 42, 0.6);
  --text-muted: #9ca3af;
  --border-soft: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.02);
}

/* Animated background container */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
}

/* blob shapes styling and gentle float animation */
.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  opacity: 0.08;
  filter: blur(36px);
  transform-origin: center;
  will-change: transform, opacity;
}

.blob-1 { left: -10%; top: -20%; fill: url(#g1); animation: float1 14s ease-in-out infinite; }
.blob-2 { right: -5%; bottom: -10%; width: 45vmax; opacity: 0.06; filter: blur(40px); animation: float2 18s ease-in-out infinite; }

/* create inline gradient in CSS for blobs fallback */
.blob path { fill: var(--primary); }

/* ===== Layout Helpers ===== */
.section {
  padding: 80px 16px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* subtle card glass effect */
.bg-card-glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(6px) saturate(120%);
}

/* ===== Header / Navbar ===== */
.header {
  position: sticky;
  top: 10px;
  z-index: 100;
  background: linear-gradient(180deg, rgba(5,8,22,0.55), rgba(5,8,22,0.35));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 1100px;
  margin: 10px auto;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(2,6,23,0.6);
}

.logo span {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.logo span:hover {
  transform: translateY(-3px) rotate(-2deg);
  color: var(--accent);
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
}

.nav a {
  text-decoration: none;
  color: #e5e7eb;
  font-size: 0.95rem;
  transition: color 0.2s, transform 0.18s;
  padding: 6px 8px;
  border-radius: 8px;
}

.nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
  background: var(--glass-2);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 6px 10px;
  color: #e5e7eb;
  font-size: 1rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 16px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: 66vh;
}

.hero-text .intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(6px);
  animation: revealFadeUp 0.6s 0.15s forwards;
}

.hero-text .name {
  font-size: 2.4rem;
  margin: 8px 0;
  letter-spacing: -0.4px;
  opacity: 0;
  transform: translateY(8px);
  animation: revealFadeUp 0.6s 0.25s forwards;
}

.hero-text .role {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  animation: revealFadeUp 0.6s 0.4s forwards;
}

.hero-desc {
  max-width: 500px;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(8px);
  animation: revealFadeUp 0.6s 0.55s forwards;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: revealFadeUp 0.6s 0.7s forwards;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, border 0.2s, box-shadow 0.12s;
  box-shadow: 0 6px 18px rgba(2,6,23,0.45);
}

.btn.primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: white;
  border: none;
}

.btn.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(100, 60, 200, 0.18);
}

.btn.outline {
  border-color: rgba(124,58,237,0.9);
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.btn.outline:hover {
  background: var(--primary-soft);
}

.hero-socials {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  animation: revealFadeUp 0.6s 0.85s forwards;
}

.hero-socials a {
  color: var(--text-muted);
  text-decoration: none;
}

.hero-socials a:hover {
  color: var(--primary);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 60px rgba(12,10,30,0.7);
  transform: translateY(6px) scale(0.98);
  transition: transform 0.6s ease, box-shadow 0.4s ease;
}

.hero-image img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 30px 80px rgba(100,60,200,0.18);
}

/* ===== About ===== */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  gap: 24px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about-info {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
}

.about-info div + div {
  margin-top: 6px;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.skill-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  transition: transform 0.18s, box-shadow 0.18s;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(2,6,23,0.6);
}

.skill-card h3 {
  margin-bottom: 8px;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(2,6,23,0.6);
}

.project-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img {
  transform: scale(1.03) translateY(-6px);
}

.project-content {
  padding: 14px 16px 16px;
}

.project-content h3 {
  margin-bottom: 6px;
}

.project-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,58,237,0.12), rgba(6,182,212,0.06));
  color: #eaeefb;
}

/* ===== Contact ===== */
.contact-text {
  max-width: 600px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr;
  gap: 20px;
}

.contact-info p {
  font-size: 0.95rem;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: rgba(2,6,23,0.6);
  color: #e5e7eb;
  font-size: 0.95rem;
  outline: none;
  transition: box-shadow 0.12s, transform 0.12s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 8px 20px rgba(124,58,237,0.12);
  transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  margin-top: 30px;
  position: relative;
  z-index: 2;
}

/* ===== Section reveal helper (used by JS) ===== */
.section--reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section--reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 1;
  }

  .hero-image {
    order: 0;
    margin-bottom: 14px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-content,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 10px 12px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 16px;
    background: rgba(2,6,23,0.9);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 8px 12px;
  }

  .nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .nav-toggle {
    display: block;
  }

  .nav.show {
    display: block;
  }

  .blob {
    display: none; /* hide big decorative blobs on small screens to save space */
  }
}

/* ===== Keyframes & small helpers ===== */
@keyframes float1 {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-18px) rotate(6deg) scale(1.02); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes float2 {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(20px) rotate(-6deg) scale(0.98); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes revealFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blob, .project-card, .skill-card, .hero-image img, .btn { transition: none !important; animation: none !important; }
}
