:root {
  --bg-color: #010101;
  --text-color: #ffffff;
  --grid-color: #1a1a1a;
  --primary-color: #ff5733;
  --modal-bg: rgba(0, 0, 0, 0.8);
  --transition-speed: 0.3s;
  --grid-size: 100px;
  --navbar-height: 80px;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Open Sans', sans-serif;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav {
  height: var(--navbar-height);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 1.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  margin: 4px 0;
  transition: all 0.3s ease;
}

main {
  flex: 1;
  padding-top: var(--navbar-height);
}

.hero {
  min-height: calc(100vh - var(--navbar-height));
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.cta-button {
  padding: 0.8rem 1.6rem;
  border: 2px solid var(--text-color);
  background: transparent;
  color: var(--text-color);
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.cta-button:hover {
  background: var(--primary-color);
  color: var(--bg-color);
}

.typing-text {
  font-size: 1.5rem;
  margin: 2rem 0;
  color: var(--text-color);
}

#changing-text {
  color: var(--primary-color);
  border-right: 2px solid var(--primary-color);
  padding-right: 5px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

@media (max-width: 768px) {
  .typing-text {
    font-size: 1.2rem;
    margin: 1.5rem 0;
  }
}

.skills-container {
  width: 100%;
  overflow: hidden;
  padding: 2rem;
}

.marquee-row {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  margin: 1rem 0;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

.marquee-row.reverse .marquee-content {
  animation-direction: reverse;
}

.skill-card {
  display: flex;
  align-items: center;
  background: #000000;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  margin-right: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-right: 0.5rem;
}

.skill-card span {
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
}

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

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.contact {
  padding: 4rem 2rem;
  background-color: #1a1a1a;
  text-align: center;
  margin-top: 0;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

#contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

#contact-form input,
#contact-form textarea {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--text-color);
  border-radius: 5px;
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: #aaaaaa;
}

#contact-form button {
  padding: 0.8rem 1.6rem;
  border: none;
  background: var(--primary-color);
  color: #000000;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition-speed);
}

#contact-form button:hover {
  background: #e64c3c;
}

footer {
  padding: 2rem;
  text-align: center;
  background-color: rgba(10, 10, 10, 0.9);
}

.social-links a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 0.75rem;
  font-size: 1rem;
}

.social-links a:hover {
  color: var(--primary-color);
}

footer p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.modal {
  display: none; 
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--modal-bg);
}

.modal-content {
  background-color: var(--bg-color);
  margin: 5% auto;
  padding: 1rem;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  position: relative;
  border-radius: 10px;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: white;
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav-links a {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .marquee-content {
    animation: marquee 20s linear infinite;
  }

  .skills-container {
    gap: 1rem;
  }

  .skill-card img {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .cta-button {
    font-size: 0.9rem;
  }

  .typing-text {
    font-size: 1rem;
  }

  .contact h2 {
    font-size: 2rem;
  }
}

.projects {
  padding: 4rem 2rem;
  background: transparent;
}

.projects h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.projects-container {
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  padding: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; 
  
}


.projects-container::-webkit-scrollbar {
  display: none;
}

.projects-container {
  -ms-overflow-style: none;  
  scrollbar-width: none;
}

.project-card,
.view-more-projects {
  background: linear-gradient(145deg, #1a1a1a, #0d0d0d); 
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 1.5rem;
  margin: 1rem;
  min-width: 320px;
  max-width: 380px;
  height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
  position: relative;
  overflow: hidden;
}

.project-card::before,
.view-more-projects::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.project-card:hover,
.view-more-projects:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7); 
  border: 1px solid rgba(52, 152, 219, 0.4); 
}

.project-card:hover::before,
.view-more-projects:hover::before {
  opacity: 0.2; 
}

.project-card img,
.view-more-projects img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.project-card:hover img,
.view-more-projects:hover img {
  transform: scale(1.05);
  filter: brightness(1.1); 
}

.project-content h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  min-height: 3.6rem;
  font-weight: bold;
}

.project-content p {
  color: #bbb;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  min-height: 4.8rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  min-height: 40px;
}

.tech-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(1.1);
  transition: transform 0.3s ease;
}

.tech-logo:hover {
  transform: scale(1.2);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link, .github-link {
  background: #333; 
  color: #ffffff;
  border-radius: 5px;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.project-link {
  background: var(--primary-color);
  color: var(--bg-color);
}

.github-link {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.project-link:hover, .github-link:hover {
  background: #444; 
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .projects {
    padding: 2rem 1rem;
  }
  
  .projects h2 {
    font-size: 2rem;
  }
  
  .project-card {
    padding: 1.5rem;
  }
}

.timeline {
  padding: 4rem 2rem;
  background: rgba(26, 26, 26, 0.3);
  margin-bottom: 0;
}

.timeline h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.timeline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  animation: slideIn 0.8s ease-in-out forwards;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

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

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

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  right: -48px;
  top: 32px;
  z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -48px;
}

.timeline-content {
  padding: 20px;
  background: rgba(26, 26, 26, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.timeline-date {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.timeline-content h4 {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 10px;
}

.timeline-content ul {
  list-style-type: none;
  padding-left: 0;
}

.timeline-content li {
  margin-bottom: 5px;
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.timeline-item:nth-child(even) {
  animation: slideInRight 0.8s ease-in-out forwards;
}

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

@media (max-width: 768px) {
  .timeline-container::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-dot {
    left: 23px;
    right: auto;
  }
  
  .timeline-item:nth-child(even) .timeline-dot {
    left: 23px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 10, 0.95);
    padding: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin: 0.5rem 0;
  }

  .hamburger {
    display: flex;
  }
}


section, div[id="skills"] {
  scroll-margin-top: var(--navbar-height);
  position: relative;
}


.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.4s; }
.timeline-item:nth-child(4) { transition-delay: 0.6s; }
.timeline-item:nth-child(5) { transition-delay: 0.8s; }
.timeline-item:nth-child(6) { transition-delay: 1.0s; }
.timeline-item:nth-child(7) { transition-delay: 1.2s; }
.timeline-item:nth-child(8) { transition-delay: 1.4s; }
.timeline-item:nth-child(9) { transition-delay: 1.6s; }
.timeline-item:nth-child(10) { transition-delay: 1.8s; }

.view-more-projects {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.view-more-projects:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.view-more-projects h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.project-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.project-highlights span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.github-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--bg-color);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.github-profile-link:hover {
  transform: scale(1.05);
}

.github-profile-link .icon {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .view-more-projects {
    padding: 1.5rem;
  }

  .project-highlights {
    gap: 0.3rem;
  }

  .project-highlights span {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; 
}

.hero {
  position: relative;
  overflow: hidden;   
}

.projects-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.scroll-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.3s ease;
  z-index: 10;
}

.scroll-button:hover {
  background: var(--primary-color);
}

.scroll-button.left {
  left: 0;
}

.scroll-button.right {
  right: 0;
}

.scroll-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (hover: none) and (pointer: coarse) {
  .scroll-button {
    display: none;
  }
  
  .projects-wrapper {
    padding: 0;
  }
}

.projects-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

