/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease-out;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--primary-color);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3b82f6;
  --secondary-color: #1d4ed8;
  --accent-color: #f59e0b;
  --dark-color: #111827;
  --light-color: #f9fafb;
  --gray-color: #6b7280;
  --transition: all 0.3s ease-in-out;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  color: var(--dark-color);
  background-color: var(--light-color);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn-disabled {
  background: var(--gray-color);
  cursor: not-allowed;
}

.btn-disabled:hover {
  background: var(--gray-color);
  transform: none;
  box-shadow: none;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card,
.skill-category,
.timeline-item,
.achievement-item {
  animation: slideInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  opacity: 0;
}

.project-card:nth-child(1),
.skill-category:nth-child(1),
.timeline-item:nth-child(1),
.achievement-item:nth-child(1) {
  animation-delay: 0.1s;
}

.project-card:nth-child(2),
.skill-category:nth-child(2),
.timeline-item:nth-child(2),
.achievement-item:nth-child(2) {
  animation-delay: 0.2s;
}

.project-card:nth-child(3),
.skill-category:nth-child(3),
.timeline-item:nth-child(3),
.achievement-item:nth-child(3) {
  animation-delay: 0.3s;
}

.project-card:nth-child(4),
.skill-category:nth-child(4),
.timeline-item:nth-child(4),
.achievement-item:nth-child(4) {
  animation-delay: 0.4s;
}

.project-card:nth-child(5),
.timeline-item:nth-child(5) {
  animation-delay: 0.5s;
}

.project-card:nth-child(6),
.timeline-item:nth-child(6) {
  animation-delay: 0.6s;
}

section.animated .section-header h2,
section.animated .about-content,
section.animated .skills-container,
section.animated .projects-container,
section.animated .timeline,
section.animated .education-container,
section.animated .achievements-container,
section.animated .contact-container {
  animation: fadeIn 0.8s ease-out forwards;
}

section:not(.animated) .section-header h2,
section:not(.animated) .about-content,
section:not(.animated) .skills-container,
section:not(.animated) .projects-container,
section:not(.animated) .timeline,
section:not(.animated) .education-container,
section:not(.animated) .achievements-container,
section:not(.animated) .contact-container {
  opacity: 0;
}

/* Header & Navigation */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3e%3cg fill-rule='evenodd'%3e%3cg fill='%239C92AC' fill-opacity='0.1'%3e%3cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.nav-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin: 0 1.2rem;
}

.nav-link {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 28px;
  height: 4px;
  background: var(--dark-color);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #f9fafb;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 800'%3e%3crect fill='%23F9FAFB' width='1600' height='800'/%3e%3cg fill-opacity='0.4'%3e%3cpath fill='%23E0E7FF' d='M0 0h800v400H0z'/%3e%3cpath fill='%23C7D2FE' d='M800 0h800v400H800z'/%3e%3cpath fill='%23A5B4FC' d='M0 400h800v400H0z'/%3e%3cpath fill='%23818CF8' d='M800 400h800v400H800z'/%3e%3c/g%3e%3c/svg%3e");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 800px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
  z-index: 1;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 900;
  letter-spacing: -2px;
  animation: fadeInDown 1s ease-out;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  font-weight: 700;
  animation: fadeInDown 1s ease-out 0.2s both;
}

.hero h3 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  font-weight: 700;
  animation: fadeInDown 1s ease-out 0.2s both;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* About Section */
.about {
  padding: 5rem 0;
  background: white;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #334155;
}

/* Skills Section */
.skills {
  padding: 5rem 0;
  background: #f1f5f9;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.skill-category h3 i {
  margin-right: 10px;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.skill-category li:last-child {
  border-bottom: none;
}

.skill-logo {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-logo i {
  font-size: 2rem;
  margin-right: 15px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-logo i.fa-python {
  color: #3776ab;
}

.skill-logo i.fa-cuttlefish {
  color: #00599c;
}

.skill-logo i.fa-database {
  color: #4479a1;
}

.skill-logo i.fa-html5 {
  color: #e34f26;
}

.skill-logo i.fa-js {
  color: #f7df1e;
}

.skill-logo i.fa-brain {
  color: #f08080;
}

.skill-logo i.fa-network-wired {
  color: #000000;
}

.skill-logo i.fa-chart-line {
  color: #fca103;
}

.skill-logo i.fa-eye {
  color: #5c9c5c;
}

.skill-logo i.fa-cloud {
  color: #f9ab00;
}

.skill-logo i.fa-kaggle {
  color: #20beff;
}

.skill-logo i.fa-git {
  color: #f05133;
}

.skill-logo i.fa-code {
  color: #007acc;
}

.skill-logo i.fa-server {
  color: #000000;
}

.skill-logo i.fa-stream {
  color: #ff4b4b;
}

.skill-logo i.fa-react {
  color: #61dafb;
}

.skill-logo i.fa-node-js {
  color: #68a063;
}

/* Milestones Section */
.milestones {
    padding: 6rem 0;
    background: #f1f5f9;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 40px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 40px);
}

.timeline-year {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 40px -15px rgba(0,0,0,0.15);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent white transparent transparent;
}

.timeline-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.timeline-content p {
    color: var(--gray-color);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--light-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.4s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: var(--primary-color);
}

.project-skills {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-description {
    margin-bottom: 2.5rem;
    color: var(--gray-color);
    flex-grow: 1;
    line-height: 1.8;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-4px) scale(1.05);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.8rem;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn-disabled {
  background: var(--gray-color);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-disabled:hover {
  background: var(--gray-color);
  transform: none;
  box-shadow: none;
}

/* Achievements Section */
.achievements {
  padding: 5rem 0;
  background: #f1f5f9;
}

.achievements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.achievement-item {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.achievement-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.achievement-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.achievement-item p {
  color: #64748b;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background: white;
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-info {
  text-align: center;
  max-width: 600px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #64748b;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--dark-color);
  font-size: 1.1rem;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.contact-link i {
  width: 30px;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-right: 10px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: none;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media screen and (max-width: 992px) {
  .hero h1 {
    font-size: 3rem;
  }

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

  .hero p {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 15px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

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

  .hero p {
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    gap: 15px;
  }

  .timeline::before {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }
}

@media screen and (max-width: 576px) {
  .section-header h2 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .skills-container,
  .projects-container,
  .education-container,
  .achievements-container {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
