/* Base styles for HTML and body */
html {
  box-sizing: border-box;
  font-size: 18px;
  font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
  background: #f7f9fa;
  color: #222;
  scroll-behavior: smooth; /* Enables smooth scrolling for anchor links */
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* Body layout and transition */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f9fa;
  color: #222;
  transition: background 0.3s, color 0.3s; /* Smooth color transitions */
}

/* Header styles */
header {
  background: #222e3a;
  color: #fff;
  padding: 2rem 0 1rem 0;
  text-align: center;
}

/* Header title and subtitle */
header h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 2px;
}
header p {
  margin: 0.5rem 0 0 0;
  font-size: 1.2rem;
  font-weight: 400;
}

/* Navigation styles */
nav[role="navigation"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
nav[role="navigation"] a {
  color: #b0c4d8;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
nav[role="navigation"] a:focus,
nav[role="navigation"] a:hover {
  background: #3a4a5a;
  color: #fff;
}

/* Main content area */
main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Section spacing */
section {
  margin-bottom: 2.5rem;
}

/* Section headings */
h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222e3a;
}

/* List styles */
ul, ol {
  padding-left: 1.5em;
}

/* Project card styles */
#projects article {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(34,46,58,0.08);
  margin-bottom: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
#projects article:hover {
  box-shadow: 0 4px 16px rgba(34,46,58,0.15);
}
#projects figure {
  margin: 0 0 1rem 0;
  text-align: center;
}
#projects img {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(34,46,58,0.10);
  outline: none;
  transition: box-shadow 0.2s;
}
#projects img:focus {
  box-shadow: 0 0 0 3px #b0c4d8;
}
#projects figcaption a {
  color: #222e3a;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.1rem;
}
#projects figcaption a:hover,
#projects figcaption a:focus {
  text-decoration: underline;
  color: #3a4a5a;
}
#projects p {
  margin: 0.5em 0;
}

/* Skills section styles */
#skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
}
#skills li {
  background: #eaf0f6;
  border-radius: 8px;
  padding: 0.5em 1em;
  font-size: 1rem;
  transition: background 0.2s;
  cursor: default;
}
#skills li:hover {
  background: #d0e0f0;
}

/* Contact form styles */
#contact form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(34,46,58,0.08);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#contact label {
  font-weight: 500;
  margin-bottom: 0.3em;
  color: #222e3a;
}
#contact input,
#contact textarea {
  width: 100%;
  padding: 0.7em;
  border: 1px solid #b0c4d8;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}
#contact input:focus,
#contact textarea:focus {
  border-color: #222e3a;
  outline: none;
}
#contact button {
  background: #222e3a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.8em 2em;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
#contact button:hover,
#contact button:focus {
  background: #3a4a5a;
}

/* Footer styles */
footer {
  background: #222e3a;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 1rem;
}

/* Hamburger menu styles for mobile navigation */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 40px;
  height: 40px;
  cursor: pointer;
  margin: 0;
  background: none;
  border: none;
  outline: none;
  position: absolute;      /* Change from absolute to fixed */
  top: 10px;            /* Move closer to the very top */
  left: 10px;           /* Move closer to the very left */
  z-index: 100;         /* Ensure it's above other elements */
}
.hamburger span {
  height: 4px;
  width: 28px;
  background: #b0c4d8;
  margin: 5px 0;
  border-radius: 2px;
  transition: background 0.2s;
}
.hamburger:focus span,
.hamburger:hover span {
  background: #fff;
}

/* Responsive styles for mobile screens */
@media (max-width: 700px) {
  header {
    position: relative;
    padding-top: 60px;  /* Add space at the top for hamburger */
  }
  nav[role="navigation"] {
    position: relative;
  }
  nav[role="navigation"] ul {
    display: none;
    flex-direction: column;
    background: #222e3a;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100vw;
    z-index: 10;
    padding: 1em 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 0 0 16px 16px;
    text-align: left;
    gap: 0;
  }
  nav[role="navigation"].active ul {
    display: flex;
  }
  nav[role="navigation"] ul li {
    width: 100%;
    margin: 0;
  }
  nav[role="navigation"] ul li a {
    display: block;
    width: 100%;
    padding: 1em 2em;
    font-size: 1.1rem;
    color: #b0c4d8;
    border-radius: 0;
    border-bottom: 1px solid #34425a;
    transition: background 0.2s, color 0.2s;
  }
  nav[role="navigation"] ul li:last-child a {
    border-bottom: none;
  }
  nav[role="navigation"] ul li a:focus,
  nav[role="navigation"] ul li a:hover {
    background: #3a4a5a;
    color: #fff;
  }
  .hamburger {
    display: flex;
  }
}

@media (max-width: 500px) {
    /* Header title and subtitle */
  header h1 {
    padding: 3rem 0 0 0; /* Adjust padding to account for hamburger */
    font-size: 2.5rem;
    letter-spacing: 2px;
  }
  header p {
    margin: 0.5rem 0 0 0;
    font-size: 1.2rem;
    font-weight: 400;
  }
}

/* Skill icons using ::before for visual enhancement */
#skills li::before {
  display: inline-block;
  margin-right: 0.5em;
  font-size: 1.2em;
  vertical-align: middle;
}

/* Use emoji or Unicode for most, and a background-image for Blazor and others if needed */
#skills li:nth-child(1)::before { content: "🟧"; } /* HTML5 */
#skills li:nth-child(2)::before { content: "🎨"; } /* CSS3 */
#skills li:nth-child(3)::before { content: "🟨"; } /* JavaScript */
#skills li:nth-child(4)::before { content: "⚛️"; } /* React */
#skills li:nth-child(5)::before { content: "🟩"; } /* Node.js */
#skills li:nth-child(6)::before { content: "🔗"; } /* Git & GitHub */
#skills li:nth-child(7)::before { content: "📱"; } /* Responsive Design */

/* Blazor icon using background-image */
#skills li:nth-child(8)::before {
  content: "";
  width: 1.2em;
  height: 1.2em;
  background: url('Assets/Blazor.png') no-repeat center/contain;
  vertical-align: middle;
}

/* C# */
#skills li:nth-child(9)::before { content: "💠"; } /* C# */

/* Web Application Development */
#skills li:nth-child(10)::before { content: "🌐"; } /* Web Application Development */

/* Frontend Architecture */
#skills li:nth-child(11)::before { content: "🏛️"; } /* Frontend Architecture */

/* End of CSS */
