/*-------------------- Base Style --------------------*/
html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  scroll-behavior: smooth;
}

/*-------------------- Global Color and Font Variables --------------------*/
:root {
  --color-bg: #efe5d6;
  --color-surface: #f6eee2;
  --color-text: #273328;
  --color-muted: #6d725f;
  --color-border: #cfc1ac;
  --color-hover: #c0ae95;

  --color-primary: #1f5a3f;
  --color-primary-2: #133b2a;
  --color-primary-gradient: linear-gradient(90deg, #25694b 0%, #1f5a3f 100%);

  --color-shadow: 0 10px 30px rgba(31, 45, 36, 0.15);

  --font-body: "Roboto", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
}

/*--------------------- Helper Classes --------------------*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

/*-------------------- Main Grid --------------------*/
main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  min-height: 100vh;
}

/*-------------------- Body Style --------------------*/
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  margin: auto;
}

/*-------------------- Default Grid Spacing --------------------*/
.page-title {
  grid-column: 1 / 13;
  grid-row: 1;
}
#about {
  grid-column: 1 / 13;
  grid-row: 2;
}
#skills {
  grid-column: 1 / 13;
  grid-row: 3;
}
#experience {
  grid-column: 1 / 13;
  grid-row: 4;
}
#education {
  grid-column: 1 / 13;
  grid-row: 5;
}
footer {
  grid-column: 1 / 13;
  grid-row: 6;
}

/*-------------------- Nav Styles --------------------*/
nav ul,
.related-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
}
nav li,
.related-links li {
  list-style: none;
}
nav a,
.related-links a {
  text-decoration: none;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.8rem;
  position: relative;
}
nav a::after,
.related-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0%;
  height: 0.125rem;
  transition: width 0.3s ease;
}
nav a::after {
  background: var(--color-primary);
}
.related-links a::after {
  background: var(--color-primary-2);
}
nav a:hover::after,
nav a:active::after,
.related-links a:hover::after,
.related-links a:active::after {
  width: 100%;
}
a:link,
a:visited {
  color: var(--color-text);
}
nav a:link,
nav a:visited {
  color: var(--color-primary);
}

/*-------------------- Title Styles --------------------*/
.page-title,
#skills h2,
#experience h2,
#education h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  text-align: center;
  margin: 2rem 0;
  color: var(--color-primary);
}
.page-title {
  font-size: 2.5rem;
  font-weight: 600;
}
#skills h2,
#experience h2,
#education h2 {
  font-size: 1.5rem;
  font-weight: 400;
}
.page-title:before,
.page-title:after,
#skills h2:before,
#skills h2:after,
#experience h2:before,
#experience h2:after,
#education h2:before,
#education h2:after {
  content: "";
  height: 2px;
  background: var(--color-primary);
}
.page-title:before,
.page-title:after,
#skills h2:before,
#skills h2:after {
  width: 8rem;
}
#experience h2:before,
#experience h2:after,
#education h2:before,
#education h2:after {
  width: 6rem;
}
.page-title:before,
#skills h2:before,
#experience h2:before,
#education h2:before {
  margin-right: 1rem;
}
.page-title:after,
#skills h2:after,
#experience h2:after,
#education h2:after {
  margin-left: 1rem;
}

/*-------------------- Card Styles --------------------*/
.bio,
.bio p,
.details,
.job,
.certificate,
#skills ul {
  border-radius: 20px;
  background-color: var(--color-surface);
  border: var(--color-border) 2px solid;
  gap: 1rem;
  padding: 1rem;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}
.bio:hover,
.details:hover,
.job:hover,
.certificate:hover,
#skills ul:hover,
#about:target .bio,
#about:target .details,
#skills:target > ul,
#experience:target .job,
#education:target .certificate {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  border-color: var(--color-hover);
}

/*-------------------- About Styles --------------------*/
#about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}
.bio {
  width: 90%;
  grid-column: 1 / 13;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 1rem;
  padding: 1rem;
}
dl {
  grid-column: 1 / 13;
  grid-row: 2;
  font-size: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
}

dt {
  font-weight: 800;
  font-family: var(--font-heading);
  grid-column: 1;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
dd {
  margin-left: -1rem;
  grid-column: 2 / 4;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.related-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-2);
}
.related-links {
  grid-column: 1 / 13;
  border-bottom: 1px solid var(--color-border);
}
img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--color-border) 3px solid;
  border-radius: 20px;
}

/*-------------------- Skills Styles --------------------*/
#skills {
  padding: 1rem;
  justify-self: center;
}
#skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 10px;
  margin: 0;
}
.skill {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: var(--color-bg);
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

/*-------------------- Experience Styles --------------------*/
#experience {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem;
}
.job {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}
.job *[itemprop="jobTitle"] {
  color: var(--color-primary-2);
}
.job *[itemprop="jobTitle"],
.job *[itemprop="name"],
.job *[itemprop="url"],
.job *[itemprop="addressLocality"] {
  display: block;
}

/*-------------------- Education Styles --------------------*/
#education {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem;
}
.certificate {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}
#education h3 {
  color: var(--color-primary-2);
}

/*-------------------- Footer Styles --------------------*/
footer {
  background: var(--color-primary-gradient);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--color-shadow);
  color: var(--color-bg);
}
#copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
#copyright a:link,
#copyright a:visited {
  color: var(--color-bg);
}

/*--------------------- Media Queries ---------------------*/
@media (min-width: 768px) {
  /* md */
  .bio {
    grid-column: 1 / 8;
    grid-row: 1 / 4;
  }
  .details {
    font-size: 0.9rem;
    grid-column: 8 / 13;
    grid-row: 1;
    row-gap: 2rem;
  }
  nav a {
    font-size: 1rem;
  }
  .related-links {
    grid-column: 8 / 13;
    grid-row: 3;
  }
  .page-title:before,
  .page-title:after,
  #skills h2:before,
  #skills h2:after {
    width: 12rem;
  }
  #experience h2:before,
  #experience h2:after,
  #education h2:before,
  #education h2:after {
    width: 10rem;
  }
}
@media (max-width: 811px) {
  /*related links overlap fix in between md and lg*/
  .related-links a {
    font-size: 0.9rem;
  }
  .details {
    font-size: 0.8rem;
  }
}

@media (min-width: 1024px) {
  /* lg */
  main {
    gap: 1.5rem;
  }
  #about {
    grid-template-rows: auto auto 1fr auto;
    grid-column: 1 / 6;
    grid-row: 2 / 5;
    align-content: start;
  }
  #skills {
    grid-column: 6 / 13;
    grid-row: 3;
  }
  #experience {
    grid-column: 6 / 13;
    grid-row: 2;
  }
  #education {
    grid-column: 6 / 13;
    grid-row: 4;
  }
  .bio {
    grid-column: 1/13;
    grid-row: 1;
  }
  .details {
    justify-self: center;
    width: 90%;
    grid-column: 1/13;
    grid-row: 2;
  }
  .related-links {
    grid-column: 1/13;
    grid-row: 4;
  }
  .page-title:before,
  .page-title:after {
    width: 20rem;
  }
}
@media (min-width: 2000px) {
  /* 2xl (skills was making it look pretty rough on ultrawide so I have this, still rough, but better)*/ 
  #skills ul {
    flex-direction: column;
    gap: 1rem;
  }
  #skills {
    width: 100%;
    box-sizing: border-box;
  }
}
