/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  background-color: #f0fff0;
  color: #2f4f4f;
  font-family: "Arial", "Helvetica", "sans-serif";
  max-width: 1200px;
  border: 2px solid #2f4f4f;
  margin: 20px auto;
  padding: 20px;
}

/* Typography */
h1 {
  color: #2f4f4f;
  font-size: 2.5em;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
  color: #2f4f4f;
  font-size: 2em;
  margin-top: 25px;
  margin-bottom: 15px;
  border-bottom: 2px solid #2f4f4f;
  padding-bottom: 5px;
  text-transform: capitalize;
}

h3 {
  color: #3a5f5f;
  font-size: 1.5em;
  margin-top: 20px;
  margin-bottom: 10px;
}

h4 {
  color: #4f6f6f;
  font-size: 1.1em;
  margin-top: 10px;
  margin-bottom: 10px;
  font-style: italic;
}

/* Links */
a {
  text-decoration: none !important;
  color: #333;
  transition: color 0.3s ease;
}

a:hover {
  color: #4f6f6f !important;
  text-decoration: none !important;
}

/* Navigation Styles */
#nav {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #f5f5f5;
  padding: 10px;
  text-align: left;
  z-index: 2;
  margin: 0;
  left: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: block;
}

#nav h2 {
  border-bottom: none;
  margin-bottom: 10px;
}

#nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
}

#nav a,
.mobile-nav-links a {
  padding: 5px 10px;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
}

.hamburger {
  cursor: pointer;
  padding: 15px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #2f4f4f;
  margin: 5px 0;
  transition: all 0.5s ease-in-out;
}

/* Sections */
section {
  margin-bottom: 20px;
}

.content-section,
.profile-section {
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  width: 45%;
  background-color: #f5f5f5;
  padding: 10px;
  margin: 20px auto;
  border: 2px solid #2f4f4f;
  box-shadow: #2f4f4f 2px 2px 8px;
}

.profile-section {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  min-height: 290px;
  padding: 20px;
  background: none;
  border: none;
  box-shadow: none;
}

.content-section h2 {
  text-align: center;
}

/* Profile Section Elements */
.profile-section img {
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid #2f4f4f;
  box-shadow: 2px 2px 8px #2f4f4f;
  position: absolute;
  top: -40px;
  left: -300px;
  z-index: 1;
}

.profile-section h1 {
  text-align: center;
  white-space: nowrap;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.contact-info {
  position: absolute;
  right: -300px;
  top: 80%;
  transform: translateY(-50%);
  text-align: left;
}

/* Form Elements */
form label {
  display: block;
  margin-bottom: 5px;
}

form input,
form textarea,
a,
form select {
  margin-bottom: 15px;
  width: 95%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input,
textarea,
select {
  outline: none;
  border: 1px solid #2f4f4f;
  border-radius: 25px;
  padding: 8px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #4f6f6f;
  box-shadow: 0 0 5px rgba(47, 79, 79, 0.3);
}

/* Buttons */
button {
  padding: 8px 15px;
  margin-right: 10px;
}

button:hover {
  background-color: #2f4f4f;
  color: white;
  cursor: pointer;
}

/* Table Styles */
table {
  border-collapse: collapse;
  border: 1px solid #333;
  margin: 0 auto;
}

th,
td {
  padding: 4px;
  border: 1px solid #333;
}

/* Lists */
#skills ul li {
  margin-bottom: 8px;
}

/* Footer */
footer {
  padding: 20px 0;
  text-align: center;
  background-color: #f0fff0;
}

/* Scroll Margin */
#summary,
#work-experience,
#education,
#skills,
#programming-proficiency,
#social-media,
#contact-me {
  scroll-margin-top: 30px;
}

/* Mobile Styles */
@media screen and (max-width: 430px) {
  body {
    padding-top: 60px;
    max-width: 100%;
    margin: 10px;
    padding: 10px;
    position: relative;
  }

  #nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    position: fixed;
    top: -8px;
    width: 100%;
    background-color: #f5f5f5;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-22.5px);
    max-width: 100%;
    border-radius: 28px;
  }

  .mobile-nav-links {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    position: fixed;
    width: 100%;
    top: 30px;
    left: 0;
    background-color: #f5f5f5;
    list-style: none;
  }

  .mobile-nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav-links li {
    padding: 5px;
    text-align: center;
    border-top: 1px solid #ddd;
    border-radius: 28px;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .content-section,
  .profile-section {
    width: 100%;
    margin: 10px auto;
  }

  .profile-section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 60px auto 20px;
  }

  .profile-section img {
    position: static;
    height: 150px;
    margin: 10px auto;
  }

  .profile-section h1 {
    position: static;
    transform: none;
    margin: 10px 0;
    width: 100%;
    font-size: 2em;
    word-wrap: break-word;
    white-space: normal;
  }

  .contact-info {
    position: static;
    margin: 10px auto;
    text-align: center;
    width: 100%;
  }

  .content-section:hover {
    transform: scale(1.01);
  }
}
