/* 1. Global Styles */
:root {
  --bg-main: #0D1117;
  --bg-card: #161B22;
  --text-light: #C9D1D9;
  --accent: #58A6FF;
  --highlight: #F778BA;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-light);
  line-height: 1.6;
  /* overflow: auto; */
}

/* 2. Containers & Sections */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.section {
  padding: 80px 0;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-light);
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

/* 3. Navbar */
.navbar {
  background-color: var(--bg-card);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent);
}

.nav {
  display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

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

.nav-links a:hover {
  color: var(--highlight);
}

/* Animated Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-light);
  border-radius: 2px;
  transition: all 0.4s ease;
  /* transform-origin: center; */
  /* margin: 0 auto; */
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 7px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7px);
}

/* 4. About Section */
.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.about-image img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 4px solid var(--accent);
}

.about-content {
  flex: 1;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1rem;
}

.about-buttons a {
  display: inline-block;
  margin-right: 15px;
  margin-top: 10px;
  padding: 10px 18px;
  background-color: var(--accent);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

.about-buttons a:hover {
  background-color: var(--highlight);
}

/* 5. Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.skill-category {
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--accent);
}

.skill-category ul {
  list-style-type: none;
  padding-left: 0;
}

.skill-category ul li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.skill-category ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--highlight);
}

/* 6. Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 20px;
  transition: transform 0.3s ease;
}

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

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card h3 {
  margin: 15px;
  font-size: 1.2rem;
}

.project-links {
  display: flex;
  gap: 15px;
  margin: 0 15px;
}

.project-links a {
  text-decoration: none;
  background-color: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.3s ease;
  font-size: 0.95rem;
}

.project-links a:hover {
  background-color: var(--highlight);
}

/* 7. Contact Section */
.contact form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact input,
.contact textarea {
  background-color: var(--bg-card);
  border: 1px solid #333;
  padding: 12px 15px;
  border-radius: 6px;
  color: var(--text-light);
  font-family: var(--font-body);
}

.contact button {
  background-color: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact button:hover {
  background-color: var(--highlight);
}

/* 8. Footer */
.footer {
  background-color: var(--bg-card);
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
  color: #999;
}

/* 9. Responsive Styles */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    background: var(--bg-card);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  .nav.show {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 30px;
    padding: 0;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-buttons a {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 1.7rem;
  }

  .project-links a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}