/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  background: #f0f5ff;
  color: #222f5b;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background-color 0.3s, color 0.3s;
}
.dark-mode {
  background: #121212;
  color: #e0e0e0;
}
a {
  color: #1a73e8;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- SIDEBAR ENHANCEMENTS --- */
header {
  flex: 0 0 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  left: 0;
  background: rgba(23, 70, 196, 0.82);
  background: linear-gradient(160deg, rgba(23,70,196,0.82) 0%, rgba(108,71,230,0.82) 100%);
  padding: 2.7rem 1.3rem 2.7rem 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 4px 0 32px 0 rgba(44, 62, 80, 0.13);
  z-index: 1000;
  border-top-right-radius: 36px;
  border-bottom-right-radius: 36px;
  border-right: 2px solid rgba(255,255,255,0.13);
  backdrop-filter: blur(22px) saturate(1.5);
  background-clip: padding-box;
  transition: background 0.3s, box-shadow 0.3s;
}

.sidebar-profile {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid transparent;
  background: linear-gradient(120deg, #fff 60%, #e8f0fe 100%) padding-box, linear-gradient(120deg, #6c47e6, #1a73e8) border-box;
  box-shadow: 0 0 24px #6c47e6aa, 0 1px 8px #1746c488;
  margin: 0 auto 2.5rem auto;
  margin-top: 0.5rem;
}

nav {
  margin-top: 1.2rem;
  width: 100%;
}
nav a {
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  border-radius: 10px;
  padding: 0.7rem 1.2rem 0.7rem 2.5rem;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  font-weight: 600;
  color: #f3f6ff;
  width: 100%;
  display: block;
  position: relative;
  background: none;
}
nav a.active, nav a:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
  box-shadow: 0 2px 12px 0 rgba(108,71,230,0.13);
  transform: scale(1.04) translateX(4px);
}
nav a.active::before, nav a:hover::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60%;
  border-radius: 6px;
  background: linear-gradient(160deg, #1a73e8 0%, #6c47e6 100%);
  box-shadow: 0 0 8px #6c47e6aa;
}

#themeToggle {
  margin-top: 2.5rem;
  align-self: flex-start;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 0.5rem 1.2rem;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px 0 rgba(108,71,230,0.10);
}
#themeToggle:hover {
  background: rgba(255,255,255,0.28);
  color: #eaf0fa;
}
#themeToggle:focus {
  outline: 3px solid #1746c4;
  outline-offset: 2px;
}

/* --- MAIN SECTION ALIGNMENT FIX --- */
main {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 900px;
  margin: 2.5rem auto 2rem auto;
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  min-height: 90vh;
  background: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  width: 100%;
}
section {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}
section h2 {
  color: #1a73e8;
  font-size: 1.9rem;
  margin-bottom: 1.3rem;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 6px;
  font-weight: 700;
}

/* Education */
#education p {
  margin: 0.3rem 0;
  font-size: 1rem;
  color: #2c3e70;
}
#education strong {
  color: #1a73e8;
}

/* Experience timeline */
#experience {
  position: relative;
  padding-left: 0;
  margin-left: 0;
  border-left: none;
  background: none;
}
#experience .job-item {
  background: #e8f0fe;
  border-radius: 12px;
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 10px rgb(26 115 232 / 0.2);
  color: #1a237e;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: none;
  position: relative;
  overflow: visible;
}
#experience .job-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgb(26 115 232 / 0.4);
  background: #e8f0fe;
}
#experience .job-item::before {
  display: none;
}
#experience h3 {
  color: #1a73e8;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: none;
  letter-spacing: 0.01em;
}
#experience .date-location {
  font-size: 0.98rem;
  color: #5670a2;
  font-weight: 600;
  margin-bottom: 1rem;
}
#experience ul {
  margin: 0;
  padding-left: 1.4rem;
  list-style-type: disc;
  color: #2c3e70;
  font-size: 1rem;
  line-height: 1.5;
}
#experience ul li {
  margin-bottom: 0.6rem;
}

/* Projects with cards */
#projects .project-card {
  background: #e8f0fe;
  border-radius: 12px;
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 10px rgb(26 115 232 / 0.2);
  color: #1a237e;
  transition: transform 0.3s ease;
}
#projects .project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgb(26 115 232 / 0.4);
}
#projects .project-card h4 {
  color: #1a73e8;
  margin-bottom: 0.5rem;
}
#projects .project-desc {
  font-size: 1rem;
  line-height: 1.4;
}

/* Skills */
#skills {
  display: block;
  gap: 0;
  justify-content: flex-start;
}
.skill-group {
  background: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1.2rem;
  box-shadow: none;
  color: #1a237e;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.skill-group h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-weight: 700;
  color: #1a73e8;
  font-size: 1.13rem;
}
.skill-bubbles {
  margin-top: 0;
  margin-bottom: 0.2rem;
}
@media (max-width: 1000px) {
  #skills {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
  .skill-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
  }
}

/* Hobbies */
#hobbies .hobby-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  list-style: none;
  font-size: 1.2rem;
  color: #2c3e70;
}
#hobbies .hobby-list li {
  background: #f1f6ff;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgb(26 115 232 / 0.15);
  user-select: none;
}

/* Leadership */
#leadership p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #2c3e70;
}

/* Contact */
#contact p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #2c3e70;
}
#contact a {
  font-weight: 600;
}

/* Contact bubble & popup */
#contactBubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a73e8;
  color: white;
  padding: 0.8rem 1.1rem;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.6);
  user-select: none;
  transition: background-color 0.3s ease;
  z-index: 1500;
}
#contactBubble:hover {
  background-color: #125bd4;
}
#contactBubble:focus {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}
#contactPopup {
  position: fixed;
  bottom: 80px;
  right: 24px;
  background: white;
  color: #222f5b;
  padding: 1rem 1.3rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  width: 230px;
  display: none;
  z-index: 1600;
  font-size: 1rem;
  line-height: 1.4;
}
#contactPopup.visible {
  display: block;
}

/* Dark mode popup */
.dark-mode #contactPopup {
  background: #222f5b;
  color: #e0e0e0;
  box-shadow: 0 0 15px rgba(255,255,255,0.15);
}

/* Responsive */
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  header {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1rem;
    box-shadow: 0 2px 6px rgba(22,36,71,0.08);
    border-radius: 0;
  }
  main {
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
    background: none;
    backdrop-filter: none;
    width: 100%;
  }
  section {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

#hero {
  display: block;
  text-align: left;
  margin-bottom: 3.5rem;
  width: 100%;
  max-width: 900px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
#hero img {
  width: 90px;
  height: 90px;
  min-width: 70px;
  min-height: 70px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #6c47e6;
  box-shadow: 0 0 18px #6c47e6aa, 0 1px 6px #1746c488;
  margin-right: 1.5rem;
  margin-bottom: 0;
  display: block;
}
@media (max-width: 900px) {
  #hero {
    text-align: center;
  }
  #hero img {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

#hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  color: #1a73e8;
  letter-spacing: 0.01em;
}
#hero p {
  font-size: 1.08rem;
  color: #23395d;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 650px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  #hero {
    text-align: center;
  }
  #hero p {
    max-width: 100%;
  }
}

section h2 {
  color: #1a73e8;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 6px;
  letter-spacing: 0.01em;
}

.tech-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
  margin-bottom: 0.3rem;
}
.tech-bubbles span {
  background: linear-gradient(120deg, #d1e0ff 60%, #e6e6fa 100%);
  color: #1746c4;
  font-size: 1.05rem;
  padding: 0.38em 1.15em;
  border-radius: 1.5em;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(108,71,230,0.13);
  letter-spacing: 0.01em;
  user-select: none;
  border: 1.5px solid #b3c6f7;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  margin-bottom: 0.2rem;
  display: inline-block;
}
.tech-bubbles span:hover {
  background: linear-gradient(120deg, #b3c6f7 60%, #c7bfff 100%);
  color: #6c47e6;
  transform: scale(1.08);
  cursor: pointer;
}

.skill-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0;
  margin-bottom: 0.2rem;
  padding-bottom: 0;
  overflow-x: unset;
  scrollbar-width: none;
}
.skill-bubbles span {
  background: #f3f6fa;
  color: #23395d;
  font-size: 0.92rem;
  padding: 0.18em 0.7em;
  border-radius: 1.1em;
  font-weight: 500;
  box-shadow: none;
  letter-spacing: 0.01em;
  user-select: none;
  border: 1px solid #e0e6ef;
  transition: background 0.14s, color 0.14s;
  margin-bottom: 0.1rem;
  display: inline-block;
}
.skill-bubbles span:hover {
  background: #e0e6ef;
  color: #1a73e8;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: #f7fbff;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 3px 16px rgba(26, 115, 232, 0.10);
  max-width: 420px;
  margin-bottom: 2.2rem;
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1.5px solid #b3c6f7;
  background: #fff;
  color: #23395d;
  box-shadow: 0 1px 4px rgba(108,71,230,0.07);
  transition: border 0.18s, box-shadow 0.18s;
  resize: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border: 1.5px solid #1a73e8;
  outline: none;
  box-shadow: 0 0 0 2px #d1e0ff;
}
.contact-form textarea {
  min-height: 110px;
  max-height: 260px;
}
.contact-form button[type="submit"] {
  background: linear-gradient(90deg, #1a73e8 60%, #6c47e6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.10);
  transition: background 0.18s, transform 0.18s;
}
.contact-form button[type="submit"]:hover {
  background: linear-gradient(90deg, #6c47e6 60%, #1a73e8 100%);
  transform: translateY(-2px) scale(1.03);
}
@media (max-width: 600px) {
  .contact-form {
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  #skills {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .skill-group {
    margin-bottom: 2rem;
    padding: 0;
  }
  .skill-group h3 {
    font-size: 1.08rem;
    margin-bottom: 0.5rem;
  }
  .skill-bubbles {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  .skill-bubbles span {
    font-size: 1.05rem;
    padding: 0.28em 1em;
    margin-bottom: 0.18rem;
  }
}

@media (max-width: 600px) {
  #projects {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #projects .project-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.1rem 0.7rem;
    margin-bottom: 1.2rem;
  }
  #projects .project-card h4 {
    font-size: 1.08rem;
  }
  .tech-bubbles {
    gap: 0.5rem;
  }
  .tech-bubbles span {
    font-size: 0.98rem;
    padding: 0.28em 1em;
  }
}

.resume-banner {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.2rem;
}
.resume-banner a {
  background: linear-gradient(90deg, #1a73e8 60%, #6c47e6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 0.7rem 1.7rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.10);
  transition: background 0.18s, transform 0.18s;
  letter-spacing: 0.01em;
  margin-right: 0.2rem;
}
.resume-banner a:hover {
  background: linear-gradient(90deg, #6c47e6 60%, #1a73e8 100%);
  transform: translateY(-2px) scale(1.04);
  color: #fff;
}
