
:root {
  --bg: #121212;
  --surface: #1e1e1e;
  --accent: #f44336;
  --text: #e0e0e0;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
  margin-left: 200px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100%;
  background-color: var(--surface);
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

.sidebar ul {
  list-style: none;
  width: 100%;
  padding: 0;
}

.sidebar li {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background 0.3s;
}

.sidebar a:hover {
  background-color: rgba(244, 67, 54, 0.2);
  color: #fff;
}

/* Header */
header {
  padding: 60px 20px;
  text-align: center;
  background: var(--surface);
}

header h1 {
  font-size: 2.8rem;
}

header p {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #aaa;
}

/* Section styles */
section.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* About section */
#about .bio {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
}

#about .bio p {
  flex: 1;
  min-width: 250px;
}

/* Projects section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  padding: 20px;
  border-left: 5px solid var(--accent);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

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

/* Contact section */
.contact-list {
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 400px;
  margin: auto;
}

.contact-list li a {
  padding: 10px 15px;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  display: inline-block;
  width: 100%;
  transition: background 0.3s;
}

.contact-list li a:hover {
  background: rgba(244, 67, 54, 0.1);
}

/* Footer */
footer {
  text-align: center;
  color: #666;
  padding: 30px 0;
  font-size: 0.9rem;
}

/* Responsive layout */
@media (max-width: 768px) {
  body {
    margin-left: 0;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
    padding: 10px 0;
  }

  .sidebar ul {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .sidebar li {
    margin-bottom: 0;
  }

  header h1 {
    font-size: 2rem;
  }

  #about .bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  html {
  scroll-behavior: smooth;
  }
  /* Toggle button */
.toggle-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1100;
  background-color: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}

/* Sidebar collapsed (hidden) */
.sidebar.collapsed {
  transform: translateX(-100%);
}

/* Animate the transition */
.sidebar {
  transition: transform 0.3s ease-in-out;
}
  .toggle-btn {
  display: none; /* Hidden by default */
}
  
  @media (max-width: 768px) {
  .toggle-btn {
    display: block;
  }
}


  body {
    margin-left: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(0);
    width: 200px;
    background-color: var(--surface);
  }

  .sidebar ul {
    flex-direction: column;
    gap: 0;
  }
 }
