* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
  font-family: "Poppins";
}
:root {
  --bg-color: #080808;
  --second-bg-color: #101010;
  --text-color: #e0eaff;
  --main-color: #2563eb;
  --main-color-light: #3b82f6;
  --main-color-dark: #1e40af;
}
html {
  font-size: 60%;
  overflow-x: hidden;
}

/* General Styles */
body {
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
}

.header {
  width: 100%;
  position: fixed;
  top: 0; left: 0;
  background: rgba(8,8,8,0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 8%;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  transition: background 0.3s;
}
.logo {
  font-size: 2.8rem;
  color: var(--main-color);
  font-weight: 700;
  letter-spacing: 2px;
}
.logo span {
  color: var(--text-color);
}
.navbar {
  display: flex;
  gap: 2.5rem;
}
.navbar a {
  color: var(--text-color);
  font-size: 1.7rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
  padding: 0.7rem 1.5rem;
  border-radius: 1.5rem;
  z-index: 1;
  overflow: hidden;
}
.navbar a.active, .navbar a:hover {
  color: var(--main-color);
  background: rgba(37,99,235,0.08);
  box-shadow: 0 2px 12px var(--main-color-light);
  transform: translateY(-2px) scale(1.08);
}
.navbar a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--main-color);
  transition: width 0.3s, left 0.3s;
  border-radius: 2px;
}
.navbar a:hover::after, .navbar a.active::after {
  width: 80%;
  left: 10%;
}

#menu-icon {
  font-size: 3rem;
  color: var(--main-color);
  cursor: pointer;
  display: none;
}

/* Hero Section */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  padding: 10rem 8% 4rem 8%;
  background: var(--bg-color);
  gap: 4rem;
}
.home-content {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.home-content h1 {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--text-color);
}
.home-content h1 span {
  color: var(--main-color);
}
.text-animation {
  color: var(--main-color);
  font-size: 2.2rem;
  font-weight: 600;
  min-height: 3.5rem;
  letter-spacing: 1px;
  animation: fadeInText 2s cubic-bezier(.4,0,.2,1);
}
.home-content p {
  font-size: 1.7rem;
  color: #ccc;
}
.btn-box {
  display: flex;
  gap: 2rem;
}
.btn {
  background: var(--main-color);
  color: #fff;
  padding: 1.2rem 3rem;
  border-radius: 3rem;
  font-size: 1.6rem;
  font-weight: 600;
  box-shadow: 0 4px 24px var(--main-color-light);
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: #fff;
  color: var(--main-color);
  transform: translateY(-3px) scale(1.05);
  border: 2px solid var(--main-color);
}
.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.social-icons a {
  color: var(--main-color);
  font-size: 2.5rem;
  transition: color 0.3s, transform 0.2s;
}
.social-icons a:hover {
  color: #fff;
  transform: scale(1.2);
}
.home-img img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--main-color);
  box-shadow: 0 8px 32px var(--main-color-light);
  animation: floating 3s ease-in-out infinite;
}
@keyframes floating {
  0%, 100% { transform: translateY(0) scale(1.03); box-shadow: 0 8px 32px var(--main-color-light); }
  50% { transform: translateY(-18px) scale(1.07); box-shadow: 0 16px 48px var(--main-color-dark); }
}

/* About Section */
.about {
  display: flex;
  align-items: center;
  gap: 5rem;
  padding: 10rem 8% 4rem 8%;
  background: var(--second-bg-color);
  flex-wrap: wrap;
}
.about-img img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--main-color);
  box-shadow: 0 8px 32px var(--main-color-light);
}
.about-content {
  max-width: 600px;
}
.heading {
  font-size: 3.5rem;
  color: var(--main-color);
  margin-bottom: 2rem;
  display: inline-block;
  position: relative;
  padding: 0.7rem 1.5rem;
  border-radius: 1.5rem;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
}
.heading:hover, .heading:focus {
  color: var(--main-color);
  background: rgba(37,99,235,0.08);
  box-shadow: 0 2px 12px var(--main-color-light);
  transform: translateY(-2px) scale(1.08);
}
.heading::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--main-color);
  transition: width 0.3s, left 0.3s;
  border-radius: 2px;
}
.heading:hover::after, .heading:focus::after {
  width: 80%;
  left: 10%;
}
.about-content p {
  font-size: 1.7rem;
  color: #ccc;
  margin-bottom: 2rem;
}
.about-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
  color: #fff;
}
.about-info span {
  color: var(--main-color);
  font-weight: 600;
}

/* Skills Section */
.skills {
  background: var(--bg-color);
  padding: 8rem 8% 4rem 8%;
}
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
  margin-top: 3rem;
}
.skill-box {
  background: var(--second-bg-color);
  border-radius: 2rem;
  box-shadow: 0 4px 24px rgba(234,88,12,0.08);
  padding: 3rem 2.5rem;
  text-align: center;
  min-width: 160px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.skill-box:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 32px var(--main-color-light);
}
.skill-box i {
  font-size: 4rem;
  color: var(--main-color);
  margin-bottom: 1rem;
}
.skill-box h3 {
  font-size: 2rem;
  color: #fff;
}
.skill-box img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 2px 8px #0001;
  display: block;
  margin: 0 auto 0.5rem auto;
}
.skill-img-rounded {
  background: #fff !important;
  border-radius: 6px !important;
}

/* Projects Section */
.projects {
  background: var(--second-bg-color);
  padding: 8rem 8% 4rem 8%;
}
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}
.project-card {
  background: var(--bg-color);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--main-color-light), 0 2px 16px var(--main-color-dark);
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), box-shadow 0.5s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  animation: floating 3s ease-in-out infinite;
}
.project-card:hover {
  transform: translateY(-16px) scale(1.04) rotate(-1deg);
  box-shadow: 0 16px 48px var(--main-color), 0 2px 16px var(--main-color-light);
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid var(--main-color);
  filter: drop-shadow(0 4px 16px var(--main-color-light));
  transition: filter 0.3s;
}
.project-card:hover img {
  filter: drop-shadow(0 8px 32px var(--main-color));
}
.project-info {
  padding: 2.5rem 2rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
  background: rgba(30,64,175,0.08);
  border-radius: 0 0 2rem 2rem;
  position: relative;
  justify-content: space-between;
  min-height: 260px;
}
.project-info h3 {
  font-size: 2.1rem;
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px var(--main-color-light);
}
.project-info p {
  font-size: 1.5rem;
  color: #c7e0ff;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.project-links {
  display: flex;
  gap: 1.2rem;
  margin-top: auto;
  align-items: flex-end;
}
.project-links .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  padding: 1rem 1.6rem;
  border-radius: 50%;
  background: var(--main-color);
  color: #fff;
  box-shadow: 0 4px 24px var(--main-color-light);
  transition: background 0.3s, color 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
  outline: none;
}
.project-links .btn:hover {
  background: #fff;
  color: var(--main-color);
  transform: scale(1.15) rotate(-8deg);
  box-shadow: 0 8px 32px var(--main-color);
}
@media (max-width: 800px) {
  .project-card img { height: 140px; }
  .project-info { padding: 1.5rem 1rem 1rem 1rem; }
}

/* CV Section */
.cv {
  background: var(--bg-color);
  padding: 8rem 8% 4rem 8%;
  text-align: center;
}
.cv-content {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.cv-preview, .cv-preview iframe {
  display: none !important;
}

/* Contact Section */
.contact {
  background: var(--second-bg-color);
  padding: 8rem 8% 4rem 8%;
  text-align: center;
}
.contact-form {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
.input-box {
  display: flex;
  gap: 2rem;
  width: 100%;
  max-width: 600px;
}
.input-box input, textarea {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border-radius: 1rem;
  border: none;
  background: var(--bg-color);
  color: #fff;
  font-size: 1.5rem;
  resize: none;
  box-shadow: 0 2px 8px rgba(234,88,12,0.08);
}
textarea {
  min-height: 120px;
}
.contact-form .btn {
  margin-top: 1rem;
}

/* Footer */
.footer {
  background: var(--bg-color);
  color: #fff;
  padding: 2rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.4rem;
  border-top: 1px solid #222;
}
.footer-iconTop a {
  color: var(--main-color);
  font-size: 2.5rem;
  transition: color 0.3s, transform 0.2s;
}
.footer-iconTop a:hover {
  color: #fff;
  transform: scale(1.2);
}
.footer-socials {
  display: flex;
  gap: 1.5rem;
}
.footer-socials a {
  font-size: 2.2rem;
  transition: color 0.3s, transform 0.2s;
}
.footer-socials a:hover {
  color: var(--main-color-light) !important;
  transform: scale(1.2);
}

/* Add reveal animation for scroll */
section, .project-card, .skill-box {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
section.active, .project-card.active, .skill-box.active {
  opacity: 1;
  transform: none;
}

/* Sticky header effect */
.header.sticky {
  background: var(--second-bg-color);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* Typing animation caret */
.text-animation span::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--main-color);
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Publications Section */
.publications {
  background: var(--bg-color);
  padding: 8rem 8% 4rem 8%;
}

.publications-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.publication-card {
  background: var(--second-bg-color);
  border-radius: 2rem;
  padding: 2.8rem 2.5rem;
  box-shadow: 0 8px 32px var(--main-color-light);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
}

.publication-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 16px 48px var(--main-color);
}

.pub-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
}

.pub-meta {
  font-size: 1.5rem;
  color: #c7e0ff;
  line-height: 1.5;
}

.pub-links {
  margin-top: auto;
  display: flex;
  gap: 1.2rem;
}

.pub-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--main-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 24px var(--main-color-light);
  transition: transform 0.3s, background 0.3s;
}

.pub-link:hover {
  background: #fff;
  color: var(--main-color);
  transform: scale(1.2) rotate(-10deg);
}


/* Experience Section */
.experience {
  background: var(--second-bg-color);
  padding: 8rem 8% 4rem 8%;
}

.experience-content {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  justify-content: flex-start;
}
.experience-logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 24px #2196f399, 0 0 0 8px #fff;
  padding: 10px;
  transition: transform 0.5s cubic-bezier(.4,2,.6,1), box-shadow 0.4s;
  animation: logo-pop 2s cubic-bezier(.4,2,.6,1) 1;
  display: block;
  margin: 0 auto;
}
.animated-logo img:hover {
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 8px 32px #3b82f6cc, 0 0 0 12px #fff;
  filter: brightness(1.15) drop-shadow(0 0 12px #2563eb88);
}
.experience-details {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.experience-details h3 {
  font-size: 2.1rem;
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}
.company-link {
  color: var(--main-color-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.company-link:hover {
  color: var(--main-color);
  text-decoration: underline;
}
.experience-details p,
.experience-details ul {
  font-size: 1.5rem;
  color: #c7e0ff;
  margin-bottom: 0.2rem;
}
.experience-date {
  color: #90caf9;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.experience-details ul {
  margin-left: 1.5rem;
  list-style: disc;
}
@media (max-width: 800px) {
  .experience-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .experience-logo img {
    width: 60px;
  }
}
@media (max-width: 1100px) {
  html { font-size: 55%; }
  .home, .about { flex-direction: column; text-align: center; }
  .home-img, .about-img { margin: 0 auto; }
}
@media (max-width: 800px) {
  html { font-size: 50%; }
  .header { padding: 2rem 4%; }
  .home, .about, .skills, .projects, .cv, .contact, .footer { padding-left: 4%; padding-right: 4%; }
}
@media (max-width: 600px) {
  .navbar { display: none; flex-direction: column; background: var(--bg-color); position: absolute; top: 100%; right: 0; width: 100%; text-align: right; padding: 2rem 0; }
  .navbar.active { display: flex; }
  #menu-icon { display: block; }
  .home-img img, .about-img img { width: 180px; height: 180px; }
  .skills-container, .projects-container { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 1rem; }
}

.btn-box-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.btn-box-row .btn {
  min-width: 160px;
  text-align: center;
  margin-bottom: 0;
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

::-webkit-scrollbar {
  width: 8px;
  background: var(--second-bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--main-color);
  border-radius: 8px;
}
.floating-name span {
  display: inline-block;
  color: var(--main-color);
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: none !important;
  background: none !important;
  transition: color 0.3s, transform 0.3s;
  cursor: pointer;
  animation: none !important;
  position: relative;
}
.floating-name span::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--main-color-light), var(--main-color), var(--main-color-dark));
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1), left 0.35s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
.floating-name span:hover::after {
  width: 90%;
  left: 5%;
}

.text-animation.glow {
  color: var(--main-color);
  text-shadow: 0 0 8px var(--main-color-light), 0 0 24px var(--main-color), 0 0 48px var(--main-color-dark);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  animation: glowText 2s infinite alternate;
}
@keyframes glowText {
  from { text-shadow: 0 0 8px var(--main-color-light), 0 0 24px var(--main-color); }
  to { text-shadow: 0 0 24px var(--main-color), 0 0 48px var(--main-color-dark); }
}