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

body {
  font-family: Arial, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode (Default) */
body.light-mode {
  background-color: #f4f4f4;
  color: #333;
}

/* Dark Mode */
body.dark-mode {
  background-color: #1a1a1a;
  color: #f4f4f4;
}

body.dark-mode section:nth-child(2n) {
  background-color: #2a2a2a;
}

body.dark-mode section:nth-child(2n + 1) {
  background-color: #333;
}

body.dark-mode #content {
  color: #ccc;
}

body.dark-mode .section-heading {
  color: #4da8da;
}

body.dark-mode .timeline-box h3 {
  color: #4da8da;
}

body.dark-mode .more-left {
  color: #f39c12;
}

body.dark-mode .space {
  color: #aaa;
}

body.dark-mode .portfolio-details {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Header */
#resume-header {
  height: 60vh;
  background-image: url("https://ninjasfiles.s3.amazonaws.com/asset_0000000000000020_1549743985_macbook_mouse.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding-top: 60px;
  position: relative;
}

/* Navigation (W3Schools-inspired) */
.navbar {
  background-color: #333;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

#hamburger-lines {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.line {
  display: block;
  height: 4px;
  width: 30px;
  background-color: #1a3c6d;
  margin: 6px 0;
  transition: all 0.3s ease;
}

body.dark-mode .line {
  background-color: #fff;
}

.line1 { transform-origin: 0 0; }
.line3 { transform-origin: 0 100%; }

#hamburger-lines.active .line1 {
  transform: rotate(45deg) translate(5px, 5px);
}
#hamburger-lines.active .line2 {
  opacity: 0;
}
#hamburger-lines.active .line3 {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

.nav-menu li a:hover {
  border-bottom: 2px solid #4CAF50;
}

#dark-mode-toggle {
  background: none;
  border: none;
  color: #333;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}

body.dark-mode #dark-mode-toggle {
  color: #fff;
}

#dark-mode-toggle:hover {
  color: #4CAF50;
}

#social-info {
  text-align: center;
  margin-top: 5vh;
}

.nav-brand h1 {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.social-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons li a i {
  color: #fff;
  font-size: 1.2rem;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons li a i:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* About */
#about {
  height: auto;
  width: 100%;
  padding: 80px 20px 20px;
  position: relative;
}

/* UPDATED IMAGE SECTION */
#my-image {
  width: 15rem;
  height: 15rem;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  
  /* Main fix for visibility */
  object-fit: cover;
  object-position: center 20%; /* Adjusted to show face */
}

#my-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%; /* Applied here as well to be safe */
}

.mb75 {
  margin-bottom: 75px;
}

#content {
  margin: 0 auto;
  margin-top: 2rem;
  color: #666;
  width: 90%;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: justify;
}

section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

section:nth-child(2n) {
  background-color: #e8ecef;
}

section:nth-child(2n + 1) {
  background-color: #fff;
}

/* Skills Section */
#skills {
  height: auto;
  padding: 40px 0;
}

#skills .section-heading {
  color: #1a3c6d;
}

body.dark-mode #skills .section-heading {
  color: #4da8da;
}

.skills-display {
  width: 90%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 20px 0;
}

.skills-progress {
  background-color: #ccc;
  width: 100%;
  max-width: 200px;
  height: 2rem;
  border-radius: 0.8rem;
  overflow: hidden;
  position: relative;
}

body.dark-mode .skills-progress {
  background-color: #555;
}

.skills-progress > div {
  border-radius: 0.8rem 0 0 0.8rem;
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.mb-blue { background-color: #1a3c6d; }
.mb-orange { background-color: #d35400; }
.mb-grape { background-color: #6e2c5e; }
.mb-green { background-color: #086d63; }

body.dark-mode .mb-blue { background-color: #2857a4; }
body.dark-mode .mb-orange { background-color: #ec4d1c; }
body.dark-mode .mb-grape { background-color: #93738c; }
body.dark-mode .mb-green { background-color: #0b8176; }

.fifty-percent { width: 50%; }
.fifty-five-percent { width: 55%; }
.sixty-percent { width: 60%; }
.sixty-five-percent { width: 65%; }
.seventy-percent { width: 70%; }
.eighty-percent { width: 80%; }
.ninety-percent { width: 90%; }

.skill-name span {
  color: #fff;
  font-size: 0.9rem;
  margin-left: 10px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Experience Section */
#experience {
  height: auto;
  padding: 40px 0;
}

#experience .section-heading {
  color: #1a3c6d;
}

body.dark-mode #experience .section-heading {
  color: #4da8da;
}

.timeline {
  position: relative;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-box {
  position: relative;
  margin: 30px 0;
  width: 45%;
  min-height: 150px;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.dark-mode .timeline-box {
  background-color: #333;
}

.timeline-box:nth-child(2n) {
  left: 55%;
}

.timeline-box::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -12%;
  width: 12px;
  height: 12px;
  background-color: #4CAF50;
  border-radius: 50%;
  z-index: 1;
}

.timeline-box:nth-child(2n)::after {
  right: auto;
  left: -12%;
}

.timeline-divider {
  position: absolute;
  height: 80%;
  width: 2px;
  top: 10%;
  left: 50%;
  background-color: #4CAF50;
}

.timeline-traveller {
  font-size: 1.5rem;
  position: sticky;
  color: #1a3c6d;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
  z-index: 2;
}

body.dark-mode .timeline-traveller {
  color: #2857a4;
}

.timeline-content h3 {
  font-size: 1.3rem;
  color: #1a3c6d;
  margin-bottom: 10px;
}

body.dark-mode .timeline-content h3 {
  color: #4da8da;
}

.timeline-content .more-left {
  color: #d35400;
  font-size: 1rem;
  margin-bottom: 5px;
}

body.dark-mode .timeline-content .more-left {
  color: #f39c12;
}

.timeline-content .space {
  color: #444;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

body.dark-mode .timeline-content .space {
  color: #aaa;
}

.timeline-content p {
  font-size: 1rem;
  line-height: 1.5;
}

.timeline-content ul {
  list-style-type: disc;
  margin-left: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Education Section */
#education {
  height: auto;
  padding: 40px 0;
}

#education .section-heading {
  color: #1a3c6d;
}

body.dark-mode #education .section-heading {
  color: #4da8da;
}

.edu-divider {
  height: 80%;
  top: 10%;
  background-color: #4CAF50;
}

.education-content h3 {
  font-size: 1.3rem;
  color: #1a3c6d;
  margin-bottom: 10px;
}

body.dark-mode .education-content h3 {
  color: #4da8da;
}

.education-content .more-left {
  color: #d35400;
  font-size: 1rem;
  margin-bottom: 5px;
}

body.dark-mode .education-content .more-left {
  color: #eb822d;
}

.education-content .space {
  color: #444;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

body.dark-mode .education-content .space {
  color: #aaa;
}

.education-content p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Portfolio Section */
#portfolio {
  height: auto;
  padding: 40px 0;
}

#portfolio .section-heading {
  color: #1a3c6d;
}

body.dark-mode #portfolio .section-heading {
  color: #4da8da;
}

.portfolio-display {
  width: 90%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.project-img {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.project-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.project-img:hover {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.portfolio-details {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

body.dark-mode .portfolio-details {
  background-color: rgba(0, 0, 0, 0.7);
}

.project-img:hover .portfolio-details {
  opacity: 1;
}

.portfolio-details h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.portfolio-details p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Contact Section */
#contact {
  background: linear-gradient(90deg, #2857a4, #403066 60%);
  height: auto;
  padding: 40px 0;
}

.footer {
  color: #fff;
  text-align: center;
  font-size: 2rem;
}

#main-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

#form-align {
  width: 45%;
  min-width: 300px;
}

form input {
  border: none;
  background: none;
  font-size: 1rem;
  margin: 10px 0;
  width: 100%;
  color: #fff;
  border-bottom: 1px solid #d9dcdd;
  padding: 5px 0;
}

form input::placeholder {
  color: #d9dcdd;
}

form textarea {
  background: none;
  margin: 10px 0;
  width: 100%;
  font-size: 1rem;
  color: #fff;
  border: 1px solid #d9dcdd;
  padding: 5px;
  border-radius: 4px;
}

form textarea::placeholder {
  color: #d9dcdd;
}

hr {
  display: none;
}

.form-btn {
  background: none;
  padding: 0.8rem 1.5rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #fff;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
}

.form-btn:hover {
  background-color: #fff;
  color: #2857a4;
}

#info {
  width: 45%;
  min-width: 300px;
  color: #fff;
}

.gap {
  margin-bottom: 1rem;
}

.gap:nth-child(2) {
  font-size: 0.95rem;
  color: #ccc;
}

.space span:nth-child(2) {
  color: #ccc;
}

.space i {
  color: #fff;
  padding-right: 1rem;
}

.contact-social li a i {
  margin: 0 10px;
  font-size: 1.3rem;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .nav-brand h1 { font-size: 1.8rem; }
  .section-heading { font-size: 1.8rem; }
  .skills-progress { max-width: 180px; }
  .project-img img { height: 180px; }
}

@media screen and (max-width: 768px) {
  #resume-header { height: 50vh; }
  #hamburger-lines {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
  }
  .nav-container {
    justify-content: flex-end;
  }
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background-color: #333;
    flex-direction: column;
    padding-top: 60px;
    transition: left 0.3s ease;
  }
  .nav-menu.active {
    display: flex;
    left: 0;
  }
  .nav-menu li {
    margin: 15px 0;
    text-align: center;
  }
  .nav-menu li a {
    font-size: 1.2rem;
    padding: 10px;
    display: block;
  }
  #dark-mode-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
  }
  #social-info { margin-top: 10vh; }
  .nav-brand h1 { font-size: 1.5rem; }
  #my-image { width: 10rem; height: 10rem; }
  #content { width: 95%; font-size: 1rem; }
  .skills-display { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .skills-progress { max-width: 150px; }
  #experience .timeline-box { width: 80%; left: 10% !important; }
  #experience .timeline-box::after { left: -10% !important; }
  .timeline-divider { left: 5%; }
  #education .timeline-box { width: 80%; left: 10% !important; }
  .edu-divider { left: 5%; }
  #portfolio .project-img { max-width: 250px; }
  #main-content { flex-direction: column; }
  #form-align, #info { width: 100%; }
}

@media screen and (max-width: 480px) {
  #resume-header { height: 40vh; }
  .nav-brand h1 { font-size: 1.3rem; }
  .section-heading { font-size: 1.5rem; }
  .skills-progress { max-width: 120px; height: 1.5rem; }
  .skill-name span { font-size: 0.8rem; }
  .timeline-box { width: 90%; left: 5% !important; }
  .timeline-box::after { left: -8% !important; }
  .project-img img { height: 150px; }
  .portfolio-details h3 { font-size: 1rem; }
  .portfolio-details p { font-size: 0.85rem; }
  .footer { font-size: 1.5rem; }
  form input, form textarea { font-size: 0.9rem; }
  .form-btn { font-size: 0.9rem; padding: 0.6rem 1rem; }
  .nav-menu li a { font-size: 1rem; }
}