/* ==== VARIABLES ==== */
:root {
  /* Primary brand colors */
  --cooprate-color: hsl(213, 100%, 35%);
  --accent-color: hsl(0, 80%, 55%);

  /* Text color */
  --text-color-60: hsl(220, 9%, 20%);
  --text-color-30: hsl(222, 47%, 11%);
  --text-color-10: hsl(220, 4%, 50%);

  /* background  color */
  --bg-color: hsl(210, 25%, 98%);
  --card-bg: hsl(0, 0%, 100%);

  --border-color: hsl(220, 13%, 91%);
  --input-bg: hsl(220, 13%, 91%);
  --ring-color: hsl(224, 76%, 50%);

  /* Gradients */
  --linear-gradient: linear-gradient(
    to right,
    hsl(270, 100%, 70%),
    hsl(330, 80%, 65%),
    hsl(210, 100%, 70%)
  );
}

/* DARK MODE OVERRIDES */
body.dark {
  /* font color dark */
  --text-color-60: hsl(0, 0%, 90%);
  --text-color-30: hsl(0, 0%, 100%);
  --text-color-10: hsl(0, 0%, 50%);

  /* background color dark */
  --bg-color: black;
  --card-bg: hsl(222, 47%, 11%);

  --border-color: hsl(215, 28%, 17%);
  --input-bg: hsl(215, 28%, 17%);
  --ring-color: hsl(215, 20%, 65%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color-60);
  line-height: 1.6;
}

body.dark {
  background-color: var(--background);
  color: var(--text-color-60);
}

/* ==== REUSABLE ==== */
.section-container {
  padding: 40px 10%;
  background-color: var(--bg-color);
}

.section-header {
  text-align: center;
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 30px;
  font-weight: 600;
}
.section-header:after {
  content: "";
  display: block;
  height: 6px;
  width: 100%;
  background-color: var(--cooprate-color);
  margin-top: 3px;
  border-radius: 3px;
}

/* ==== NAVBAR ==== */
nav.nav {
  background: var(--card-bg);
  color: var(--text-color-60);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10%;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--cooprate-color);
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  transition: transform 0.3s ease;
}

.nav-links li a {
  color: var(--text-color-60);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--cooprate-color);
  border-bottom: 2px solid var(--cooprate-color);
}

/* === Dark Mode Button === */
.dark-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--accent-color);
}

/* ==== HAMBURGER ==== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

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

/* ==== MOBILE MENU ==== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--bg-color);
    color: var(--text-color-10);
    flex-direction: column;
    border-left: 1px solid var(--ring-color);
    align-items: flex-start;
    width: 200px;
    height: 100vh;
    padding: 20px;

    padding: 5px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
    padding: 10px;
    border-bottom: 1px solid var(--cooprate-color);
  }
}

/* ==== HERO ==== */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 0 10px #4ecdc4, 0 0 20px #349090;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid white;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.highlight {
  background-image: var(--linear-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.changing-text {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
}

.social-icons a {
  font-size: 24px;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: var(--card-bg);

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: var(--ring-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.social-icons a:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Brand Colors */
.social-icons a:nth-child(1) {
  color: #0077b5;
} /* LinkedIn */
.social-icons a:nth-child(2) {
  color: #333;
} /* GitHub */
.social-icons a:nth-child(3) {
  color: #1da1f2;
} /* Twitter */
.social-icons a:nth-child(4) {
  color: #3b5998;
} /* Facebook */
.social-icons a:nth-child(5) {
  color: #e4405f;
} /* Instagram */

body.dark .social-icons a {
  background: #222;
}

/* ==== ABOUT ==== */
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}

.about-overview {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
}

.about-summary ul {
  list-style: none;
  margin-top: 15px;
}

.about-summary li {
  font-size: 15px;
  padding: 5px;
  border-bottom: 1.5px solid var(--cooprate-color);
}

.about-action {
  margin-top: 10px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.about-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 10px;
  width: 50%;
  border-radius: 3px;
  border: 1px solid var(--cooprate-color);
  text-decoration: none;
  transition: 0.3s ease;
}
.download-cv {
  color: var(--bg-color);
  background-color: var(--cooprate-color);
  &:hover {
    color: var(--cooprate-color);
    background-color: var(--bg-color);
  }
}
.hire-me {
  color: var(--cooprate-color);
  background-color: var(--bg-color);
  &:hover {
    color: var(--bg-color);
    background-color: var(--cooprate-color);
  }
}

.about-details {
  flex: 2;
  min-width: 300px;
}

/* ==== TABS ==== */
.tab-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  display: flex;
  gap: 1px;
  width: 100%;
}

.tab-button {
  background: var(--bg-color);
  color: var(--cooprate-color);
  width: 33%;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s ease;
  border-bottom: 1px solid var(--cooprate-color);
}

.tab-button.active,
.tab-button:hover {
  background: var(--cooprate-color);
  color: var(--bg-color);
}

.tab-content {
  display: none;
  margin-top: 20px;
}

.tab-content.active {
  display: block;
}

.tab-content ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tab-content ul li {
  border-left: 10px solid var(--cooprate-color);
  list-style: none;
  /* padding: 10px; */
}
.tab-content ul li h3 {
  position: relative;
  color: var(--accent-color);
  padding: 10px 0;
  display: inline-block; /* shrink to fit text */
  margin-left: 20px;
}

.tab-content ul li h3::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--cooprate-color);
  margin-top: 4px;
  border-radius: 3px;
}

.tab-content ul li h3::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  height: 25px;
  width: 25px;
  background-color: var(--cooprate-color);
  border-radius: 50%;
}
.tab-content ul li p {
  padding: 5px;
}

.tab-content ul li h3 span {
  color: var(--text-color-10);
  font-size: 17px;
}
/* =====OVERVIEW ==== */
/* ===== OVERVIEW ==== */
.overview-container {
  display: grid;
  gap: 2px;
  width: 100%;
  grid-template-columns: 1fr; /* default for small screens */
}

.overview-card {
  background: var(--card-bg);
  color: var(--text-color-30);
  padding: 15px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.overview-card:hover {
  transform: translateY(-5px);
}

/* Different style for the middle card */
.middle-card {
  background: var(--cooprate-color);
  color: white;
  border-radius: 10px;
  padding: 20px;
}

/* Resize and layout only on large screens */
@media (min-width: 600px) {
  .overview-container {
    grid-template-columns: 2fr 3fr 2fr;
  }
}

/* ==== SERVICES ==== */
.services-container {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card {
  background: var(--card-bg);
  color: var(--text-color-30);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card ion-icon {
  font-size: 30px;
  background: var(--cooprate-color);
  color: white;
  padding: 10px;
  border-radius: 50%;
  margin-bottom: 10px;
}

/* ==== PORTFOLIO ==== */
.portfolio-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-card {
  background: var(--card-bg);
  color: var(--text-color-30);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: 0.3s ease;
  padding: 12px;
}

.project-card:hover {
  transform: translateY(-5px);
}
.project-card-image {
  border-radius: 8px;
}
.project-card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.technologies-used {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  list-style: none;
}

.technology {
  background: var(--accent-color);
  color: var(--text-color-60);
  font-size: 0.6rem;
  padding: 4px 6px;
  border-radius: 3px;
}

.links {
  display: flex;
  gap: 5px;

  width: 100%;
}

.links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  padding: 6px;
  border: 1px solid var(--cooprate-color);
  border-radius: 3px;
  text-decoration: none;
}
.live-demo {
  background-color: var(--cooprate-color);
  color: var(--bg-color);
  &:hover {
    background-color: var(--card-bg);
    color: var(--cooprate-color);
  }
}
.github-link {
  background-color: var(--card-bg);
  color: var(--cooprate-color);
  &:hover {
    background-color: var(--cooprate-color);
    color: var(--bg-color);
  }
}

/* ==== CONTACT ==== */
/* === Contact Section === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  color: var(--text-color-60);
  margin-top: 2rem;
}

.contact-form {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

  display: flex;
  flex-direction: column;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 15px;
  padding: 10px;
  background: var(--input-bg);
  color: var(--text-color-60);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
}

.submit-btn {
  background: var(--cooprate-color);
  color: white;
  font-weight: bold;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s ease;
}
.submit-btn:hover {
  background: var(--accent-color);
  color: black;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  font-size: 14px;
}

.contact-item ion-icon {
  font-size: 24px;
  color: var(--cooprate-color);
}

/* FAQ Accordion */
.faq-section h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--cooprate-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.faq-toggle {
  background: none;
  border: none;
  width: 100%;
  color: var(--text-color-60);
  text-align: left;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 5px 0;
}

.faq-toggle ion-icon {
  color: var(--text-color-60);
  transition: transform 0.3s ease;
}

.faq-answer {
  display: none;
  padding-top: 5px;
  font-weight: 500;
  color: var(--text-color-30);
  font-size: 14px;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-item.open .faq-toggle ion-icon {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==== FOOTER ==== */
.footer {
  text-align: center;
  padding: 20px 10%;
  background-color: var(--card);
  color: var(--text-color-10);
  font-size: 14px;
  line-height: 1.6;
}

.footer a {
  color: var(--cooprate-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  nav ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  .tab-buttons {
    justify-content: center;
  }

  .about-content,
  .contact .content-container {
    flex-direction: column;
  }
}

/* Shared styles */
.scroll-to-top,
.dark-toggle-btn {
  position: fixed;
  cursor: pointer;
  z-index: 1000;
  display: none;
  transition: 0.3s ease;
}

/* Dark mode button at the top */
.dark-toggle-btn {
  top: 70px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cooprate-color);
  color: white;
  padding: 15px 15px;
  border-radius: 6px 0 0 6px;
  font-size: 20px;
}

/* Scroll to top button at the bottom */
.scroll-to-top {
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cooprate-color);
  color: white;
  padding: 15px 15px;
  border-radius: 6px 0 0 6px;
  font-size: 20px;
}

.scroll-to-top:hover,
.dark-toggle-btn:hover {
  background: var(--accent-color);
  color: black;
}

/* spinning icon */
.spin {
  animation: spin 1s ease-in-out;
}

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

@media (max-width: 768px) {
  .section-container {
    padding: 30px 7%;
  }
}
@media (max-width: 568px) {
  .section-container {
    padding: 20px 5%;
  }
}
