/* Reset default browser styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

header, footer {
  background-color: #282c34;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh; /* Adjust as needed */
  text-align: center;
  padding: 2rem;
}


header p {
  font-size: 1.2rem;
  font-weight: 300;
}

main {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}

section {
  background: white;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease-in-out;
}

section:hover {
  transform: scale(1.01);
}

h2 {
  color: #007acc;
  margin-bottom: 1rem;
}

ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

ul li {
  margin-bottom: 0.5rem;
}

a {
  color: #007acc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

form {
   max-width: 600px;
   margin: 0 auto;
   background-color: #f9f9f9;
   padding: 2rem;
   border-radius: 10px;
   box-shadow: 0 0 15px rgba(0,0,0,0.05);
  }
  
  form label {
   font-weight: 600;
   display: block;
   margin-bottom: 5px;
  }
  
  form input,
  form textarea {
   width: 100%;
   padding: 10px;
   margin-bottom: 1rem;
   border: 1px solid #ccc;
   border-radius: 5px;
   font-size: 1rem;
   font-family: inherit;
  }
  
  form input:focus,
  form textarea:focus {
   outline: none;
   border-color: #007acc;
   box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
  }
  
  form button {
   background-color: #007acc;
   color: white;
   padding: 12px 24px;
   border: none;
   border-radius: 5px;
   cursor: pointer;
   font-size: 1rem;
   transition: background-color 0.3s;
  }
  
  form button:hover {
    background-color: #005f99;
  }
  
  /* Confirmation message */
  .confirmation-message {
    margin-top: 1rem;
    text-align: center;
    color: green;
    font-weight: bold;
    display: none;
  }
  
  form:focus-within + .confirmation-message {
    display: block;
  }
  

  footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #000;
    color:  #007acc;
    font-size: 0.95rem;
    margin-top: 3rem;
  }
  
  footer a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
  }
  
  footer a:hover {
    text-decoration: underline;
  }

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  form input, form textarea {
    font-size: 0.95rem;
  }
}

.typing-text {
  width: 22ch; /* length of your text */
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--text-color, #000);
  font-family: monospace;
  font-size: 1.5rem;
  animation: typing 3s steps(22), blink 0.7s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 22ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}


/* 🌙 Dark Mode Toggle Label Style */
.toggle-label {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 10px 15px;
  background-color: #eee;
  color: #000;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: background-color 0.3s, color 0.3s;
}

/* Toggle Label in Dark Mode */
#dark-toggle:checked + .toggle-label {
  background-color: #222;
  color: #fff;
}

/* Apply dark mode styles when checkbox is checked */
#dark-toggle:checked ~ header,
#dark-toggle:checked ~ main,
#dark-toggle:checked ~ footer {
  background-color: #121212;
  color: #00BFFF;
}

#dark-toggle:checked ~ header h1,
#dark-toggle:checked ~ header .typing-text {
  color: #4682B4; /* SteelBlue or a darker blue tone */
}


#dark-toggle:checked ~ main button {
  background-color: #444;
  color: #fff;
  border: 1px solid #888;
}

#dark-toggle:checked ~ footer {
  background-color: #121212;
  color: #90caf9;
}

#dark-toggle:checked ~ footer a {
  color: #90caf9;
}

/* Fade-in slide animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal base style */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out forwards;
}

/* Delay for smooth effect on multiple elements */
.reveal.delay-1 {
  animation-delay: 0.2s;
}

.reveal.delay-2 {
  animation-delay: 0.4s;
}

.reveal.delay-3 {
  animation-delay: 0.6s;
}

.reveal.delay-4 {
  animation-delay: 0.8s;
}

.reveal.delay-5 {
  animation-delay: 1s;
}

.reveal.delay-6 {
  animation-delay: 1.2s;
}

.reveal.delay-7 {
  animation-delay: 1.4s;
}

html {
  scroll-behavior: smooth;
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #007BFF;
  color: white;
  padding: 10px 15px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  transition: background-color 0.3s, transform 0.3s;
}

.scroll-to-top:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

a:hover,
button:hover {
  background-color: #0056b3; /* Darker blue on hover */
  color: #fff;               /* White text */
  transform: scale(1.05);    /* Slight zoom */
  transition: all 0.3s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.project-card {
  width: 100%;
  height: 250px;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

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

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  backface-visibility: hidden;
  background-color: #f8f8f8;
  color: #222;
}

.card-back {
  transform: rotateY(180deg);
  background-color: #e0f7fa;
  color: #111;
}

.card-front h3,
.card-back h3 {
  margin-bottom: 0.5rem;
}

/* Skills section styling */
.skill {
  margin-bottom: 1.5rem;
}

.skill p {
  font-weight: bold;
  margin-bottom: 0.3rem;
}

/* Progress bar container */
.skill-bar {
  background-color: #ddd;
  border-radius: 20px;
  overflow: hidden;
  height: 14px;
}

/* Progress fill */
.skill-level {
  height: 100%;
  background-color: #00BFFF;
  width: 0;
  animation: fillSkill 2s ease-out forwards;
  border-radius: 20px;
}

/* Individual skill widths */
.skill-level.html {
  width: 95%;
}
.skill-level.js {
  width: 75%;
}
.skill-level.compiled {
  width: 85%;
}
.skill-level.react {
  width: 60%;
}

.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 30px;
  border-left: 3px solid #00BFFF;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 7px;
  width: 10px;
  height: 10px;
  background-color: #00BFFF;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 3px #00BFFF33;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1rem;
  color: #00BFFF;
}

.timeline-content p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.timeline-item-content {
  padding-left: 1.0rem;
}







  