/* === Reset and Base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  min-height: 100vh;
  background-color: #f4f6f8;
  color: #333;
  transition: background 0.3s, color 0.3s;
}
nav {
  background-color: #f1f1f1; /* Light background for light mode */
}

/* For Dark Mode */
@media (prefers-color-scheme: dark) {
  nav {
    background-color: #333; /* Dark background for dark mode */
  }
}

/* === Layout Wrapper === */
.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* === Sidebar === */
<div class="toggle-wrapper">
  <button onclick="document.body.classList.toggle('dark-mode')">Toggle Dark Mode</button>
</div>

.sidebar {
  width: 260px;
  background-color: #2f3542;
  color: #ffffff;
  padding: 25px 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.3s ease;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  margin-bottom: 15px;
}

.sidebar h1 {
  font-size: 22px;
  margin-bottom: 10px;
}

.sidebar nav {
  width: 100%;
  margin: 20px 0;
}

.sidebar nav a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 4px;
  margin: 6px 0;
  transition: background 0.3s ease;
  font-weight: 500;
}

.sidebar nav a:hover {
  background-color: #57606f;
  color: #1abc9c;
}

.contact {
  font-size: 14px;
  margin-top: auto;
  padding-top: 20px;
}
.contact a {
  color: #70a1ff;
  text-decoration: none;
}
.contact a:hover {
  text-decoration: underline;
}

/* === Toggle Button (Mobile + Dark Mode) === */
.toggle-wrapper {
  display: none;
  margin-top: 15px;
}
.toggle-wrapper button {
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.toggle-wrapper button:hover {
  background: #16a085;
}

/* === Main Content === */
.main {
  flex: 1;
  padding: 40px;
  background-color: #ffffff;
  transition: background 0.3s ease;
}

.main h2 {
  margin-bottom: 20px;
  color: #2f3542;
  font-size: 26px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
}

.main h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  color: #3742fa;
  font-size: 20px;
}

.main ul, .main ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.main li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.main p {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 16px;
}

iframe {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 15px;
  width: 100%;
}

/* === Projects Grid === */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background-color: #fafafa;
  transition: box-shadow 0.2s;
}
.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.project-card h4 {
  margin-bottom: 10px;
  color: inherit;
  font-weight: 600;
}

.project-card p {
  font-size: 14px;
  color: #555;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  body, .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 15px;
    flex-wrap: wrap;
  }

  .profile-img {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }

  .sidebar nav {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main {
    padding: 20px;
  }

  .toggle-wrapper {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 10px;
  }
}

/* === Dark Mode Support === */
.dark-mode {
  background-color: #1e272e;
  color: #d2dae2;
}
.dark-mode .main {
  background-color: #2f3640;
  color: #dcdde1;
}
.dark-mode .sidebar {
  background-color: #1e272e;
}
.dark-mode .sidebar nav a {
  color: #d2dae2;
}
.dark-mode .sidebar nav a:hover {
  background-color: #485460;
  color: #1abc9c;
}
.dark-mode .project-card {
  background-color: #353b48;
  color: #e1e1e1;
  border-color: #444;
}
.dark-mode .project-card h4 {
  color: #ffffff;
}
.dark-mode .project-card p {
  color: #aaa;
}
.project-card {
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-card h4 {
  margin: 10px 0;
  font-size: 18px;
}

.icon {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
  display: inline-block;
}

.tags {
  margin-top: 10px;
}
.tags span {
  display: inline-block;
  background-color: #eee;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  margin-right: 5px;
  margin-bottom: 5px;
}

.dark-mode .tags span {
  background-color: #444;
  color: #ddd;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  gap: 12px;
  text-align: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #1abc9c;
}

.contact-link i {
  font-size: 16px;
}


.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.download-button {
  background-color: #1abc9c;
  color: white;
  border: none;
}

.download-button:hover {
  background-color: #16a085;
  color: white;
}

.download-button i {
  font-size: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.primary-button {
  background-color: #3742fa;
  color: #ffffff;
}

.primary-button:hover {
  background-color: #2f3542;
}

.download-button {
  background-color: #1abc9c;
  color: white;
  border: none;
}

.download-button:hover {
  background-color: #16a085;
  color: white;
}

.button i {
  font-size: 16px;
}


.hero {
  margin-bottom: 30px;
}
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero .highlight {
  color: #3742fa;
}
.hero p {
  font-size: 16px;
  color: #555;
}
.dark-mode .hero p {
  color: #ccc;
}

.motto {
  font-style: italic;
  color: #666;
  margin: 20px 0 40px;
  border-left: 4px solid #2ed573;
  padding-left: 15px;
}
.dark-mode .motto {
  color: #aaa;
  border-color: #1dd1a1;
}

.info-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.info-card {
  background-color: #f1f2f6;
  padding: 20px;
  border-radius: 8px;
  flex: 1;
  min-width: 240px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}
.info-card h4 {
  margin-bottom: 10px;
  font-size: 16px;
}
.info-card a {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #3742fa;
}
.card-button {
  display: inline-block;
  background-color: #3742fa;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.card-button:hover {
  background-color: #2f3542;
}

.dark-mode .card-button {
  background-color: #70a1ff;
  color: #1e272e;
}

.dark-mode .card-button:hover {
  background-color: #1abc9c;
  color: white;
}

.dark-mode .info-card {
  background-color: #2f3640;
  color: #dcdde1;
}
.dark-mode .info-card a {
  color: #70a1ff;
}

.cta-buttons {
  margin-top: 40px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #2f3542;
}

.dark-mode .hero h2 {
  color: #ffffff;
}

.main section h2 i,
.main section h3 i {
  color: #3742fa;
}

.dark-mode .main section h2 i,
.dark-mode .main section h3 i {
  color: #70a1ff;
}

.hero {
  margin-bottom: 30px;
}
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero p {
  font-size: 16px;
  color: #555;
}
.dark-mode .hero p {
  color: #ccc;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.download-button {
  background-color: #1abc9c;
  color: white;
  border: none;
}

.download-button:hover {
  background-color: #16a085;
  color: white;
}

.button i {
  font-size: 16px;
}

.hero {
  margin-bottom: 30px;
}
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero p {
  font-size: 16px;
  color: #555;
}
.dark-mode .hero p {
  color: #ccc;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-card {
  background-color: #f1f2f6;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.project-card h4 {
  margin-bottom: 10px;
  font-size: 16px;
}

.project-card .tags {
  margin-top: 10px;
}

.project-card .tags span {
  background-color: #eee;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 8px;
}

.dark-mode .project-card {
  background-color: #2f3640;
  color: #dcdde1;
}

.dark-mode .project-card .tags span {
  background-color: #444;
  color: #fff;
}

