/* =========================================== */
/* SMOOTH SCROLLING & ANCHOR POSITIONING */
/* =========================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

#home, #about, #services, #projects, #contact {
  scroll-margin-top: 80px;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #0a0f1a;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER - RESPONSIVE */
header {
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4cc9f0;
}

/* =========================================== */
/* DESKTOP NAVIGATION */
/* =========================================== */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none; /* Hidden on desktop */
}

nav {
  display: flex;
}

nav a {
  margin-left: 25px;
  font-size: 1rem;
  color: #b7c9e5;
  transition: color 0.3s ease;
  padding: 5px 0;
}

nav a:hover {
  color: #4cc9f0;
}

/* =========================================== */
/* HERO SECTION - RESPONSIVE */
/* =========================================== */
.hero {
  padding: 150px 40px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  min-height: 100vh;
}

.hero-text {
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-text h2 {
  font-size: 2.4rem;
  color: #4cc9f0;
  margin-bottom: 10px;
}

.hero-text h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  min-height: 2.5rem;
}

.hero-text p {
  color: #b7c9e5;
  margin-bottom: 25px;
  font-size: 1.1rem;
  max-width: 600px;
}

/* =========================================== */
/* BUTTON STYLES - MATCHING BACKGROUND COLOR */
/* =========================================== */
.btn, .about-btn, .read-more, form button {
  padding: 12px 25px;
  background: #11182a; /* Matches service card background */
  color: #4cc9f0;
  font-weight: bold;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid #1d2a44; /* Matches service card border */
  text-align: center;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover, .about-btn:hover, .read-more:hover, form button:hover {
  background: #4cc9f0;
  color: #000000f0;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
  border-color: #4cc9f0;
}

.download-cv {
  background: #4cc9f0;
  color: #000000f0;
  border-color: #4cc9f0;
}

.download-cv:hover {
  background: #11182a;
  color: #4cc9f0;
}

/* Specific for form button */
form button {
  background: #4cc9f0;
  color: #000;
  border: none;
  width: 100%;
}

form button:hover {
  background: #3ab8dd;
}

/* =========================================== */
/* PROFILE IMAGES - NO ANIMATION CIRCLES */
/* =========================================== */
.hero-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-img img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #4cc9f0;
  box-shadow: 0 0 30px rgba(76, 201, 240, 0.3);
}

/* About image */
.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ddd;
}

/* =========================================== */
/* SECTION TITLES */
/* =========================================== */
section {
  padding: 80px 40px;
}

.section-title, #about .about-text h2, #contact .contact-wrapper h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #2593bb; /* Original blue color */
  text-align: center;
  text-transform: none; /* Remove uppercase */
  letter-spacing: normal; /* Remove extra spacing */
}

/* Remove the underline */
.section-title::after, #about .about-text h2::after, #contact .contact-wrapper h2::after {
  display: none;
}

/* =========================================== */
/* ABOUT SECTION - RESPONSIVE */
/* =========================================== */
#about {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 40px 0;
}

.about-text {
  flex: 1;
  max-width: 650px;
}

.about-text p {
  line-height: 1.6;
  font-size: 1.1rem;
  color: #b8c8e0;
  margin-bottom: 25px;
}

/* =========================================== */
/* SERVICES - RESPONSIVE */
/* =========================================== */
#services {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: #11182a;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #1d2a44;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(76, 202, 240, 0.051);
}

.icon {
  font-size: 3.2rem;
  color: #49b3d3;
  margin-bottom: 20px;
}

.service-card h3 {
  color: #d2dcdf;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.service-card p {
  color: #96a5bc;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* =========================================== */
/* PROJECTS SECTION */
/* =========================================== */
#projects {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.project {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease;
  animation: floatCard 6s ease-in-out infinite;
}

.project:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 30px rgba(76, 201, 240, 0.3);
}

.project img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform 0.8s ease;
  filter: brightness(0.9);
}

.project:hover img {
  transform: scale(1.08);
  filter: brightness(1);
}

/* Floating card animation */
@keyframes floatCard {
  0%, 100% { 
    transform: translateY(0); 
  }
  50% { 
    transform: translateY(-10px); 
  }
}

/* Project info */
.project-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(20, 30, 48, 0.9) 50%,
    rgba(76, 201, 240, 0.3) 100%
  );
  backdrop-filter: blur(2px);
}

.project:hover .project-info {
  transform: translateY(0);
  opacity: 1;
}

/* Floating text animation */
.project-info h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 1.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s ease 0.2s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.project-info p {
  color: #e0e0e0;
  font-size: 0.95rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s ease 0.3s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.project:hover .project-info h3,
.project:hover .project-info p {
  transform: translateY(0);
  opacity: 1;
  animation: textFloat 2s ease-in-out infinite;
}

/* Text floating (up and down) animation */
@keyframes textFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Individual floating timing for visual interest */
.project-info h3 {
  animation-delay: 0s;
}

.project-info p {
  animation-delay: 0.1s;
}

/* =========================================== */
/* CONTACT SECTION - RESPONSIVE */
/* =========================================== */
#contact {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #0a0f1a;
}

.contact-wrapper {
  width: 100%;
  max-width: 800px;
  text-align: center;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.half-inputs {
  display: flex;
  gap: 15px;
}

.half-inputs input {
  flex: 1;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #1d2a44;
  background: #0d1628;
  color: #fff;
  font-size: 1rem;
  transition: border 0.3s ease;
}

.half-inputs input:focus,
textarea:focus {
  outline: none;
  border-color: #4cc9f0;
  box-shadow: 0 0 0 2px rgba(76, 201, 240, 0.2);
}

textarea {
  width: 100%;
  padding: 20px;
  min-height: 150px;
  border-radius: 8px;
  border: 1px solid #1d2a44;
  background: #0d1628;
  color: #fff;
  resize: vertical;
  font-size: 1rem;
}

/* =========================================== */
/* SOCIAL MEDIA ICONS - WITH CURSOR & TOOLTIPS */
/* =========================================== */
.social-links,
.footer-social {
  display: flex;
  gap: 15px;
  margin: 25px 0;
  flex-wrap: wrap;
}

/* Social icons with pointer cursor */
.social-icon {
  font-size: 1.5rem;
  color: #858588;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid #4cc9f0;
  border-radius: 50%;
  transition: 0.3s;
  cursor: pointer; /* Pointer cursor added here */
  position: relative;
}

.social-links .social-icon:hover,
.footer-social .social-icon:hover {
  background: #4cc9f0;
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

/* SOCIAL ICONS - SIMPLE WITH CURSOR, NO TOOLTIP */
.social-icon {
  font-size: 1.5rem;
  color: #858588;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid #4cc9f0;
  border-radius: 50%;
  transition: 0.3s;
  cursor: pointer; /* This adds the pointer cursor */
}

.social-icon:hover {
  background: #4cc9f0;
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

/* =========================================== */
/* FOOTER - RESPONSIVE */
/* =========================================== */
footer {
  text-align: center;
  padding: 40px 20px;
  background: #080d16;
  color: #b7c9e5;
  margin-top: 40px;
}

.footer-social {
  justify-content: center;
  margin: 20px 0;
}

.copyright {
  color: #666;
  font-size: 0.9rem;
  margin-top: 20px;
  opacity: 0.8;
}

/* =========================================== */
/* TYPING EFFECT - RESPONSIVE */
/* =========================================== */
.typing-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.typing-wrap {
  display: inline-block;
  position: relative;
  width: 22ch;
  height: 1.2em;
  vertical-align: middle;
  overflow: hidden;
}

.word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  overflow: hidden;
  border-right: .12em solid #4cc9f0;
  color: #4cc9f0;
  font-weight: 700;
  width: 0;
  animation: typing 9s steps(18,end) infinite;
}

.word1 { animation-delay: 0s; }
.word2 { animation-delay: 3s; }
.word3 { animation-delay: 6s; }

@keyframes typing {
  0%, 10% { width: 0; opacity: 1; }
  10%, 30% { width: 100%; opacity: 1; }
  30%, 40% { width: 0; opacity: 1; }
  40%, 100% { width: 0; opacity: 0; }
}

.word::after {
  content: "";
  display: inline-block;
  width: .12em;
  height: 1em;
  margin-left: 2px;
  background: #4cc9f0;
  animation: blink 1s steps(1,start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* =========================================== */
/* TABLET DEVICES (768px to 1024px) */
/* =========================================== */
@media (max-width: 1024px) {
  header {
    padding: 15px 30px;
  }
  
  .hero {
    padding: 120px 30px 60px;
    gap: 30px;
  }
  
  .hero-text h2 {
    font-size: 2rem;
  }
  
  .hero-text h3 {
    font-size: 1.5rem;
  }
  
  .hero-img img {
    width: 300px;
    height: 300px;
  }
  
  .about-container {
    gap: 40px;
  }
  
  .about-image img {
    width: 300px;
    height: 300px;
  }
  
  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    width: 95%;
  }
  
  section {
    padding: 60px 30px;
  }
  
  .section-title, #about .about-text h2, #contact .contact-wrapper h2 {
    font-size: 1.8rem;
  }
}

/* =========================================== */
/* MOBILE NAVIGATION - PURE CSS HAMBURGER TO X */
/* =========================================== */
@media (max-width: 768px) {
  /* Header & Navigation */
  header {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  /* Show the hamburger/X icon on mobile */
  .nav-toggle-label {
    display: block;
    order: 2;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    position: relative;
    background: rgba(76, 201, 240, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  /* Create the hamburger icon with three bars */
  .nav-toggle-label span {
    position: relative;
    display: block;
    width: 24px;
    height: 2px;
    background: #4cc9f0;
    transition: all 0.3s ease;
  }
  
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #4cc9f0;
    transition: all 0.3s ease;
  }
  
  .nav-toggle-label span::before {
    top: -8px;
  }
  
  .nav-toggle-label span::after {
    bottom: -8px;
  }
  
  /* Transform hamburger to X when checked */
  #nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }
  
  #nav-toggle:checked + .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  #nav-toggle:checked + .nav-toggle-label span::after {
    transform: rotate(-45deg);
    bottom: 0;
  }
  
  /* Mobile menu styles */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 15, 26, 0.98);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 80px 20px 40px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
  }
  
  /* Show menu when checkbox is checked */
  #nav-toggle:checked ~ nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  /* Style the navigation links */
  nav a {
    margin: 0;
    padding: 18px 30px;
    font-size: 1.3rem;
    width: 90%;
    max-width: 300px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(76, 201, 240, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
  }
  
  /* Animate links when menu opens */
  #nav-toggle:checked ~ nav a {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Staggered animation for links */
  #nav-toggle:checked ~ nav a:nth-child(1) { transition-delay: 0.1s; }
  #nav-toggle:checked ~ nav a:nth-child(2) { transition-delay: 0.2s; }
  #nav-toggle:checked ~ nav a:nth-child(3) { transition-delay: 0.3s; }
  #nav-toggle:checked ~ nav a:nth-child(4) { transition-delay: 0.4s; }
  #nav-toggle:checked ~ nav a:nth-child(5) { transition-delay: 0.5s; }
  
  nav a:hover {
    background: rgba(76, 201, 240, 0.15);
    border-color: #4cc9f0;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(76, 201, 240, 0.2);
  }
  
  /* Hero Section */
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 100px 20px 40px;
    gap: 30px;
  }
  
  .hero-text {
    max-width: 100%;
    align-items: center;
  }
  
  .hero-text h2 {
    font-size: 1.8rem;
  }
  
  .hero-text h3 {
    font-size: 1.3rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
  
  .hero-img img {
    width: 250px;
    height: 250px;
  }
  
  /* About Section */
  .about-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .about-text h2 {
    text-align: center;
  }
  
  .about-image img {
    width: 250px;
    height: 250px;
  }
  
  /* Services & Projects Grids */
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .service-card {
    padding: 25px 20px;
  }
  
  .project img {
    height: 200px;
  }
  
  /* Contact Form */
  .contact-wrapper {
    padding: 0 10px;
  }
  
  .contact-wrapper h2 {
    font-size: 1.8rem;
  }
  
  .half-inputs {
    flex-direction: column;
    gap: 15px;
  }
  
  /* Typing Effect */
  .typing-line {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 5px;
  }
  
  .typing-wrap {
    width: 18ch;
  }
  
  /* Social Links */
  .social-links,
  .footer-social {
    justify-content: center;
  }
  
  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  
  .section-title, #about .about-text h2, #contact .contact-wrapper h2 {
    font-size: 1.6rem;
  }
}

/* =========================================== */
/* SMALL MOBILE DEVICES (up to 480px) */
/* =========================================== */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.3rem;
  }
  
  .hero {
    padding: 90px 15px 30px;
  }
  
  .hero-text h2 {
    font-size: 1.6rem;
  }
  
  .hero-text h3 {
    font-size: 1.2rem;
  }
  
  .hero-img img {
    width: 200px;
    height: 200px;
  }
  
  .about-image img {
    width: 200px;
    height: 200px;
  }
  
  section {
    padding: 40px 15px;
  }
  
  .section-title, #about .about-text h2, #contact .contact-wrapper h2 {
    font-size: 1.4rem;
    margin-bottom: 30px;
  }
  
  .service-card h3 {
    font-size: 1.2rem;
  }
  
  .icon {
    font-size: 2.5rem;
  }
  
  .project-info h3 {
    font-size: 1.3rem;
  }
  
  .typing-wrap {
    width: 16ch;
  }
  
  .btn, .about-btn, .read-more, form button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

/* =========================================== */
/* LARGE DESKTOP (above 1440px) */
/* =========================================== */
@media (min-width: 1440px) {
  .hero {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .about-container {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .services-grid,
  .projects-grid {
    max-width: 1400px;
  }
}