:root {
    --accent: orange;
    --bg: #121212;
    --fg: #f0f0f0;
    --card-bg: #1e1e1e;
    --hover-bg: #292929;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

@media (max-width: 480px) {
    section {
      padding: 2rem 1rem;
    }
  
    .project-card {
      flex-direction: column;
    }
  
    .contact-row {
      flex-direction: column;
      gap: 1rem;
    }
  
    .avatar {
      width: 90px;
    }
  
    h1 {
      font-size: 1.5rem;
    }
  
    p {
      font-size: 0.9rem;
    }
  }  

/* General Styles */
a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    margin: 0;
}

section {
    padding: 3rem 2rem;
    scroll-margin-top: 50px;
    max-width: 900px;
    margin: auto;
}

ul {
    list-style: none;
    padding: 0;
}

.flex {
    display: flex;
}

.center {
    justify-content: center;
    align-items: center;
}

.grid {
    display: grid;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

/* Navigation */
nav {
    background: #1e1e1e;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}



nav .logo {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    font-size: 1rem;
    color: #f0f0f0;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    nav {
      flex-direction: column;
      align-items: flex-start;
    }
  
    nav ul {
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      margin-top: 1rem;
    }
  
    nav ul li {
      width: 100%;
    }
  
    nav ul li a {
      display: block;
      width: 100%;
      padding: 0.5rem 0;
    }
  }
  

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.avatar {
    width: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Section Headings */
h2 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Projects Section */
#projects {
    padding: 5rem 2rem;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.project-card {
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1rem;
    background-color: var(--card-bg);  /* Ensure same background color */
    color: var(--fg);  /* Ensure text color stays consistent */
    flex-grow: 1;  /* Ensures the info section fills available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Makes sure content is spaced evenly */
    height: auto;  /* Make sure all cards are of uniform height */
  }
  
  .project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);  /* Accent color for the title */
  }
  
  .project-info p {
    font-size: 0.95rem;
    opacity: 0.8;  /* Keep description text slightly faded */
    margin: 0;
    flex-grow: 1;  /* Let the description take up remaining space */
  }
  
footer {
    background-color: var(--card-bg);
    color: var(--fg);
    text-align: center;
    padding: 2rem 1rem;
  }
  
  footer h3 {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1.2rem;
  }
  
  .contact-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }
  
  .contact-icon {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--fg);
    font-size: 1.1rem;
    background-color: var(--card-bg);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
    border: 1px solid var(--hover-bg);
  }
  
  .contact-icon:hover {
    background-color: var(--hover-bg);
    color: var(--accent);
  }
  
  .contact-icon img {
    width: 20px;
    height: 20px;
  }

  @media (max-width: 600px) {
    .contact-row {
      flex-direction: column;
      align-items: center;
      gap: 1rem;
    }
  
    .contact-icon {
      width: 90%;
      justify-content: center;
      font-size: 1rem;
      padding: 0.5rem 0.8rem;
    }
  
    .contact-icon img {
      width: 18px;
      height: 18px;
    }
  }
  
  /* Hide checkbox */
#menu-toggle {
  display: none;
}

/* Hamburger icon styling */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.menu-icon span {
  height: 3px;
  width: 25px;
  background: var(--fg);
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobile styles */
@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  nav ul {
    position: absolute;
    top: 64px; /* nav height */
    left: 0;
    width: 100%;
    background: var(--card-bg);
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
    display: none;
    z-index: 9;
  }

  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }

  nav ul li a {
    font-size: 1.1rem;
  }
}