

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
  --primary-color: #00bcd4;
  --secondary-color: #333;
  --bg-color: #f0f8ff;
  --text-color: #444;
  --card-bg-color: #ffffff;
  --shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  --dark-bg-color: #1a1a2e;
  --dark-text-color: #e0e0e0;
  --dark-card-bg-color: #16213e;
  --dark-primary-color: #0f3460;
  --dark-secondary-color: #537895;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body{
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.5s, color 0.5s;
}

section{
  padding: 80px 100px;
}

.title{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.section-title{
  position: relative;
  color: var(--primary-color);
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 25px;
}

.section-title:before{
  content: '';
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.title p{
  font-size: 1.1em;
  max-width: 800px;
  text-align: center;
}

.reveal{
  position: relative;
  transform: translateY(150px);
  opacity: 0;
  transition: all 1.5s ease;
}

.reveal.active{
  transform: translateY(0);
  opacity: 1;
}

/* Header */
header{
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 100px;
  transition: 0.6s;
}

header.sticky{
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 15px 100px;
}

header .brand{
  color: var(--primary-color);
  font-size: 2em;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

header .navigation a{
  color: var(--primary-color);
  font-size: 1.1em;
  font-weight: 500;
  text-decoration: none;
  margin-left: 30px;
  padding: 5px 0;
  transition: color 0.3s;
}

header .navigation a:hover{
  color: #007bff;
}

/* Main Section */
.main{
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.main .content{
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.main .content h1{
  color: #fff;
  font-size: 2.5em;
  font-weight: 600;
  line-height: 1.2;
}

.main .content h1 span{
  font-size: 1.5em;
  font-weight: 700;
  color: var(--primary-color);
}

.animated-text{
  position: relative;
  height: 70px;
  overflow: hidden;
  margin-top: 10px;
}

.animated-text h3{
  color: #fff;
  font-size: 2.5em;
  font-weight: 700;
  line-height: 70px;
  letter-spacing: 1px;
  position: absolute;
  opacity: 0;
  animation: slide 12s linear infinite;
}

@keyframes slide {
  0%{ opacity: 0; transform: translateY(100%); }
  8%{ opacity: 1; transform: translateY(0); }
  33%{ opacity: 1; transform: translateY(0); }
  41%{ opacity: 0; transform: translateY(-100%); }
  100%{ opacity: 0; transform: translateY(-100%); }
}

.animated-text h3:nth-child(2){
  animation-delay: 4s;
}

.animated-text h3:nth-child(3){
  animation-delay: 8s;
}

.btn{
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.1em;
  font-weight: 500;
  padding: 12px 25px;
  margin-top: 20px;
  text-decoration: none;
  border-radius: 5px;
  letter-spacing: 1px;
  transition: 0.3s;
}

.btn:hover{
  background: #007bff;
  transform: scale(1.05);
}

.media-icons{
  margin-top: 40px;
}

.media-icons a{
  color: #fff;
  font-size: 2em;
  margin-right: 25px;
  transition: color 0.3s, transform 0.3s;
}

.media-icons a:hover{
  color: var(--primary-color);
  transform: scale(1.2);
}


/* About Section */
.about .content{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.about .col-left{
  flex-basis: 45%;
}

.about .col-right{
  flex-basis: 55%;
}

.about .img-card{
  position: relative;
  width: 100%;
  min-height: 450px;
}

.about .img-card img{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.content-title{
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.paragraph-text{
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* Education Section */
#education {
    background-color: #fff;
}
.education .content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}
.timeline {
    position: relative;
    width: 100%;
    padding: 20px 0;
}
.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-color);
}
.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 40px;
}
.timeline-item:nth-child(odd) {
    padding-right: 40px;
    text-align: right;
    left: 0;
}
.timeline-item:nth-child(even) {
    padding-left: 40px;
    left: 50%;
}
.timeline-item:before {
    content: '';
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid #fff;
    z-index: 1;
}
.timeline-item:nth-child(odd):before {
    right: -8px;
}
.timeline-item:nth-child(even):before {
    left: -8px;
}
.timeline-content {
    background: var(--card-bg-color);
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.timeline-content h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.timeline-content h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}
.timeline-content .date {
    font-size: 0.9em;
    font-weight: 500;
    color: #777;
    display: block;
    margin-bottom: 10px;
}
.timeline-content p {
    line-height: 1.6;
}

/* Skills Section */
#skills {
    background-color: var(--bg-color);
}
.skills .content{
  display: flex;
  justify-content: space-between;
  gap: 40px;
}
.skills .col-left{
  flex-basis: 50%;
}
.skills .col-right{
  flex-basis: 50%;
}
.bar{
  margin-bottom: 20px;
}
.bar .info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.bar .info span{
  font-size: 1.1em;
  font-weight: 500;
}
.bar .line{
  position: relative;
  width: 100%;
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
}
.bar .line:before{
  content: '';
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  background: var(--primary-color);
  border-radius: 5px;
}
.python:before{ width: 90%; }
.c:before{ width: 70%; }
.mathematica:before{ width: 65%; }
.gnuplot:before{ width: 80%; }
.latex:before{ width: 95%; }

/* Services/Interests Section */
.services .content{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.services .card{
  background: var(--card-bg-color);
  width: 340px;
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s;
}
.services .card:hover{
  transform: translateY(-10px);
}
.service-icon{
  color: var(--primary-color);
  font-size: 3.5em;
  margin-bottom: 20px;
}
.info h3{
  color: var(--secondary-color);
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
}
.info p{
  line-height: 1.6;
}

/* Work Section */
#work {
    background: #fff;
}
.work .content{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.work .card{
  width: 340px;
  background: var(--card-bg-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s;
}
.work .card:hover{
    transform: translateY(-10px);
}
.card-img{
  width: 100%;
  height: 200px;
}
.card-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-info{
    padding: 20px;
}
.card-info h3{
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
}
.card-info p {
    font-size: 0.95em;
    margin-bottom: 15px;
    height: 60px; /* Limit height */
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-info a{
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.card-info a i {
    vertical-align: middle;
    margin-left: 5px;
}

/* Hobbies Section */
.hobbies .content{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.hobby-card{
    background: var(--card-bg-color);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.hobby-card:hover{
    transform: translateY(-10px);
}
.hobby-icon i{
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.hobby-card h4{
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
}

/* More Info Section */
#more-info .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
#more-info .content p {
    font-size: 1.1em;
    max-width: 800px;
    margin-bottom: 25px;
}

/* Contact Section */
#contact {
    background: #fff;
}
.contact .content{
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.contact .row{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.contact .row .card{
  background: var(--card-bg-color);
  width: 240px;
  margin: 20px;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: var(--shadow);
  border-radius: 10px;
}
.contact-icon{
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.contact .info h3{
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 5px;
}
.contact .info span{
  color: #555;
  font-weight: 500;
}

/* Footer */
.footer{
  background: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: 2em;
}
.footer .footer-title{
  font-size: 1.3em;
  font-weight: 600;
}
.footer p{
  font-size: 1em;
  margin-top: 10px;
}

/* Scroll To Top Button */
.scrollToTop-btn{
  z-index: 998;
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.8em;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s, transform 0.3s;
  transform: translateY(20px);
}
.scrollToTop-btn.active{
  opacity: 1;
  transform: translateY(0);
}
.scrollToTop-btn:hover{
    background: #007bff;
}

/* Media Queries for Responsiveness */
@media (max-width: 1040px){
  header{
    padding: 15px 40px;
  }
  header.sticky{
    padding: 10px 40px;
  }
  section{
    padding: 80px 40px;
  }
  .main .content h1{
    font-size: 2em;
  }
  .animated-text h3{
    font-size: 2em;
  }
  .about .content, .skills .content{
    flex-direction: column;
  }
  .about .col-left, .about .col-right, .skills .col-left, .skills .col-right{
    flex-basis: 100%;
    width: 100%;
  }
  .about .img-card{
    min-height: 300px;
  }
}

@media (max-width: 767px){
  body.nav-active{
    overflow: hidden;
  }
  .menu-btn{
    background: url(https://raw.githubusercontent.com/santanu-p/personal-webpage/main/images/menu.png) no-repeat;
    background-size: 30px;
    background-position: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: 0.3s;
  }
  .menu-btn.active{
    z-index: 999;
    background: url(https://raw.githubusercontent.com/santanu-p/personal-webpage/main/images/close.png) no-repeat;
    background-size: 25px;
    background-position: center;
  }
  header .navigation{
    display: none;
  }
  header .navigation.active{
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
  }
  header .navigation a{
    font-size: 1.5em;
    margin: 15px 0;
    color: var(--secondary-color);
  }
  .main .content h1{
    font-size: 1.8em;
  }
  .animated-text h3{
    font-size: 1.8em;
  }
  .section-title{
    font-size: 1.8em;
  }
  
  .timeline:before {
    left: 20px;
  }
  .timeline-item {
      width: 100%;
      padding-left: 50px;
      padding-right: 0;
  }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
      left: 0;
      text-align: left;
  }
  .timeline-item:nth-child(odd):before,
  .timeline-item:nth-child(even):before {
      left: 12px;
  }
}