/* General Styles */
/* You can add global styles to this file, and also import other style files */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
  --bg-var:black;
  --bg-star:white;
  --txt-color:white;
  --details-p-txt: rgba(234, 234, 247, 0.595);
  --toggle-bg: #444;
  --toggle-circle: #fff;
  --scroll-bg: rgba(0, 0, 0, 0.755);
}

.light-mode {
  --bg-var:white;
  --bg-star:black;
  --txt-color:black;
  --details-p-txt: rgba(26, 26, 26, 0.595);
  --toggle-bg: #ddd;
  --toggle-circle: #000;
  --scroll-bg: rgba(254, 254, 254, 0.755);

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: kanit;
}

html {
    scroll-behavior: smooth;
    
}
body {
  background-color:  var(--bg-var);
    color: var(--txt-color);
    
}


/* ----nav bar----- */
.nav-bar {
    width: 98.9vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    position: fixed;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.4s ease-in-out;
  }

  .nav-bar.scrolled {
    background-color: var(--scroll-bg);
    opacity: 0.98;
  }
  
  
  .nav-bar .logo h2 {
    margin-left: 30px;
    cursor: pointer;
  }

  .nav-bar .logo h2 span {
    background-image: linear-gradient(to right, #2575fc,#6a11cb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  }
  
  .nav-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 100px;
    transition: all 0.3s ease;
  }
  
  .nav-links ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .nav-links ul li {
    margin-right: 30px;
  }
  
  .nav-links ul li a {
    text-decoration: none;
    color: var(--txt-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
    position: relative;
  }
  .nav-links ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    transition: all 0.2s linear;
  }

  .nav-links ul li a:hover::after {
    width: 100%;
  }


  
  .nav-links ul li a:hover {
    color: grey;
  }
  
  .nav-links button {
    width: 130px;
    height: 50px;
    border-radius: 10px;
    outline: none;
    border: 1px solid var(--txt-color);
    cursor: pointer;
    background-color: transparent;
    color: var(--txt-color);
    font-size: 0.9rem;
    margin-right: 50px;
    position: relative;
    overflow: hidden;
  }
  
  .nav-links button::after {
    content: "";
    position: absolute;
    width: 0;
    height: 50px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    top: 0;
    left: 0;
    border-radius: 10px;
    z-index: -1;
    transition: width 0.5s ease;
  }
  
  .nav-links button:hover::after {
    width: 130px;

  }

  .nav-links button:hover {
    border: none;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar button {
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1.6rem;
    color: var(--txt-color);
    cursor: pointer;
    margin-right: 30px;
  }
  
  /* Responsive Styles */
  @media (max-width: 858px) {
    .nav-links {
      display: none;
      position: absolute;
      top: 100%;
      right: 0;
      background: var(--bg-var);
      width: 100%;
      flex-direction: column;
      align-items: center;
      z-index: 10;
      padding: 20px 0;
    }
  
    .nav-links.open {
      display: flex;
      transition: width 0.5s ease;
    }
  
    .nav-links ul {
      flex-direction: column;
    }
  
    .nav-links ul li {
      margin-bottom: 20px;
      margin-right: 0;
    }
  
    .sidebar {
      display: block;
    }
  }
  
  /* --------hero section---- */
  :root {
    --fs-h2: 2.5rem;
    --fs-p:1.1rem;
}

@media (max-width:858px) {
    :root {
        --fs-p:0.6rem;
        --fs-h2:1.1rem
    }
}

.stars {
  width: 100%;
  height: 100%;
  position: fixed;
  background-color: var(--bg-var);
  overflow: hidden;
  z-index: -1;
}

.star {
  position: absolute;
  background: var(--bg-star);
  opacity: 0.8;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}

.hero {
    padding-top: 50px;
    width: 100%;
    height: 100vh; /* Adjust for navbar */
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    background-size: cover;
    color: var(--txt-color);
}

.details {
    width: 100%;
    max-width: 700px;
    height: auto; 
    padding: 1rem;
    margin-left: 2rem;
    animation: slide-in 0.5s linear both;
}

@keyframes slide-in {
  from {
    transform: translateX(-100%);
  } to {
    transform: translateX(0);
  }
}

.name {
  background-image: linear-gradient(to right, #2575fc,#6a11cb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.details h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.details h3 {
  font-size: 1.6rem;
  font-weight: 500;
}

.details p {
    font-size: var(--fs-p);
    color: var(--details-p-txt);
    margin-bottom: 10px;
   
}

.details .icons {
    display: flex;
    gap: 1rem; 
    margin-top: 20px;
}

.details .icons a {
    color: inherit; 
    transition: transform 0.3s ease;
}

.details .icons a:hover {
    transform: scale(1.2); 
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
    }

    .details h2 {
        font-size: calc(var(--fs-h2) - 4px); 
    }

    .details p {
        font-size: calc(var(--fs-p) - 2px);
    }

    .details .icons a {
        font-size: 1.2rem; 
    }

    

    
}

@media (max-width: 480px) {
    .details {
        padding: 0.5rem;
    }

    .details h2 {
        font-size: 2rem
    }

    .hero {
      justify-content: space-evenly;
      margin-right: 20px;
    }
    .details .icons {
        gap: 0.5rem; 
    }

    .details .icons a {
        font-size: 1rem; 
    }

    .image img {
        margin-left: 30px;
    }
 
}




.image {
    width: 400px;
    height: 400px;
    margin:-50px 2rem 0 0;

}


.image img {
    width: inherit;
    height: inherit;
    border-radius: 50%;
    
}
.icons a {
     text-decoration: none;
     color: var(--txt-color);
}
.icons i {
    padding: 20px;
    margin-right: 10px;
    background-color: rgba(192, 190, 190, 0.241);
    border-radius: 30%;
    cursor: pointer;
}

.icons i:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #6a11cb, #2575fc );
}


/* -----skills------- */

.skills-services {
  position: relative;
  padding: 50px 20px;
  background: #0b0b0b;
  overflow: hidden;
  color: white;
}

.skills-services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px; 
  z-index: 0;
  pointer-events: none;
}


.skills-services h2 {
  text-align: center;
  font-size: 2rem;
}

.skills-services p{
  text-align: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 30px auto;
  padding: 10px;
  place-items: center;
  position: relative;
}


/* Skill Cards */
.skill-card {
  background: #0d1117;
  border: 2px solid #21262d;
  width: 200px;
  height: 250px;
  border-radius: 10px;
  text-align: center;
  padding: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 10%;
  width: 150px;
  height: 150%;
  background: linear-gradient(to bottom,#6a11cb,#58a6ff);
  animation: rotate 4s linear infinite;
  z-index: -2;
}

.skill-card::after {
  content: "";
  position: absolute;
  background: #0f101a;
  inset: 2px;
  border-radius: 10px;
  z-index: -1;
}


@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.skill-card img {
  width: 50px;
  margin-bottom: 15px;
}

.skill-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #58a6ff;
}

.skill-card p {
  font-size: 1rem;
  color: #8b949e;
}


/* ---------education--------------------- */
.education .heading {
  text-align: center;
  margin: 50px 0 0;
  font-size: 2rem;
}

.education p {
  text-align: center;
  margin: 0 0 50px;
}

.timeline {
  margin: 5em auto;
  max-width: 34.15em;
}

.checkpoint {
  max-width: 34em;
  padding-top: 2em;
  padding-bottom: 2em;
  position: relative;
  text-transform: capitalize;
}

.checkpoint div h2 {
  text-align: center;
  font-size: 1.8rem;
  background: linear-gradient(to right,#6a11cb,#63b3ed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.checkpoint div p {
  margin: 0;
}

.checkpoint div .grade {
  margin-top: 10px;
}

.checkpoint div {
  border:2px solid #888;
  border-radius: 1em; 
}

.checkpoint p {
  line-height: 27px;
  color: var(--txt-color);
}

.checkpoint div p span {
  color: #58a6ff;
}

.checkpoint div p .marks {
  color: #6a11cb;
}
.checkpoint:nth-child(odd) {
  border-left: 3px solid #4c0795;
  padding-left: 3em;
  transform: translateX(17em);
}

.checkpoint:nth-child(even) {
  border-right: 3px solid #4c0795;
  padding-right: 3.1em;
  transform: translateX(-16.86em);
}

.checkpoint:nth-child(odd)::before,
.checkpoint:nth-child(even)::before {
  content: "";
  background-color: #888;
  width: 3em;
  height: 3px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.checkpoint:nth-child(odd)::before {
  left: 0;
}

.checkpoint:nth-child(even)::before {
  right:0;
}

.checkpoint:nth-child(odd) div::before,
.checkpoint:nth-child(even) div::before {
  content: "";
  background-color: #2575fc;
  box-shadow: 0 0 0.5em #58a6ff;
  width: 0.8em;
  height: 0.8em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
}

.checkpoint:nth-child(odd) div::before {
  left: -0.5em;
}

.checkpoint:nth-child(even) div::before {
  right: -0.5em;
}

@media (max-width:1150px) {
  .timeline {
    width: 80vw;
  }

  .timeline .checkpoint {
    width: 100%;
    transform: none;
    padding-left: 0;
    padding-right: 0;
    border: none;
  }

  .timeline .checkpoint::before{
    width: 3px;
    height: 4em;
    top: -2em;
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline .checkpoint div::before {
    top: -0.5em;
    left: 50%;
    transform: translateX(-50%);
  }
}

.education-details {
  animation: fadeIn 1s forwards;
  animation-timeline: view() ;
  animation-range-start: 100px;
  animation-range-end: 400px;
  transform: translateX(100px);
  opacity: 0;
}

@keyframes fadeIn {
  0% {
    transform: translatex(100px);
    opacity: 0;
  }
  100% {
    transform: translatex(0);
    opacity: 1;
  }
}

/* ---------------projects------------------ */
.projects {
  position: relative;
  background-color: #0b0b0b;
  overflow: hidden;
  color: white;
}

.projects::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right,rgba(255, 255, 255, 0.05) 1px,transparent 1px),
  linear-gradient(to bottom,rgba(255, 255, 255, 0.05) 1px,transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}



.projects h2 {
  font-size: 2rem;
  text-align: center;
  margin: 50px 0 0;
}

.projects p {
  text-align: center;
  margin: 0 0 50px 0;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  max-width: 1100px;
  margin: 30px auto;
  padding: 10px;
  place-items: center;
}

.project-cards .card {
  width: 330px;
  height: 350px;
  border-radius: 20px;
  background-color: transparent;
  overflow: hidden;
  background-color: rgba(15, 23, 42, 1);
  position: relative;
}


.project-cards .card .images {
  width: 100%;
  height: 200px;
  border-radius: 20px 20px 0 0;
  padding: 10px;
}

.project-cards .card .images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.project-cards .card .content {
  width: 100%;
  height: 230px;
  border-radius: 0 0 20px 20px;
  position: relative;
}

.content h3 {
  font-size: 1.5rem;
  background-image: linear-gradient(to right,#58a6ff,#6a11cb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  margin-top: 10px;
}

.content p {
  text-align: left;
  margin: 0 10px 0 15px;
}

.actions {
  position: absolute;
  bottom: -100%;
  transition: all 0.1s;
  z-index: 2;
  transform: translateX(25%);
}

.actions button {
  margin-top: 15px;
  padding: 15px;
  width: 110px;
  background-color: #1E293B;
  border: 1px solid;
  border-radius: 10px;
  text-align: center;
  color: var(--txt-color);
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.actions button a {
  color: var(--txt-color);
  text-decoration: none;
}

.actions button i {
  margin-right: 10px;
}

.actions button:hover {
  background: linear-gradient(to right, #58a6ff,#6a11cb);
}

.card:hover .actions {
  bottom: 10px;
  left: 0;
}

.card:hover .images {
  transform: scale(1.05);
  transition: all 0.2s ease-in-out;
}

/* .card:hover {
  transform: scale(1.07);
} */
/* 
.card {
  animation: up 1s forwards;
  animation-timeline: view() ;
  animation-range-start: 100px;
  animation-range-end: 400px;
  transform: translateX(100px);
  opacity: 0;
}

@keyframes up {
  from {
    transform: translate(100px);
  opacity: 0;
  }
  to {
    transform: translateY(0);
  opacity: 1;
  }
} */



/* -------------------contact ------------------------------ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header p {
  color: #2c9cec;
  font-size: 0.875rem;
}

header h1 {
  font-size: 2.25rem;
  font-weight: bold;
}

header p:last-of-type {
  color: #678cbd;
  margin-top: 1rem;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.flex > div {
  flex: 1;
  min-width: 300px;
}

.contact-info {
  color: #63b3ed;
}

.contact-info p {
  color: #a0aec0;
  margin-top: 0.5rem;
}

.contact-info ul {
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
}

.contact-info li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.contact-info svg {
  color: #63b3ed;
  margin-right: 0.75rem;
}

form {
  background-color: #2d3748;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form label {
  display: block;
  font-size: 0.875rem;
  color: #a0aec0;
  margin-bottom: 0.5rem;
}

form input,
form textarea,
form button {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #4a5568;
  border-radius: 0.375rem;
  background-color: #1a202c;
  color: var(--txt-color);
  font-size: 1rem;
}

form textarea {
  resize: vertical;
}

form button {
  background-color: #3182ce;
  border: none;
  cursor: pointer;
}

form button:hover {
  background-color: #2b6cb0;
}

.contact-image img {
  width: 600px;
  margin-top: -70px;
  margin-left: 70px;
}

footer {
  height: 50px;
  background-color: #1E293B;
}


.resume button {
  width: 100px;
  padding: 10px;
  border: 1px solid var(--txt-color);
  border-radius: 20px;
  outline: none;
  margin: 30px 0;
  cursor: pointer;
  background-color: transparent;
  color: var(--txt-color);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.resume button::after {
  content: "";
    position: absolute;
    width: 0;
    height: 50px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    top: 0;
    left: 0;
    border-radius: 10px;
    z-index: -1;
    transition: width 0.5s ease;
}


.resume button:hover::after {
  width: 130px;

}

.resume button:hover {
  border: none;
}

.resume button a {
  text-decoration: none;
  color: var(--txt-color);
}

#main-content {
  display: none;
}

#splashscreen {
  width: 100%;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}


svg path {
  fill: transparent;
  stroke-width: 0.1;
  stroke: white;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: textAnim 3s ease-in-out 1 forwards;
}

@keyframes textAnim {
  0% {
      stroke-dashoffset: 600;
  }
  80% {
      fill: transparent;
  }
  
  100% {
      stroke-dashoffset: 0;
      fill: white;
  }
}

svg {
  animation: zoomAnim 1s ease-in-out 3s 1 forwards;
}

@keyframes zoomAnim {
  0% {
      transform: scale(1);
  }
  100% {
    padding-left: 20px;
      transform: scale(100);
  }
}



.toggle-container {
  position: relative;
  width: 60px;
  height: 30px;
}

/* Hidden Checkbox */
.toggle-input {
  display: none;
}

/* Toggle Track */
.toggle-label {
  width: 100%;
  height: 100%;
  background: var(--toggle-bg);
  border-radius: 50px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

/* Toggle Circle */
.toggle-circle {
  width: 26px;
  height: 26px;
  background: var(--toggle-circle);
  border-radius: 50%;
  position: absolute;
  left: 2px;
  transition: transform 0.3s ease-in-out;
}

/* Move Toggle to Right When Checked */
.toggle-input:checked + .toggle-label .toggle-circle {
  transform: translateX(30px);
}