/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Mulish", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  margin: 0 auto;
  background-color: #f8f9fa;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1 {
  font-family: "Roboto Slab", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-family: "Roboto Slab", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 2rem;
  line-height: 1.3;
}

h3 {
  font-family: "Roboto Slab", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 1.5rem;
  line-height: 1.4;
}

header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  z-index: 10;
  color: azure;
  background-color: black;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/*socials section*/

#socials {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  background-color: #ffffff;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card {
  padding: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

nav ul {
  text-decoration: none;
  font-size: x-large;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: black;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

nav ul li a:hover {
  color: #0047ab;
  background-color: rgba(0, 71, 171, 0.1);
}

nav ul li a:focus {
  outline: 2px solid #0047ab;
  outline-offset: 2px;
}

nav ul li a:active {
  transform: scale(0.95);
}

/*bio section*/

#bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background-color: #ffffff;
  padding: 4rem 3rem;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#bio img {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 0.5rem;
  display: block;
}

#bio img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#bio p {
  padding: 0;
  margin: 0;
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333;
}

/*skills section*/

#skills {
  background-color: #ffffff;
  padding: 4rem 3rem;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#skills h2 {
  text-align: center;
  margin: 0 0 3rem 0;
  color: #333;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid #0047ab;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 71, 171, 0.15);
}

.skill-category h3 {
  margin: 0 0 1.5rem 0;
  color: #0047ab;
  font-size: 1.3rem;
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-category li {
  padding: 0.5rem 0;
  color: #555;
  font-size: 1rem;
  position: relative;
  padding-left: 1.5rem;
}

.skill-category li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #0047ab;
  font-weight: bold;
}

.skill-category p {
  margin: 0;
  line-height: 1.7;
  color: #555;
  font-size: 1rem;
}

/*projects*/

#projects {
  padding: 3rem;
  background-color: #ffffff;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#projects .card {
  text-align: center;
  margin-bottom: 2rem;
}

#projects h1 {
  text-align: center;
  border: 2px solid black;
  padding: 10px 20px;
  display: inline-block;
  background-color: black;
  color: white;
  border-radius: 8px;
}

#myProjects {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
}

.myProjects-title {
  background-color: #ffffff;
  color: black;
  cursor: pointer;
  padding: 15px 20px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.myProjects-title:hover {
  background-color: #f0f7ff;
  border-left-color: #0047ab;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 71, 171, 0.15);
}

.myProjects-title:active {
  transform: translateX(8px) scale(0.98);
}

.myProjects-title:focus {
  outline: 2px solid #0047ab;
  outline-offset: 2px;
}

.myProjects-title.active {
  background-color: #f6f6f6;
  color: black;
  border-left-color: #0047ab;
}

.myProjects-title h3 {
  margin: 0;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.myProjects-title:hover h3 {
  color: #0047ab;
}

.myProjects-description {
  max-height: 0px;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #f8f9fa;
  font-weight: 300;
  border-radius: 0 0 8px 8px;
  margin: 0;
  line-height: 1.6;
  color: #555;
}

.myProjects-description.active {
  max-height: 800px;
  padding: 1.5rem 2rem 2rem 2rem;
  border-top: 1px solid #e0e0e0;
}

.myProjects-description p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

.myProjects-description a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #0047ab;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 71, 171, 0.2);
  position: relative;
  padding-right: 2.5rem;
  width: fit-content;
}

.myProjects-description a::after {
  content: "→";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.myProjects-description a:hover {
  background-color: #003580;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 71, 171, 0.3);
}

.myProjects-description a:hover::after {
  transform: translateY(-50%) translateX(4px);
}

.myProjects-description a:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 71, 171, 0.2);
}

.myProjects-description a:focus {
  outline: 2px solid #0047ab;
  outline-offset: 2px;
}

/* Form css*/

#contact {
  background: #ffffff;
  padding: 4rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#contact form {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
}

#contact form h2 {
  margin: 0;
  margin-bottom: 2rem;
  text-align: center;
  color: #333;
}

.input-row {
  display: flex;
  margin-bottom: 1rem;
  width: 100%;
}

.input-group {
  flex-grow: 1;
  margin-right: 1rem;
  display: flex;
  flex-direction: column;
}

.input-group label {
  margin-bottom: 0.5rem;
}

.input-group input {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background-color: #fafafa;
}

.input-group input:focus {
  outline: none;
  border-color: #0047ab;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.input-group input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

.input-group input:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

.input-group select {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background-color: #fafafa;
}

.input-group select:focus {
  outline: none;
  border-color: #0047ab;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.input-group textarea {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  height: 120px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s ease;
  background-color: #fafafa;
  font-family: inherit;
}

.input-group textarea:focus {
  outline: none;
  border-color: #0047ab;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.input-group textarea:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

.input-group textarea:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

form button {
  border: 2px solid #0047ab;
  border-radius: 50px;
  padding: 0.5rem 2rem;
  background: #f6f6f6;
  color: #0047ab;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

form button:hover {
  color: #ffffff;
  background: #0047ab;
}

form button:focus {
  outline: 2px solid #0047ab;
  outline-offset: 2px;
}

form button:active {
  transform: scale(0.98);
}

form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#footer {
  text-align: center;
  padding: 2rem;
  margin: 2rem auto 2rem auto;
  max-width: 1200px;
  color: #666;
  font-size: 0.9rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 0 1rem;
  }

  #bio {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  #bio img {
    max-width: 300px;
  }

  #bio p {
    font-size: 1rem;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
    font-size: large;
    align-items: center;
  }

  .input-row {
    flex-direction: column;
  }

  .input-group {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  #contact {
    padding: 2rem 1.5rem;
  }

  #projects {
    padding: 2rem 1.5rem;
  }

  #socials {
    padding: 1.5rem 1rem;
  }

  #skills {
    padding: 2rem 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #footer {
    margin: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 0.5rem;
  }

  header h1 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }

  #bio,
  #contact,
  #projects,
  #socials,
  #skills {
    padding: 1.5rem 1rem;
    margin: 1rem 0;
  }

  #bio p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  nav ul {
    font-size: medium;
    gap: 8px;
  }

  .myProjects-title {
    padding: 12px 15px;
  }

  .myProjects-title:hover {
    transform: translateX(4px);
  }

  #footer {
    margin: 1.5rem 0.5rem;
    padding: 1.5rem 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
