/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* Body */
body {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
  background-attachment: fixed;
  color: #f8fafc;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 27, 75, 0.84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(196, 181, 253, 0.14);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

header h1 {
  font-size: 2.1rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(45deg, #f8fafc, #c4b5fd, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 12px 30px rgba(139, 92, 246, 0.35);
}

nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
  max-width: 0;
  padding: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(15, 23, 42, 0.18) 24%, rgba(15, 23, 42, 0.18) 76%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
              inset 0 -1px 0 rgba(139, 92, 246, 0.12),
              0 8px 20px rgba(0, 0, 0, 0.14);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 138px;
  top: 50%;
  overflow: hidden;
  transform: translateY(-50%) translateX(16px);
  transition: max-width 0.35s ease, opacity 0.25s ease, transform 0.35s ease;
  white-space: nowrap;
}

nav a {
  color: #c4b5fd;
  width: 72px;
  padding: 7px 0;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  inset: auto 16px 5px;
  height: 2px;
  border-radius: 999px;
  background: #f59e0b;
  opacity: 0;
  transform: scaleX(0.5);
  transition: all 0.3s ease;
}

nav a:hover::after,
nav a:focus::after,
nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

nav a:hover,
nav a:focus,
nav a[aria-current="page"] {
  color: #f8fafc;
  background: rgba(139, 92, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.14);
}

.site-nav.is-open {
  max-width: 310px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.menu-toggle {
  cursor: pointer;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: 999px;
  width: 72px;
  padding: 7px 0;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.menu-toggle::after {
  content: '+';
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

/* Hero Section */
section.hero {
  height: 90vh;
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  bottom: 0;
  width: 100vw;
  background: radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, transparent 18%, transparent 74%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
              inset 0 -1px 0 rgba(139, 92, 246, 0.12),
              inset 0 0 40px rgba(139, 92, 246, 0.08);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  background: linear-gradient(45deg, #f8fafc, #c4b5fd, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

.hero p {
  max-width: 700px;
  margin-bottom: 40px;
  font-size: 1.2rem;
  color: #e2e8f0;
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* Button */
.btn {
  padding: 15px 30px;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.5s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.8s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover, .btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
  background: linear-gradient(45deg, #7c3aed, #9333ea);
}

.button-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover, .btn-secondary:focus {
  background: linear-gradient(45deg, #7c3aed, #9333ea);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Sections */
section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: auto;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease-out forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }

section h2 {
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 16px;
  background: linear-gradient(45deg, #f8fafc, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(45deg, #8b5cf6, #f59e0b);
  transform: translateX(-50%);
}

/* Projects Grid */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

/* Card */
.card {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.4s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: left 0.6s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-12px) scale(1.03);
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 15px;
  color: #f8fafc;
}

/* About Box */
#about {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-box {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  max-width: 800px;
  width: 100%;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.about-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: left 0.6s;
}

.about-box:hover::before {
  left: 100%;
}

.about-box:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.about-box p {
  color: #e2e8f0;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

/* LinkedIn Card */
#social {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.linkedin-card {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  width: 100%;
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.linkedin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: left 0.6s;
}

.linkedin-card:hover::before,
.linkedin-card:focus::before {
  left: 100%;
}

.linkedin-card:hover,
.linkedin-card:focus {
  transform: translateY(-8px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.linkedin-logo {
  flex: 0 0 64px;
  height: 64px;
  width: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #0a66c2;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.linkedin-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.linkedin-name {
  color: #f8fafc;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
}

.linkedin-role {
  color: #e2e8f0;
  font-size: 1rem;
}

.linkedin-action {
  color: #c4b5fd;
  font-weight: 600;
  margin-top: 8px;
}

/* Contact Box */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-box {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  max-width: 500px;
  width: 100%;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: left 0.6s;
}

.contact-box:hover::before {
  left: 100%;
}

.contact-box:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.contact-box p {
  margin: 15px 0;
  font-size: 1.1rem;
}

.contact-box a {
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-box a:hover {
  color: #f59e0b;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 18px 20px;
    flex-direction: column;
    gap: 16px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  nav {
    width: calc(100% - 40px);
    max-width: 0;
    gap: 4px;
    padding: 0;
    border-radius: 20px;
    right: 20px;
    top: calc(100% + 12px);
    flex-wrap: wrap;
    justify-content: center;
    transform: translateY(-8px);
  }

  nav a {
    flex: 1 1 72px;
    width: auto;
    text-align: center;
    padding: 7px 8px;
  }

  .site-nav.is-open {
    max-width: calc(100% - 40px);
    transform: translateY(0);
  }

  .hero {
    height: 80vh;
    padding: 20px;
  }

  .hero::after {
    inset: 14px;
    border-radius: 20px;
  }

  .hero h2 {
    font-size: 2.5rem;
  }

  section {
    padding: 60px 20px;
  }

  section h2 {
    font-size: 2rem;
  }

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

  .linkedin-card {
    flex-direction: column;
    text-align: center;
  }

  .linkedin-details {
    text-align: center;
  }

  .card {
    padding: 25px;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #312e81 100%);
  background-size: 400% 400%;
  border-top: 1px solid rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(10px);
  color: #c4b5fd;
  animation: gradientShift 8s ease infinite;
  position: relative;
}

footer > * {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
