/* ===== Base / Tokens ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Playfair+Display:wght@600&display=swap");

@property --tint {
    syntax: '<color>';
    inherits: true;
    initial-value: lavender;
  }
  
:root {
  --bg: #fffbf7;
  --fg: #111;
  --card: #ffffff;
  --accent: #5d5985;
  --brand: #5d5985;
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  margin: 0;
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 1px, 1px);
  white-space: nowrap; border: 0;
}

a {
  text-decoration: none;
  color: inherit;

  &:hover {
    color: rgb(43, 0, 255);
  }
}

/* ===== About Me ===== */
.about-me {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;

  picture { flex: 0 0 150px; }

  img {
    display: block;
    width: 150px;
    height: auto;
    border-radius: 8px;
    padding: 5px;
  }

  portfolio-callout { flex: 1 1 280px; }
}

/* ===== Header (top nav) ===== */
header.main-nav {
  display: grid;
  grid-template-columns: 1fr auto; /* fixed invalid property */
  align-items: center;
  padding: 0.5rem 1rem;
  min-height: 20dvh;

  h1,
  p {
    grid-column: 1;
    margin: 0;
  }

  nav {
    grid-column: 2;
    justify-self: end;
    background-color: transparent;

    ul {
      list-style: none;
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      margin: 0;
      padding: 0;
      border-radius: 8px;

      a {
        text-decoration: none;

        &:hover {
          background-color: lavenderblush;
          color: var(--accent);
          border-radius: 8px;
        }
      }
    }
  }
}

/* ===== Footer ===== */
footer {
  background-color: rgb(172, 207, 172);
  justify-content: center;

  nav {
    background-color: rgb(172, 207, 172);
    justify-content: center;

    ul,
    li {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    ul {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      align-items: center;
    }

    a img {
      display: block;
      width: 28px;
      height: 28px;
      padding: 4px;
    }
  }
}

/* ===== Status Bar ===== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
  margin: 2rem 0;

  h4 { flex-basis: 100%; }

  p { margin: 0; }

  progress {
    accent-color: var(--accent);
    height: 1rem;
    border-radius: 8px;
  }

  .status-gif {
    width: 80px;
    height: auto;
    border-radius: 8px;
  }
}

/* ===== Extra Credit example ===== */
article:has(figure img) {
  border: 1px solid color-mix(in oklab, var(--brand) 25%, #000 5%);
}

/* ===== Card ===== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--tint);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform .12s ease, box-shadow .12s ease;
  justify-content: center;
  gap: 20px;
  margin: 4rem auto;
  padding: 1rem;
  border-radius: 16px;
  max-width: 80%;

  figure { margin: 12px 0; }

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, .12);
    --tint: #f5e9ff;
  }

  img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
  }
}

/* ===== Header & footer color ===== */
.main-nav {
  background-color: rgb(172, 207, 172);
}

/* ===== Responsive Design Section ===== */
html {
    overflow-x: hidden; /* Prevent horizontal scrolling on small screens */
  }
  img {
    max-width: 100%; /* Makes sure all images resize properly */
    height: auto;
    display: block;
  }
  
  .container {
    width: min(100% - 2rem, 1100px);
    margin-inline: auto;
  }
  
  /* ===== Navigation (Hamburger Menu) ===== */
  header.main-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
  
    .burger {
      justify-self: end;
      font-size: 1.5rem;
      line-height: 1;
      padding: 0.25rem 0.5rem;
      border-radius: 0.5rem;
      cursor: pointer;
    }
  
    nav {
      /* nav is hidden until the burger is clicked */
      grid-column: 1 / -1;
      display: none;
  
      ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding-top: 0.5rem;
  
        a {
          padding: 0.5rem;
          border-radius: 0.5rem;
        }
      }
    }
  
    /* This line makes the menu appear when the checkbox is checked */
    #nav-toggle:checked ~ nav {
      display: block;
    }
  }
  
  /* ===== Layout adjustments for phone (default) ===== */
  .about-me {
    flex-direction: column;
    picture {
      max-width: 200px;
    }
  }
  .posts,
  .projects {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr; /* 1 column for phone */
  }
  .card {
    max-width: 80%; 
  }
  
  /* ===== Tablet & Small Laptop (≥700px) ===== */
  @media (min-width: 700px) {
    header.main-nav {
      grid-template-columns: 1fr auto;
  
      .burger {
        display: none; /* Hide burger on tablets and up */
      }
  
      nav {
        display: block; /* Always show nav */
        grid-column: 2;
  
        ul {
          flex-direction: row;
          gap: 1rem;
          padding-top: 0;
        }
      }
    }
  
    /* Makes the About section side-by-side instead of stacked */
    .about-me {
      flex-direction: row;
      picture {
        flex-basis: 160px;
      }
    }
  
    /* Use two columns for project/blog grids */
    .posts,
    .projects {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  
  /* ===== Desktop (≥1100px) ===== */
  /* This breakpoint is for large laptops and desktops — I add more columns and slight scaling */
  @media (min-width: 1100px) {
    /* Grid expands to 3 columns for large screens */
    .posts,
    .projects {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  
    /* Slightly larger About section image */
    .about-me picture {
      flex-basis: 180px;
    }
  }
  
  /* ===== Image sizing across devices ===== */
  picture img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  