/* <uniquifier>: Use a unique and descriptive class name
<weight>: Use a value from 300 to 800 */

/* Skip link: visible only on focus for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background-color: #08276b;
  color: #e6e9f0;
  padding: 8px 16px;
  z-index: 1000;
  font-size: 14px;
  text-decoration: underline;
}

.skip-link:focus {
  top: 0;
}

/* Visually hidden but available to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible {
  outline: 3px solid #dcab0b;
  outline-offset: 2px;
  border-radius: 2px;
}

body {
  background-color: #e6e9f0;
  color: #08276b;
  /* max-width: 95%; */
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 10px;
  font-variation-settings: "wdth" 100;
}

.intro {
  background-color: #08276b;
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 0;
  color: #e7e7e7;
}

.me {
  width: 200px;
  max-width: 30%;
  height: auto;
}

.header-txt {
  display: flex;
  flex-direction: column;
  margin-left: 5px;
  margin-right: 5px;
}

a {
  text-decoration: none;
}

a:link {
  color: #e6e9f0;
}

a.project-link:link {
  color: #08276b;
}

a:visited {
  color: #e6e9f0;
}

a.project-link:visited {
  color: #08276b;
}

a:hover {
  color: #525355;
}

a.project-link:hover {
  color: #525355;
}

a:active {
  color: #dcab0b;
}

a.project-link:active {
  color: #dcab0b;
}

.main-content {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}

h1 {
  font-family: "Work Sans", sans-serif;
  text-align: center;
  font-style: normal;
  margin: 0;
  padding: 0;
  font-size: 30px;
}

h2 {
  text-align: center;
  font-style: normal;
  margin-top: 20px;
  padding: 0;
  font-size: 25px;
}

.prof-contact {
  display: flex;
  flex-direction: row;
  justify-content: center;
  row-gap: 2px;
  font-size: 8px;
}

.prof-contact > a {
  padding: 10px;
}

.aboutme {
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 100vh;
}

.img-typing {
  background-image: url('media/hands-typing.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.aboutme::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.75); /* White with 50% opacity */
  z-index: 0;
}

.aboutme p {
  margin: 20px;
  opacity: 100%;
  position: relative; /* Bring text above the overlay */
  z-index: 1;
  opacity: 1; /* Ensure text is fully opaque */
  top: 40vh;
  font-weight: 700;
  color: rgba(0, 0, 0, 1);
  text-align: justify;
}

.techstack {
  margin-right: 5px;
}

.projects {
  display: flex;
  flex-flow: row wrap;
  gap: 10px;
}

.project-item {
  text-decoration: none;
  margin-top: 10px;
  max-width: 300px;
  padding-right: 20px;
}

.project-link {
  font-style: oblique;
  font-weight: bold;
}

.project-img {
  max-width: 200px;
}

.title-container {
  text-align: center;
}

.page-title {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  background-color: #2983bc;
  border-radius: 10px;
  margin: 5px 0;
  padding: 5px 10px 10px;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  color: #e6e9f0;
}

footer {
  background-color: #08276b;
  padding: 5px;
  bottom: 0;
  color: #e7e7e7;
  font-style: italic;
  font-size: 10px;
}

/* Dyslexia mode toggle button */
.dyslexia-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  background-color: #e6e9f0;
  color: #08276b;
  border: 2px solid #08276b;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.dyslexia-btn:hover {
  background-color: #08276b;
  color: #e6e9f0;
}

.dyslexia-btn[aria-pressed="true"] {
  background-color: #dcab0b;
  color: #1a1a1a;
  border-color: #b38a00;
}

.dyslexia-btn:focus-visible {
  outline: 3px solid #dcab0b;
  outline-offset: 2px;
}

/* =============================================
   Dyslexia-friendly mode
   Toggled by adding .dyslexia-mode to <body>
   ============================================= */

/* Body: warm cream background, OpenDyslexic font, generous spacing */
.dyslexia-mode {
  font-family: 'OpenDyslexic', Arial, sans-serif;
  background-color: #fdf6e3;
  color: #1a1a1a;
  line-height: 1.8;
  letter-spacing: 0.04em;
  word-spacing: 0.12em;
}

/* Header: slightly lighter navy, more breathing room */
.dyslexia-mode .intro {
  background-color: #0d3366;
  gap: 30px;
}

.dyslexia-mode h1,
.dyslexia-mode h2 {
  font-family: 'OpenDyslexic', Arial, sans-serif;
  letter-spacing: 0.05em;
}

/* Keep header links light against dark background */
.dyslexia-mode .intro a:link,
.dyslexia-mode .intro a:visited {
  color: #e6e9f0;
}

/* About me: remove busy background image, warm cream overlay, left-aligned text */
.dyslexia-mode .img-typing {
  background-image: none;
  background-color: #fdf6e3;
}

.dyslexia-mode .aboutme::before {
  background-color: #fdf6e3;
}

.dyslexia-mode .aboutme p {
  text-align: left;
  line-height: 2;
  font-size: 1.1em;
  color: #1a1a1a;
}

/* Projects section: more padding, card-style items */
.dyslexia-mode section[aria-labelledby="projects-heading"] {
  padding: 10px 20px 30px;
}

.dyslexia-mode .projects {
  gap: 20px;
}

.dyslexia-mode .project-item {
  background-color: #fff8e7;
  border-left: 4px solid #0d3366;
  border-radius: 6px;
  padding: 14px 18px;
  max-width: 340px;
  line-height: 1.9;
}

/* No italic — harder to read for dyslexia; add underline for link visibility */
.dyslexia-mode .project-link {
  font-style: normal;
  text-decoration: underline;
}

.dyslexia-mode a.project-link:link,
.dyslexia-mode a.project-link:visited {
  color: #0d3366;
}

/* Footer: no italic */
.dyslexia-mode footer {
  font-style: normal;
  background-color: #0d3366;
}

/* Responsive CSS for iPad and larger screens */
@media screen and (width >= 700px) {
  body {
    font-size: 15px;
  }

  .intro {
    gap: 20px;
  }

  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 30px;
  }

  .prof-contact {
    font-size: 13px;
  }

  footer {
    font-size: 12px;
  }
}
