:root {
  --color-accent: #fc7e08;
  --color-highlight: #f8eade;
}
html {
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

p {
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.5rem;
}

p::selection,
h1::selection,
h2::selection,
h3::selection,
h4::selection,
h5::selection,
h6::selection {
  background-color: var(--color-accent);
  color: #0d1322;
}
body {
  background-color: #0d1322;
  color: #ceb29f;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 6rem;
}

.underlay {
  position: fixed;
  inset: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 10;
}

header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 400px;
}

header h1,
header h4,
.light-text {
  color: var(--color-highlight);
}

header a {
  text-decoration: none;
}

header h1 {
  font-weight: 600;
}

header h4 {
  font-weight: 400;
}

.nav-icon {
  opacity: 0%;
  transition-duration: 200ms;
}

nav {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  margin-left: 0rem;
  gap: 0.2rem;
}

nav a:hover .nav-icon,
nav a.active .nav-icon {
  opacity: 100%;
  color: var(--color-accent);
  margin-right: 0.5rem;
}

nav a:hover,
nav a.active {
  color: var(--color-text);
}

.social-links-container {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.icon-links {
  text-decoration: none;
  color: inherit;
  font-size: 1.5rem;
  transition-duration: 200ms;
  padding-right: 0.75rem;
  opacity: 50%;
}

.icon-links:hover,
.exp-links:hover {
  color: var(--color-accent);
  opacity: 70%;
}

main {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

section h5 {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
}

.sticky-header {
  position: sticky;
  top: 0;
  padding-top: 2rem;
  padding-bottom: 2rem;
  z-index: 10;
}

.sticky-header h5 {
  position: relative;
  z-index: 2;
}

.sticky-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(13, 19, 34, 0.8),
    rgba(13, 19, 34, 0.6)
  );
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  transition: backdrop-filter 300ms ease;
}

.sticky-header.is-stuck::before {
  backdrop-filter: blur(14px) saturate(200%);
  -webkit-backdrop-filter: blur(14px) saturate(200%);
}

.about-contents {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-contents p {
  font-size: 1rem;
}

.anchor-text,
.qualification {
  color: var(--color-highlight);
  text-decoration: none;
  font-weight: 450;
  transition-duration: 200ms;
}

.anchor-text:hover {
  color: var(--color-accent);
}

.exp-contents,
.edu-contents,
.project-contents {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.exp-card {
  border: 1px solid #ceb29f;
  border-radius: 0.5rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.5rem;
}

.card-column {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.exp-links {
  text-decoration: none;
  color: inherit;
  transition-duration: 200ms;
  align-items: center;
}

.tenure {
  opacity: 60%;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  font-size: 0.8rem;
}

.exp-card p,
.edu-contents p,
.project-card p {
  font-size: 0.9rem;
  line-height: 1.3rem;
}

.card-header {
  font-weight: 400;
  font-size: 0.95rem;
}

.tag-container {
  display: flex;
  gap: 0.25rem 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.3rem 0.5rem;
  border-radius: 0.6rem;
  color: var(--color-accent);
  background-color: rgba(252, 126, 8, 0.1);
}

.tag p {
  font-size: 0.8rem;
}

.project-image-container {
  max-width: 250px;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  order: 2;
}

.project-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.25rem;
  transition: filter 300ms ease;
}

.project-image-container img:hover {
  filter: grayscale(100%);
}

.project-card {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

.project-card .disclaimer {
  opacity: 20%;
}
.project-card .disclaimer:hover {
  color: var(--color-accent);
  opacity: 100%;
}
.anchor-text span {
  transition-duration: 200ms;
}

.anchor-text:hover span {
  margin-left: 0.5rem;
}

footer p {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 4rem;
  opacity: 50%;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-accent);
  opacity: 70%;
  color: #0d1322;
  padding: 0.3rem 0.5rem;
  border-radius: 100%;
  overflow: hidden;
  text-decoration: none;
  font-size: 1rem;
  aspect-ratio: 1/1;
  transition-duration: 200ms;
}

.back-to-top:hover {
  opacity: 100%;
}

@media (min-width: 640px) {
  header h1 {
    font-size: 2.5rem;
  }

  header h4 {
    font-size: 1.3rem;
  }
  .exp-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
  }

  .card-column,
  .proj-card-column {
    grid-column: span 3 / span 3;
  }

  .project-image-container {
    order: initial;
  }
}

@media (min-width: 1024px) {
  body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5rem;
    padding: 6rem;
    padding-top: 0rem;
  }
  header {
    position: sticky;
    top: 0rem;
    margin-left: auto;
    height: 100vh;
  }

  header h1 {
    font-size: 2.5rem;
  }

  header h4 {
    font-size: 1.3rem;
  }

  header p {
    max-width: 450px;
  }

  nav {
    display: flex;
    flex-direction: column;
    flex: 0.85;
  }
  .social-links-container i {
    font-size: 1.8rem;
  }

  header,
  main {
    max-width: 600px;
    width: 100%;
    padding-top: 6rem;
  }

  main {
    margin-right: auto;
  }
  .sticky-header {
    display: none;
  }

  footer {
    grid-column: span 2 / span 2;
  }
}
