/* reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* variables */
:root {
  --bg-dark: #202020;
  --bg-light: #ffffff;
  --bg-purple: #4d1d59;
  --bg-rose: #9c1a6a;
  --bg-navy: #23627d;
  --bg-green: #185428;
  --text-dark: #202020;
  --text-light: #ffffff;
}

/* base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tiny5", sans-serif;
  font-weight: 400;
  font-style: normal;
}

ul {
  list-style: none;
}

/* global sections */
section {
  padding: 5rem 1.5rem;
}

/* hero container */
.hero {
  min-height: 100vh;
  background-image: url("header_screen.png");
  background-size: cover;
  background-position: center;
}

/* about / projects container */
#about {
  position: relative;
  min-height: 100vh;
  background-image: url("my_projects-screen.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 3vw;
}

.about-content {
  width: 100%;
  max-width: 1200px;
  color: var(--text-dark);
}

/* project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  justify-items: center;
}

/* project card container */
.project-card {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 12 / 9;
  border: 2px solid var(--text-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-light);
}

/* image + content area */
.project-top {
  flex: 1; /* fills all space above footer */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
}

/* individual backgrounds */
.project-card-1 .project-top {
  background-image: none;
  background-color: var(--bg-rose);
}

.project-card-2 .project-top {
  background-image: none;
  background-color: var(--bg-purple);
}

.project-card-3 .project-top {
  background-image: none;
  background-color: var(--bg-navy);
}

/* project card content */
.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* project tech list */
.project-body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-body li {
  background-color: rgba(255,255,255,1);
  font-size: 1.4rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--text-dark);
  text-transform: uppercase;
}

/* project card footer */
.project-footer {
  background-color: var(--bg-light);
  padding: 0.75rem 1.5rem;
  border-top: 2px solid var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.project-footer a {
  text-decoration: none;
  font-weight: 600;
  font-size: 2rem;
  color: var(--text-dark);
  border-bottom: 2px solid currentColor;
}

/* contact container */
#contact {
  min-height: 100vh;
  background-image: url("important_links-screen.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.contact-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* links */
.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 1.25rem;
}

.links a {
  text-decoration: none;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--text-dark);
  border: 2px solid currentColor;
  background-color: var(--bg-light);
  padding: 0.5rem 1.25rem;
}

/* footer */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 3.5rem;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* mobile tweaks (to test on my iPhone) */
@media (max-width: 1206px) {

  section {
    padding: 0;
    margin: 0;
  }

  .hero {
    min-height: 15dvh;
    background-image: none;
    background-color: var(--bg-dark);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    color: var(--text-light);
    padding: 1rem 1rem;
  }

  .hero::before {
    content: "Mathilde Couturier-Dale";
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
  }

  .hero::after {
    content: "Personal portfolio";
    font-size: 2rem;
    opacity: 0.85;
  }

  #about {
    background-image: none;
    background-color: var(--bg-dark);
    min-height: auto;
    padding: 1rem;
    display: block;
  }

  .about-content {
    max-width: 95%;
    margin: 0 auto;
    text-align: center;
    color: var(--text-dark);
  }

  /* section headings (mobile, css-only, aligned with content) */
  .about-content::before,
  .contact-content::before {
    display: block;
    background-color: var(--bg-green);
    color: var(--text-light);
    padding: 1rem 2rem;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    width: fit-content;
  }

  .about-content::before {
    content: "MY PROJECTS";
  }

  .project-grid {
    margin: 0 auto;
    justify-items: center;
  }

  #contact {
    background-image: none;
    background-color: var(--bg-dark);
    min-height: auto;
    padding: 2rem 1rem 1rem;
    display: block;
  }

  .contact-content {
    width: 95%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-content::before {
    content: "IMPORTANT LINKS";
  }

  .links {
    gap: 2rem;
  }

  .links a {
    font-size: 2.5rem;
    color: var(--text-light);
    background-color: transparent;
    border-color: var(--text-light);
  }

  footer {
    font-size: 2rem;
  }
}
