* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: var(--text-color);
}

html {
  scroll-behavior: smooth;
  height: 100%;
  scroll-padding-top: 90px;
}

body,
h1,
h2,
h3,
h5,
h4,
p,
h6,
a,
span,
li,
button {
  color: var(--text-color);
}

:root {
  --bg-color: #29333a;
  --text-color: #ededed;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: var(--text-color);
  background: var(--bg-color);
  margin: 60px 10px 0;
  overflow-x: hidden;
}

html.light-mode {
  --bg-color: #f5f5f5;
  --text-color: #111111;
}



main {
  flex: 1;
  padding: 20px 0;
  width: 100%;
}

/* Home Section */
.Home {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 80px 8% 50px;
  min-height: 100vh;
  gap: 40px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
}

.Home-Content {
  max-width: 600px;
  animation: fadeInUp 1s ease forwards;
}

.Home-Content .intro {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 8px;
}

.Home-Content .name {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(90deg, #00abf0, #0ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.Home-Content .role {
  font-size: 28px;
  margin: 12px 0;
  color: var(--text-color);
}

.Home-Content span {
  color: #0ef;
  font-weight: bold;
}

.Home-Content .tagline {
  font-size: 17px;
  line-height: 1.6;
  margin-top: 12px;
  color: var(--text-color);
  opacity: 0.85;
}

.Home-sci {
  margin-top: 25px;
}

.Home-sci a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  margin-right: 12px;
  border-radius: 50%;
  border: 2px solid #0ef;
  color: #0ef;
  font-size: 20px;
  transition: all 0.4s ease;
}

.Home-sci a:hover {
  background: #0ef;
  color: var(--bg-color);
  box-shadow: 0 0 15px #0ef;
}

.resume-btn {
  margin-top: 25px;
}

.resume-btn .btn {
  display: inline-block;
  padding: 12px 28px;
  background: #0ef;
  color: var(--bg-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.resume-btn .btn:hover {
  background: #0099cc;
  box-shadow: 0 0 15px #0ef;
}

.card-container {
  display: flex;
  justify-content: center;
  margin: auto;
  width: 100%;
  max-width: 280px;
  height: 340px;
  perspective: 1000px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
  border-radius: 16px;
  cursor: pointer;
}
.card-text {
  color: #111111 !important; 
}

.card-text h2,
.card-text p,
.card-text a,
.card-text i{
  color: #111111 !important; 
}


.card-container:hover .card {
  transform: rotateY(180deg);
}

.side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.front {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #d9d9d9; 
}

.front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back {
  background: var(--bg-color);
  color: var(--text-color);
  transform: rotateY(180deg);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-image {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #0ef;
  box-shadow: 0 0 15px rgba(0, 171, 240, 0.4);
  margin: 0 auto 12px;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-back-card h2 {
  margin: 10px 0 5px;
  font-size: 22px;
  color: #0ef;
}

.profile-back-card p {
  font-size: 15px;
  margin: 4px 0;
  color: var(--text-color);
  opacity: 0.85;
}

.back-links {
  margin-top: 12px;
}

.back-links a {
  margin: 0 8px;
  font-size: 22px;
  color: #0ef;
  transition: color 0.3s ease;
}

.back-links a:hover {
  color: #0099cc;
}
/* About Section */
#about {
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 80px 8% 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#about .title {
  text-align: center;
  margin-bottom: 50px;
}

#about .sub-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
}

#about .sub-title span {
  color: #0ef;
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.about .card-container {
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  height: 400px;
}

.about .card {
  border-radius: 18px;
}

.about .front {
  background: #d9d9d9;
}

.about .front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text {
  flex: 1.2;
  min-width: 320px;
  
}

.about-text h4 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #0ef;
}

.about-text p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.9;
}
.profile-back-card{
 text-align: center; 
}

@media (max-width: 900px) {
  .about {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .about .card-container {
    margin: 0 auto;
  }

  .about-text {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .Home {
    flex-direction: column-reverse;
    text-align: center;
    padding: 60px 20px;
  }

  .Home-Content {
    max-width: 100%;
  }

  .card-container {
    margin-top: 30px;
  }

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

/* ===========================
   Animations
=========================== */
@keyframes fadeInUp {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInDown {
  0% { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Section Titles */
.title {
  text-align: center;
  margin-bottom: 30px;
}

.sub-title {
  font-size: 40px;
  font-weight: bold;
  color: var(--text-color);
}

.sub-title span {
  color: #0ef;
}

.skills {
  padding: 60px 20px;
  background: transparent;
  text-align: center;
  color: var(--text-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.skill-card {
  height: 150px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-6px) scale(1.03);
  background: rgba(0, 238, 255, 0.15);
  border-color: #0ef;
  box-shadow: 0 6px 18px rgba(0, 238, 255, 0.25);
}

.skill-card img {
  height: 45px;
  width: auto;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.skill-card:hover img {
  transform: scale(1.1);
}

.skill-card p {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}






/* Projects */
#Projects {
  padding: 50px 10px;
  min-height: 100vh;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.project-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.project-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-box img {
  width: 100%;
  height: 100%;
  display: block;
}

.project-box:hover img {
  transform: scale(1.1);
}

.project-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
  text-align: center;
  padding: 15px;
}

.project-box:hover .project-layer {
  opacity: 1;
}

.project-layer h4 {
  margin-bottom: 10px;
  color: #eee;
}

.project-layer a {
  margin-top: 10px;
  padding: 8px 14px;
  background: #ffcc00;
  color: #333;
  border-radius: 6px;
  text-decoration: none;
}

.project-layer a:hover {
  background: #ff9900;
}

.project-layer p {
  color: #eee !important;
}

/* Experience Section */
#Experience {
  padding: 50px 10px;
  min-height: 100vh;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #007bff;
  transform: translateX(-50%);
}

.timeline-item {
  width: 50%;
  padding: 20px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-content {
  background: #1f1f1f;
  padding: 20px;
  border-radius: 10px;
}

.exp-date {
  color: #aaa;
  font-size: 14px;
  display: block;
  margin-bottom: 10px;
}

/* Services */
#Services {
  padding: 40px 10px;
  min-height: 100vh;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.services-list div {
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 20px #0ef;
  transition: transform 0.3s;
}

.services-list div:hover {
  transform: translateY(-10px);
}

.services-list i {
  font-size: 40px;
  margin-bottom: 20px;
}

.read {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #0ef;
  color: #081b29;
  border-radius: 20px;
  text-decoration: none;
  transition: 0.3s;
}

.read:hover {
  box-shadow: 0 0 10px #0ef;
}

/* Contact */
#contact {
  padding: 50px 10px;
  display: flex;
  justify-content: center;
}

.contact-container {
  width: 100%;
  max-width: 800px;
  background-color: transparent;
  padding: 20px;
  border-radius: 10px;
  opacity: 0;
  animation: slideTop 1s ease forwards;
  animation-delay: 1s;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #020408;
  color: white;
  font-size: 14px;
  outline: none;
}

input:hover,
textarea:hover {
  border: #00aaff solid 1px;
}

textarea {
  resize: none;
  height: 150px;
}

.submit-btn {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #3498db;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}

.submit-btn:hover {
  background: #2980b9;
}

/* Footer */
footer {
  background: linear-gradient(to right, #2c3e50, #3498db);
  color: white;
  text-align: center;
  padding: 20px 10px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0px -5px 15px rgba(0, 0, 0, 0.2);
  width: 100%;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

footer .footer-info {
  font-size: 14px;
  color: #bbb;
}

footer .footer-info a {
  color: #bbb;
  text-decoration: none;
}

footer .footer-info a:hover {
  color: white;
}

footer .social-icons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

footer .social-icons a {
  font-size: 20px;
  color: white;
}

footer .social-icons a:hover {
  color: #00aaff;
}





.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  /* can also use translateX */
  transition: all 0.8s ease-out;
  will-change: opacity, transform;
}

.scroll-reveal.show {
  opacity: 1;
  transform: translateY(0);
}




.from-left {
  transform: translateX(-100px);
}

.from-right {
  transform: translateX(100px);
}

.from-bottom {
  transform: translateY(100px);
}



/* Scroll Up Button */
.scroll-up {
  background-color: #00aaff;
  padding: 0.8rem;
  border-radius: 0.8rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease;
}

.scroll-up:hover {
  transform: scale(1.1);
  background-color: #5aa0c3;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {

  .Home,
  .about {
    flex-direction: column;
    text-align: center;
  }

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

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

  section {
    padding: 10px;
    align-items: center;
    text-align: center;
  }

  footer {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .profile-back-card {
    color: black;
  }

  .profile-back-card h2,
  .profile-back-card p,
  .profile-back-card a,
  .profile-back-card i {
    color: black !important;
  }
}



@keyframes slideRight {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }

  100% {
    transform: translateX(0px);
    opacity: 1;
  }

}

@keyframes slideLeft {
  0% {
    transform: translateX(100px);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideTop {
  0% {
    transform: translateY(100px);
    opacity: 0;
  }

  100% {
    transform: translateY(0px);
    opacity: 1;
  }
}

@keyframes slideBottom {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }

  100% {
    transform: translateY(0px);
    opacity: 1;
  }
}

/* Tablets (portrait) */
@media (max-width: 992px) {
  .Home h1 {
    font-size: 36px;
  }

  .Home-Content p {
    font-size: 14px;
  }

  .about-img {
    margin: 0 auto;
  }
}

/* Small devices (phones) */
@media (max-width: 576px) {

  .header {
    padding: 10px 3%;
    flex-direction: column;
  }

  .navbar a {
    font-size: 18px;
    margin: 5px;
  }

  .Home h1 {
    font-size: 28px;
  }

  .Home-Content h3 {
    font-size: 20px;
  }

  .title,
  .sub-title {
    font-size: 30px;
  }

  .radial-bars {
    width: 90px;
    height: 90px;
  }

  .services-list,
  .projects-list {
    grid-template-columns: 1fr;
  }

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

  .timeline-item {
    padding-left: 20px;
  }

  .card-container {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
  }

  .card {
    max-width: 100%;
    width: 100%;
  }

  .side.front img.front-img {
    width: 100%;
    height: auto;
    display: block;
  }

  .profile-back-card {
    padding: 10px;
    text-align: center;
  }

  .profile-back-card h2,
  .profile-back-card p {
    color: var(--text-color);
  }

  .back-links a {
    font-size: 20px;
    margin: 0 10px;
    color: var(--text-color);
  }
}


@media (max-width: 768px) {

  .Home,
  .about,
  .skills-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text {
    margin-top: 20px;
  }

  .card-container {
    margin: 20px 0;
  }
}


@media (max-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
  }

  .logo {
    font-size: 20px;
    margin-right: auto;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
    font-size: 24px;
    color: white;
    cursor: pointer;
  }

  .navbar {
    position: absolute;
    top: 60px;
    left: 0;
    background: #222;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 20px;
    display: none;
  }

  .navbar.active {
    display: flex;
  }

  .navbar a {
    padding: 10px 0;
    text-align: left;
    width: 100%;
    font-size: 18px;
  }
}