:root {
  color-scheme: light;
  --page-background: #f3f6f5;
  --text-color: #203334;
  --accent-color: #087e78;
  --font-family: "Segoe UI", Arial, sans-serif;
  --button-background: #087e78;
  --button-border: 1px solid #087e78;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(ellipse at top left, #dcefeb 0, transparent 38rem),
    var(--page-background);
  color: var(--text-color);
  line-height: 1.65;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(100% - 2rem, 70rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

main > nav {
  position: sticky;
  top: 1rem;
  z-index: 1;
  order: -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 1px solid #dce6e3;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 0.5rem 1.5rem rgb(32 51 52 / 8%);
  backdrop-filter: blur(0.75rem);
}

main > nav a {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: #355253;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

main > nav a:hover,
main > nav a:focus-visible {
  background: #e2f2ef;
  color: #075d59;
}

h1,
h3,
#about-div,
#project-div,
.char-card,
.project-card,
.talk-text,
#email,
#instagram,
#linkedin,
.intro-text {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #e1e9e7;
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 0.75rem 2rem rgb(32 51 52 / 6%);
}

h1 {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.15;
}

.home-hero {
  display: flex;
  flex: 1 0 auto;
  min-height: clamp(15rem, 42vh, 25rem);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.1rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 1.5rem;
  background: linear-gradient(130deg, #075d59, #139b8d);
  box-shadow: 0 1.25rem 3rem rgb(7 93 89 / 18%);
  color: white;
}

.home-hero h1 {
  max-width: 22ch;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
}

.home-hero #switch-theme {
  align-self: flex-start;
  border-color: white;
  background: white;
  color: #075d59;
}

.home-hero #switch-theme:hover {
  background: #e2f2ef;
}

#typed-text::after {
  background: currentColor;
}

.intro-text {
  display: none;
}

#about-div,
#project-div {
  border-left: 0.35rem solid var(--accent-color);
  font-size: 1.1rem;
  font-weight: 550;
}

#about-div p,
.char-card p,
.project-card p {
  margin: 0;
}

#about-div p + p,
.char-card p + p {
  margin-top: 0.75rem;
}

.char-card,
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card-header,
.p-card-header {
  color: #075d59;
  font-size: 1.2rem;
  font-weight: 750;
  line-height: 1.3;
}

#contact-name {
  color: #075d59;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

#email,
#instagram,
#linkedin {
  padding-block: 1rem;
}

a {
  color: #087e78;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #075d59;
}

button,
#switch-theme {
  align-self: flex-start;
  padding: 0.8rem 1.2rem;
  border: 1px solid #087e78;
  border-radius: 999px;
  background: #087e78;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: #075d59;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #f0ad4e;
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .char-card,
  .project-card {
    flex: 1 1 calc(50% - 1.25rem);
  }

  main:has(.char-card),
  main:has(.project-card) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  main:has(.char-card) > nav,
  main:has(.project-card) > nav,
  #about-div,
  #project-div {
    flex-basis: 100%;
  }

  #email,
  #instagram,
  #linkedin {
    flex: 1 1 100%;
  }
}

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