:root {
  /* Background and Foreground */
  --clr-background: hsl(0, 0%, 98%);
  --clr-header: hsla(0 0% 98% / 90%);

  /* Primary Color */
  --clr-primary: hsl(180, 33%, 37%);
  --clr-primary-hover: hsl(210, 70%, 40%);

  /* Secondary Color */
  --clr-secondary: hsl(180, 20%, 50%);
  --clr-secondary-hover: hsl(45, 85%, 45%);

  --clr-triad-primary: hsl(89.7, 42.6%, 56.3%);
  --clr-triad-secondary: hsl(90, 71.64%, 26.27%);

  /* Accent Color */
  --clr-accent: hsl(340, 80%, 60%);
  --clr-accent-hover: hsl(340, 80%, 50%);

  /* Neutral Colors */
  --clr-neutral: hsl(0, 0%, 90%);
  --clr-neutral-hover: hsl(0, 0%, 80%);

  /* Text Colors */
  --clr-text-primary: hsl(0, 0%, 10%);
  --clr-text-secondary: hsl(0, 0%, 40%);
  --clr-text-compliment: hsl(0, 0%, 100%);

  --fs-300: 1rem;
  --fs-400: 1.25rem;
  --fs-500: 1.5rem;
  --fs-600: 1.57rem;
  --fs-700: 2rem;
  --fs-800: 2.5rem;
  --fs-900: 3rem;

  --std-left-margin: 2rem;
  --std-max-width: 85%;  
}

/* Dark theme overrides */
@media (prefers-color-scheme: dark) {
  :root {
    /* Background and Foreground */
    --clr-background: hsl(0, 36%, 4%);
    --clr-header: hsla(0 36% 4% / 90%);

    /* Primary Color */
    --clr-primary: hsl(203.3, 75%, 4.7%);
    --clr-primary-hover: hsl(210, 70%, 40%);

    /* Secondary Color */
    --clr-secondary: hsl(202.8, 96.1%, 10.2%);
    --clr-secondary-hover: hsl(45, 85%, 45%);

    --clr-triad-primary: hsl(80, 60%, 4.9%);
    --clr-triad-secondary: hsl(78.95, 30.16%, 12.35%);

    /* Accent Color */
    --clr-accent: hsl(340, 80%, 60%);
    --clr-accent-hover: hsl(340, 80%, 50%);

    /* Neutral Colors */
    --clr-neutral: hsl(0, 0%, 90%);
    --clr-neutral-hover: hsl(0, 0%, 80%);

    /* Text Colors */
    --clr-text-primary: hsl(0, 0%, 100%);
    --clr-text-secondary: hsl(0, 0%, 40%);
    --clr-text-compliment: hsl(0, 0%, 100%);
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body,
h1,
p,
ul,
li {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--clr-background);
}

/* .constrain-width {
  max-width: var(--std-max-width);
} */

.constrain-width {
  width: 100%;
  max-width: var(--std-max-width);
  overflow: hidden; /* Prevent overflow */
  box-sizing: border-box; /* Add this line */
  padding: 0; /* Ensure no padding causes overflow */
  margin: 0; /* Ensure no margin causes overflow */
}

.footer {
  padding-top: 1rem;
  background-color: var(--clr-primary);
  color: var(--clr-text-compliment);
}

.link-animate {
  text-decoration: none;
  position: relative;
}

.link-animate:after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  background: currentColor;
  left: 0;
  bottom: 0;
  transition: width 0.3s ease-out;
}

.link-animate:hover:after {
  width: 100%;
}

.link-hint {
  text-decoration: none;
  color: var(--clr-text-compliment);
  font-weight: bold;
  position: relative;
}

.link-hint:hover {
  color: var(--clr-accent-hover);
}

.link-hint:hover::after {
  opacity: 1;
  visibility: visible;
}

.link-hint::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 105%; /* Position above the link */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--clr-secondary);
  color: var(--clr-text-compliment);
  padding: 5px 10px;
  border: 1px solid var(--clr-neutral);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none; /* Prevent the tooltip from being interactable */
  z-index: 10; /* Ensure tooltip is above other elements */
}

.bit-o-top {
  margin-top: 0.5rem;
}

.bit-o-bottom {
  margin-bottom: 0.5rem;
}

.sticky-header {
  position: -webkit-sticky;
  position: sticky;
  background-color: var(--clr-header);
  top: 0;
  padding: 10px 0;
  z-index: 1000;
}

.sticky-header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

.sticky-header nav ul li {
  margin: 0 15px;
}

.sticky-header nav ul li a {
  color: var(--clr-text-primary);
  text-decoration: none;
  font-weight: bold;
}

section {
  padding-top: 0.25rem;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 1rem;
  background-color: var(--clr-background-color);
}

.homeSection {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap-reverse;
  color: var(--clr-text-primary);
}

#homeBio {
  margin-left: 3rem;
}

#heroImg {
  min-width: 270px;
  max-width: 30%;
}

#heroSummary {
  max-width: 70%;
}

#my-work {
  background-color: var(--clr-triad-primary);
  color: var(--clr-text-compliment);
}

#blog {
  background-color: var(--clr-primary);
  color: var(--clr-text-compliment);
}

#projects {
  background-color: var(--clr-triad-primary);
  color: var(--clr-text-compliment);
}

#contact {
  background-color: var(--clr-primary);
  color: var(--clr-text-compliment);
}

.gridContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

@media (min-width: 1000px) {
  .gridContainer {
    grid-template-columns: repeat(3, minmax(270px, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  background: var(--clr-secondary);
  border-radius: 1rem;
  position: relative;
}

.cardTimestamp {
  font-size: var(--fs-300);
}

.card-footer {
  padding-top: 0.25rem;
  border-top: 1px solid var(--clr-neutral);
  position: relative;
}

.title-text {
  font-size: var(--fs-500);
  font-weight: bolder;
}

.bg-accent {
  background: var(--clr-accent);
}

.glassImage {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px; /* Adjust the value to control the roundness of the corners */
  box-shadow: 2px 2px 1px rgba(160, 157, 157, 0.3);
}

.glassImage img {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.glassLink:hover img {
  transform: scale(1.1);
}

.progressive-left-margin {
  margin-top: 2rem;
  margin-left: 1rem;
}

.progressive-right-margin {
  margin-top: 2rem;
  margin-right: 1rem;
}

.projectItem {
  display: flex;
}

@media (max-width: 600px) {
  :root {
    --std-max-width: 100%;
  }

  #heroSummary {
    max-width: 100%;
  }
  .progressive-left-margin {
    margin-top: 0rem;
    margin-left: 0.5rem;
  }

  .progressive-right-margin {
    margin-top: 1rem;
    margin-left: 0.5rem;
  }

  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .wrap-me {
    flex-wrap: wrap;
  }

  .wrap-me-reverse {
    flex-wrap: wrap-reverse;
  }
}

.projectTitleImage {
  min-width: 270px;
  max-width: 40%;
  height: auto;
}

.section-title {
  border-bottom: 1px solid var(--clr-neutral);
}

.underline-me {
  text-decoration: underline;
}

.triad-background {
  background-color: var(--clr-triad-primary);
  color: var(--clr-text-compliment);
}

.container {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.image-wrapper {
  flex: 0 0 40%;
  max-width: 40%;
}

.image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 400px; /* Set your desired max height */
  border: 2px solid #333;
  border-radius: 10px;
  box-sizing: border-box; /* Include border in the element's dimensions */
}

.text-content {
  flex: 1;
}

.responsive-width {
  max-width: 70%;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .image-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .responsive-width {
    max-width: 100%;
  }
}
