/* ===== Basic Styles ===== */
/* Use relative font sizes for better scaling */
html {
  font-size: 16px; /* Base font size for scaling */
}

body {
  background-color: #1727d1;
  color: #F0F0F0;
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 1rem; /* Use rem for scaling */
}

/* Make sure everything uses border-box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Navbar ===== */
.navbar {
  background-color: #1727d1;
  padding: 0.5rem 0;
  width: 100%;
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 1100px;
  margin-left: auto;
  margin-right: 2.5rem;
}
.navbar li {
  margin-left: 1.5rem;
}
.navbar a {
  color: #F0F0F0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
  font-size: 1rem;
}
.navbar a:hover {
  color: #1784D1;
}

/* ===== Hero Section ===== */
.hero {
  background: url('img/hero_3.jpg') center center no-repeat;
  background-size: cover;
  padding: 3.5rem 0;
  border-bottom: 0.9rem solid #1727D1;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
  gap: 3rem;
}
.hero-img-wrapper {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  width: 15.6rem;
  height: 15.6rem;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #1A1A1A;
}
.hero-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.subtle-text {
  color: #F0F0F0;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  margin-top: 0;
  opacity: 0.8;
}
.hero-text h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  color: #F0F0F0;
  text-shadow: 1px 2px 8px rgba(0,0,0,0.18);
  transition: color 0.4s, text-shadow 0.4s;
}
.hero-text h1:hover {
  color: #1784D1;
  text-shadow: 0 0 1rem #1784D1, 1px 2px 8px rgba(0,0,0,0.18);
}
.hero-buttons {
  margin-top: 0.7rem;
  display: flex;
  gap: 1rem;
}
.hero-buttons .button {
  background: #1727d1;
  border: 2px solid #1727d1;
  border-radius: 10%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border 0.2s;
  text-decoration: none;
}
.hero-buttons .button:hover {
  background: #1784D1;
  border-color: #1784D1;
}
.button .icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* ===== Responsive Hero ===== */
@media (max-width: 1000px) {
  .hero-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .hero-text {
    text-align: center;
  }
}

/* ===== Bio/About Section ===== */
.bio {
  background: #fff;
  color: #222;
  padding: 3.5rem 0;
  text-align: center;
}
.bio .about-subtitle {
  color: #888;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.bio h2 {
  color: #1727D1;
  font-size: 2rem;
  margin: 0 0 2rem 0;
  font-weight: bold;
}
.about-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.about-img-wrapper {
  background: #f6f6f6;
  border-radius: 2rem;
  box-shadow: 0 2px 2rem rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 25rem;
  min-height: 25rem;
}
.about-img {
  width: 28rem;
  height: 28rem;
  object-fit: cover;
  border-radius: 1.5rem;
  display: block;
}
.about-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 21rem;
}
.about-cards {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  justify-content: flex-start;
}
.about-card {
  background: #fff;
  border: 2px solid #bbb;
  border-radius: 1.1rem;
  padding: 1.7rem 2.2rem;
  min-width: 16rem;
  text-align: center;
  box-shadow: 0 2px 0.5rem rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.about-card .icon {
  width: 2rem;
  height: 2rem;
  font-size: 2rem;
  margin-bottom: 0.7rem;
  display: block;
  color: #822659;
}
.about-card-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: #222;
}
.about-card-subtitle {
  color: #555;
  font-size: 1rem;
  margin-bottom: 0.1rem;
}
.bio p {
  color: #222;
  max-width: 44rem;
  margin: 0;
  text-align: left;
  line-height: 1.6;
  font-size: 1.1rem;
}

/* ===== Responsive Bio/About ===== */
@media (max-width: 1220px) {
  .about-content {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .about-img-wrapper {
    margin-bottom: 16px;
    max-width: 100%;
    min-width: 0;
    padding: 16px;
  }
  .about-info {
    align-items: center;
    min-width: 0;
    width: 100%;
  }
  .about-cards {
    flex-direction: column;
    align-items: center;
    width: 70%;
  }
  .about-card {
    min-width: 220px;
    width: 60%;
  }
  .bio p {
    text-align: center;
    margin: 0 auto;
  }
}

/* ===== Skills Section ===== */
.skills-section {
  background: #1727D1;
  color: #F0F0F0;
  padding: 3rem 2rem;
  text-align: center;
}
.skills-subtitle {
  color: #cfd8e3;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 0.2rem;
}
.skills-title {
  font-size: 2rem;
  font-weight: bold;
  margin: 0 0 1.5rem 0;
  color: #F0F0F0;
}
.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  margin-top: 0.6rem;
}
.skill-card {
  background: rgba(255,255,255,0.08);
  border-radius: 0.6rem;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #F0F0F0;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.skill-icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-block;
}
.skill-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 1rem #1784D1;
}

/* ===== Experience Section ===== */
.experience-section {
  background: url('img/hero_3.jpg') center center no-repeat;
  background-size: cover;
  color: #F0F0F0;
  padding: 2.5rem 0;
  text-align: center;
}
.experience-section h2 {
  color: #F0F0F0;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: bold;
}
.experience-list {
  max-width: 44rem;
  margin: 0 auto;
  text-align: left;
}
.experience-item {
  background: #1727D1;
  border: 1px solid #f0f0f0;
  border-radius: 0.75rem;
  padding: 1.2rem 1.2rem 0.6rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 0.5rem rgba(23, 39, 209, 0.06);
}
.experience-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #F0F0F0;
  font-size: 1.1rem;
  font-weight: bold;
}
.job-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}
.job-dates {
  color: #bfc8d6;
  font-size: 0.95rem;
  font-style: italic;
}
.experience-item ul {
  margin-top: 0.2rem;
  margin-bottom: 0.7rem;
  padding-left: 1.2rem;
}
.job-title strong {
  color: #f0f0f0;
  font-weight: bold;
}
.experience-item,
.experience-item ul,
.experience-item ul li,
.experience-item .job-dates {
  font-weight: normal;
}
.experience-item ul li {
  font-family: Arial, sans-serif;
  color: #f0f0f0;
  font-size: 1rem;
  opacity: 0.85;
}

/* ===== Projects Section ===== */
.projects {
  max-width: 50rem;
  margin-top: 0px;
  padding: 3rem 0;
  min-width: 100%;
  background: #F0F0F0;
  color: #F0F0F0;
  text-align: center;
}
.projects h2 {
  color: #1727D1;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: bold;
}
.projects-subtitle {
  color: #888;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 0.2rem;
  margin-top: 0;
  text-align: center;
}
.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
}
.project-card {
  background: #F0F0F0;
  color: #1A1A1A;
  border-radius: 0.9rem;
  box-shadow: 0 2px 1.5rem rgba(23, 39, 209, 0.08);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 44rem;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid #bbb;
}
.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 1.5rem #1784D1;
}
.project-img {
  width: 20rem;
  height: 15rem;
  object-fit: cover;
  object-position: left top;
  border-radius: 0.6rem;
  border: 2px solid #1784D1;
  background: #eee;
}
.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.project-title {
  margin: 0 0 0.5rem 0;
  color: #1727d1;
  font-size: 1.2rem;
  font-weight: bold;
}
.project-desc {
  font-family: Arial, sans-serif;
  margin: 0 0 1rem 0;
  color: #1A1A1A;
  font-size: 1rem;
  text-align: left;
  opacity: 0.95;
}
.project-card .button {
  background-color: #1727d1;
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  margin-top: 0.2rem;
  transition: background 0.2s;
}
.project-card .button:hover {
  background-color: #1784D1;
}

/* ===== General Headings & Lists ===== */
h1, h2, h3 {
  margin-top: 0;
  color: #F0F0F0;
}
ul {
  padding-left: 1.2rem;
}
.button, button, input[type="submit"] {
  background-color: #3E5641;
  color: #F0F0F0;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  margin-top: 0.6rem;
}

/* ===== Footer Styles ===== */
.footer {
  background: #1727d1; 
  color: #F0F0F0;    
  text-align: center;
  padding: 0.6rem;
  margin-top: 0;
  font-size: 1.1rem;
  border-top: 2px solid #1784D1;
}
.footer a {
  color: #F0F0F0;
  text-decoration: underline;
  transition: color 0.2s;
}
.footer a:hover {
  color: #1784D1;
}

/* ===== Responsive Styles for Small Screens ===== */
/* All responsive styles are grouped here for simplicity */
@media (max-width: 700px) {
  html {
    font-size: 20px; /* Make all text bigger on phones */
  }

  body {
    padding: 0;
    margin: 0;
  }

  /* Navbar: stack links vertically */
  .navbar ul {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0 1em;
    width: 100vw;
  }
  .navbar li {
    margin: 0.5em 0 0 0;
  }

  /* Hero section: stack vertically */
  .hero-content {
    flex-direction: column;
    gap: 1em;
    padding: 0 1em;
    width: 100vw;
  }
  .hero-img {
    width: 40vw;
    max-width: 180px;
    height: auto;
  }
  .hero-text h1 {
    font-size: 2em;
  }

  /* About section: stack vertically */
  .about-content {
    flex-direction: column;
    gap: 1em;
    padding: 0 1em;
    width: 100vw;
  }
  .about-img-wrapper,
  .about-img {
    width: 80vw;
    max-width: 320px;
    height: auto;
    min-width: 0;
    min-height: 0;
  }
  .about-info {
    width: 100%;
    align-items: center;
  }
  .about-cards {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1em;
  }
  .about-card {
    width: 95%;
    min-width: 0;
    padding: 1em 0.5em;
  }
  .bio h2,
  .skills-title,
  .experience-section h2,
  .projects h2 {
    font-size: 1.3em;
  }
  .bio p,
  .project-desc,
  .experience-item ul li {
    font-size: 1em;
  }

  /* Skills section: wrap skill cards into rows and center them */
  .skills-row {
    display: flex;            /* Use flexbox for layout */
    flex-wrap: wrap;          /* Allow cards to wrap to new lines */
    flex-direction: row;      /* Arrange cards in rows */
    justify-content: center;  /* Center the cards horizontally */
    gap: 0.7em;               /* Space between cards */
  }
  .skill-card {
    width: 44%;               /* Two cards per row with a little gap */
    min-width: 120px;         /* Prevent cards from getting too small */
    max-width: 180px;         /* Prevent cards from getting too wide */
    margin-bottom: 0.7em;     /* Space below each card */
    font-size: 1em;
    padding: 0.7em 0.5em;
    box-sizing: border-box;   /* Include padding in width */
    text-align: center;
    display: flex;            /* Center content vertically and horizontally */
    align-items: center;
    justify-content: center;
  }

  /* Experience section */
  .experience-section {
    padding: 1.5em 0;
    width: 100vw;
  }
  .experience-list {
    padding: 0 0.5em;
    width: 100vw;
  }
  .experience-item {
    padding: 0.7em 0.5em;
    width: 100%;
  }
  .experience-item h3,
  .job-title strong {
    font-size: 1em;
  }
  .job-dates {
    font-size: 0.95em;
  }

  /* Projects section */
  .projects {
    padding: 1.5em 0;
    width: 100vw;
    min-width: 100vw;
  }
  .project-list {
    gap: 1em;
    padding: 0 0.5em;
    width: 100vw;
  }
  .project-card {
    flex-direction: column;
    align-items: center;
    padding: 0.7em 0.5em;
    width: 98vw;
    max-width: 98vw;
  }
  .project-img {
    width: 90vw;
    max-width: 320px;
    height: auto;
    margin-bottom: 0.6em;
  }
  .project-info {
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .project-title {
    font-size: 1em;
  }
  .project-card .button {
    width: 90%;
    font-size: 1em;
    padding: 0.7em 0;
  }

  /* Footer */
  .footer {
    font-size: 1em;
    padding: 0.5em;
    width: 100vw;
  }

  /* Make all main sections take up the full width on small screens */
  /* Make sure all sections use the full width and backgrounds cover edge-to-edge */
  .bio,
  .skills-section,
  .experience-section,
  .projects,
  .footer {
    width: 100%;      /* Use 100% instead of 100vw */
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  /* Remove max-widths that cause content to be too narrow */
  .about-content,
  .experience-list,
  .project-list {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

  /* Make cards fit the screen and not overflow */
  .about-card,
  .skill-card,
  .experience-item,
  .project-card {
    width: 98%;
    max-width: 98%;
  }
}
