/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden;
    padding-top: 00 px;
    margin-top: 0;
  }
  
  /* Remove default mobile browser chrome */
  body::before {
    content: none;
  }
/* Navbar styling */
.navbar {
  background-color: #333;
  padding: 10px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar ul {
  flex-wrap: nowrap;
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar ul li {
  display: inline-block;
  margin: 0 20px;
  position: relative;
}

.navbar ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  padding: 5px 30px;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.navbar ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: rgb(126, 78, 222);
  transition: width 0.3s ease-in-out;
  bottom: -2px;
  left: 0;
}

.navbar ul li a:hover::after {
  width: 100%;
}

/* Hamburger menu button - hidden by default */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 5px 10px;
}

/* Mobile styles - screens smaller than 800px */
@media (max-width: 810px) {
  .navbar {
    justify-content: space-between;
    padding: 10px 20px;
  }
  .titlesection {
    margin-top:60px;
  }
  .menu-toggle {
    display: block;
  }

  .navbar ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #333;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .navbar ul.active {
    max-height: 500px;
  }

  .navbar ul li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  .navbar ul li a {
    display: block;
    padding: 15px 30px;
  }
}

  html {
    scroll-behavior: smooth;
  }
  
  /* First section - Desktop */
  .titlesection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    height: 100vh;
    padding: 0 10%;
    position: relative;
    background-size: cover;                     
    background-repeat: no-repeat;
    background-position: center center;
  }
  
  .title_header {
    font-size: 3rem;
    color: #1a1a1a;
  }
  
  .title_text {
    color: #1a1a1a;
    font-size: 1.4rem;
    text-align: left;
  }
  
  .title_item img {
    width: 500px;
    border-radius: 30%;
    display: block;
    position: relative;
    z-index: 1;
    margin-left: 100px;
    clip-path: polygon(
      25% 6.7%, 75% 6.7%,
      100% 50%,
      75% 93.3%, 25% 93.3%,
      0% 50%
    );
  }
  
  #see-more-btn {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
  }
  
  #see-more-btn:hover {
    background-color: #161616;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  }

  /* Responsive Design */
  @media (max-width: 1400px) {
    .title_header {
      font-size: 3rem;
    }
    
    .title_text {
      font-size: 1.2rem;
    }
    
    .title_item img {
      width: 400px;
      margin-left: 100px;
    }
  }
  
  @media (max-width: 850px) {
    .titlesection {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 100px 5% 60px;
      min-height: 100vh;
    }
  
    .title_item img {
      width: 300px;
      margin-left: 0;
      margin-top: 20px;
    }
  
    #see-more-btn {
      position: relative;
      bottom: auto;
      margin-top: 30px;
      transform: none;
      left: auto;
    }
  }


  /* Mobile phones - Improved layout */
  @media (max-width: 500px) {

    
    .titlesection {
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      padding: 40px 8% 40px; /* Reduced top padding since no navbar */
      min-height: 100vh;
      height: auto;
    }

    .title_item {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      text-align: center;
    }

    .title_header {
      font-size: 2rem;
      margin-bottom: 15px;
      text-align: center;
    }
    
    .title_text {
      font-size: 1rem;
      margin-bottom: 25px;
      text-align: center;
      max-width: 100%;
    }
  
    .title_item img {
      width: 200px;
      margin: 20px 0;
      align-self: center;
    }
  
    #see-more-btn {
      display: inline-block;
      position: relative;
      margin-top: 25px;
      bottom: auto;
      left: auto;
      transform: none;
    }
  }

  /* Very small screens - iPhone SE, etc */
  @media (max-width: 380px) {
    .title_header {
      font-size: 1.75rem;
    }
    
    .title_text {
      font-size: 0.95rem;
    }
    
    .title_item img {
      width: 180px;
    }
  }
  @media (max-height: 500px){
    .title_item img {
    width: 250px;
    }
    .title_header {
      font-size: 2rem;
      margin-bottom: 10px;
    }
    
    .title_text {
      font-size: 1.1rem;
      margin-bottom: 15px;
    }
  }

  /* Short screens in landscape */
  @media (max-height: 600px) and (max-width: 850px) {
    .titlesection {
      min-height: auto;
      padding: 80px 5% 40px;
    }
    
    .title_item img {
      width: 150px;
      margin: 15px 0;
    }
    
    .title_header {
      font-size: 1.5rem;
      margin-bottom: 10px;
    }
    
    .title_text {
      font-size: 0.9rem;
      margin-bottom: 15px;
    }
    
    #see-more-btn {
      margin-top: 15px;
      padding: 10px 20px;
      font-size: 0.9rem;
    }
  }

  /* Padding between sections */
  section {
    padding: 80px 5%;
  }
  
  #skills, #projects, #contact, #about, #journey, .hidden {
    padding: 50px 10%;
  }
  
  /* Timeline container*/
  .timeline {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #333;
    transform: translateX(-50%);
    z-index: 0;
  }
  
  .timeline-item {
    position: relative;
    margin: 20px 0;
    width: 100%;
  }
  
  .timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 25px; 
    height: 25px; 
    background-color: #333;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    transform: translate(-50%, -50%);
    z-index: 1;
  }
  
  .timeline-content {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 45%;
    z-index: 1;
  }
  
  .timeline-item.left .timeline-content {
    float: left;
    transform: translateX(-5%);
  }
  
  .timeline-item.right .timeline-content {
    float: right;
    transform: translateX(5%);
  }
  
  .timeline-item::after {
    content: "";
    display: table;
    clear: both;
  }
  
  @media screen and (max-width: 768px) {
    .timeline-content {
      width: 90%;
      float: none;
      margin: 0 auto;
      transform: none;
    }
  
    .timeline::before {
      left: 50%;
    }
  
    .timeline-item::before {
      left: 50%;
    }
  }
    
  h1 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: rgb(126, 78, 222)
  }
  
  h2 {
    font-size: 1.5rem;
    color: #333;
  }
  
  p {
    font-size: 1rem;
    color: #1a1a1a;
    margin-top: 10px;
  }
  
  .grid-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
  }
  
  .grid-item-skills {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .grid-item:hover {
    transform: translateY(-10px);
    cursor: pointer;
  }
  
  .grid-container-skills, .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-top: 1rem;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }

  @media (max-width: 1200px) {
    .grid-container-skills {
      grid-template-columns: repeat(2, 1fr);
    }
    .grid-container {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 1000px) {
    .grid-container {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 600px) {
    .grid-container-skills, .grid-container {
      grid-template-columns: 1fr;
    }
  }
  
  .hidden {
    display: none;
  }
  
  .hidden img {
    display: block;
    margin: 20px auto;
    padding: 10px;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    max-width: 600px;
  }

  @media (max-width: 768px) {
    .hidden img {
      max-width: 90%;
      max-height: 300px;
    }
  }

  #contact a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: bold;
  }

  #contact p {
    font-size: 1.2rem;
  }

  #contact a:hover {
    color: #a29bfe;
    text-decoration: underline;
  }

  /* Footer */
  footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
  }

  footer p {
    margin-bottom: 10px;
  }

  footer a {
    color: rgb(148, 55, 234);
    text-decoration: none;
  }