/* Root Variables for Dark Theme */
:root {
  --bg: #0d1117;
  --fg: #c9d1d9;
  --accent: #58a6ff;
  --card-bg: #161b22;
  --divider: #21262d;
}

/* Global Styles */
body {
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #79c0ff;
}

/* Header */
header {
  text-align: center;
  padding: 0 1rem;
  background: var(--card-bg);
}

header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

header h1 {
  margin: 1rem 0 0.3rem;
}

header p {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: #8b949e;
}

.socials a {
  margin: 0 0.5rem;
  font-size: 1.5rem;
  color: white;
}

/* Container */
.container {
  width: 100%;
  padding: 2rem 0;
}

.section{
    max-width: 80%;
    margin: 0 auto;
    padding: 1rem 0;
}

/* About */
.about {
  margin-bottom: 2rem;
}

.about h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.skills {
  margin: 2rem 0;
}

.skills h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-category {
  margin-bottom: 1.5rem;
}

.skill-category h3 {
  margin: 0 0 0.3rem;
  color: white;
  font-weight: 600;
}

.skill-category p {
  margin: 0;
  line-height: 1.6;
  color: #ffffffe3;
}

/* Section Divider */
.section-divider {
  background: var(--divider);
  padding: 0.75rem 1rem;
  border-left: 5px solid var(--accent);
  margin: 3rem 0 1.5rem;
}

.section-divider h2 {
  margin: 0;
}

/* Projects */
.projects {
  text-align: justify;
  display: grid;
  max-width: 80%;
  margin: 0 auto;
  padding: 1rem 0;
}

.project {
  background: rgba(22, 27, 34, 0.6); /* semi-transparent dark */
  padding: 1.5rem;
  padding-top: 0.2rem;
  margin: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px); /* key to frosted glass */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.422); /* subtle border */
  transition: transform 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.project h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.project h4,h5{
    color: white;
}

.project p {
  margin: 0 0 1rem;
  color: #d5dadf;
}

.project a {
  font-weight: bold;
  float: right;
}

.tech-stack {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; /* optional: allows wrap on small screens */
  margin: 0;
}
.tech-stack span {
  flex: 1 1 auto; 
  text-align: center; 
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #8b949e;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.3s; }
.fade-in:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.socials img.huggingface-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.socials img.huggingface-icon:hover {
  transform: scale(1.1);
}

/* Navbar Styles */
nav {
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items:center;
}

.logo {
  color: var(--accent);
  margin: 0;
  font-size: 1.5rem;
}

.nav-links {
  list-style: none;
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: white;;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Sub-sections */
.sub-section {
  margin-bottom: 2rem;
}

.sub-section h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hamburger {
  display: none;
  color: white;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 22px;
  justify-content: space-between;
  align-items: flex-start;
  margin-right: 85%;
  z-index: 999;
}

.hamburger span {
  color: white;
  height: 3px;
  width: 100%;
  background: var(--fg);
  border-radius: 2px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100%;
    width: 200px;
    background: var(--card-bg);
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem;
    transition: left 0.3s ease;
  }

  .nav-links li {
    margin: 1rem 0;
  }

  #menu-toggle:checked ~ .nav-links {
    left: 0;
  }

  #menu-toggle:checked + .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 8px);
}

#menu-toggle:checked + .hamburger span:nth-child(2) {
  opacity: 0;
}

#menu-toggle:checked + .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -8px);
}

  .nav-container {
    position: relative;
  }

  .project{
    margin: 2rem 0;
  }
}